fix: adding extension hack

fix
This commit is contained in:
2025-05-10 22:01:17 +01:00
parent b97eae10a3
commit 5a2b990c0c
2 changed files with 10 additions and 0 deletions

View File

@@ -216,6 +216,12 @@ func (chat *Chat) AddImage(imageName string, image []byte, query *string) error
index += 1
}
if len(extension) == 0 {
// Hacky! It seems apple doesnt add extension.
// BIG TODO: take better metadata from the image.
extension = "png"
}
messageContent.Content[index] = ImageMessageContent{
ImageType: "image_url",
ImageUrl: ImageMessageUrl{