将图片数据编码为 base64
(self, image_data: bytes)
| 60 | self.chat_endpoint = f"{self.base_url}{endpoint}" |
| 61 | |
| 62 | def _encode_image_to_base64(self, image_data: bytes) -> str: |
| 63 | """将图片数据编码为 base64""" |
| 64 | return base64.b64encode(image_data).decode('utf-8') |
| 65 | |
| 66 | def _build_content_with_images( |
| 67 | self, |
no outgoing calls
no test coverage detected