Hello, I noticed while trying to use the library that ChatMessage only support content as a string.
example:
chat_response = client.chat.complete(
model = model,
messages = [
{
"role": "user",
"content": "What is the best French cheese?",
},
]
)
but the actual mistral API like most other LLM support multi content messages, which is extremely useful when trying to send an image as part of a message.
Link to the official documentation: https://docs.mistral.ai/capabilities/vision/
as you can see, a common use case would be to send a message with multipart content.
example:
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": "https://tripfixers.com/wp-content/uploads/2019/11/eiffel-tower-with-snow.jpeg"
}
]
}
]
So if we could add the support to this feature it would be pretty nice.
I will start working on the PR, as I don't think it will be complicated to add as a feature.
Hello, I noticed while trying to use the library that ChatMessage only support content as a string.
example:
but the actual mistral API like most other LLM support multi content messages, which is extremely useful when trying to send an image as part of a message.
Link to the official documentation: https://docs.mistral.ai/capabilities/vision/
as you can see, a common use case would be to send a message with multipart content.
example:
So if we could add the support to this feature it would be pretty nice.
I will start working on the PR, as I don't think it will be complicated to add as a feature.