-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assistants API - MessageContent.ImageBinaryContent() does not work - API returns invalid url #569
Comments
same issue here, could you fix it? @pappde |
It does not appear to be possible to send Base64-encoded images to the Assistants API. |
I believe this is the same issue @yt3trees mentioned. Please reopen this if it is not. I checked the implementation and couldn't find any issues. |
Here is a test I added to MessagesTestHelper:
This test results in the following error message:
Something weird about the MessageContentConverter? The serialized json for the request looks fine though. Is it a problem with the API? PS: the JSON for the request:
|
I did find and fix the other issue using ImageFileContent(). See PR #574. So at least we have a workaround. EXPLANATION
Note the subtle capitalization discrepancy on "Id" vs "id". That is fixed in PR #... ORIGINAL ISSUE
REPRO NOTES: I would reopen this issue, but don't see any functions to do so. |
Describe the bug
When I send an image to Assistants API CreateMessage, I get an Error back from the API. It suggests that the request is not correctly serializing.
Your code piece
Result
With MessageContent.ImageBinaryContent() I get "Invalid 'content[1].image_url.url'. Expected a valid URL, but got a value with an invalid format."
Expected behavior
If I send the exact same thing to ChatCompletionCreateRequest, it works, so I know there isn't anything wrong with the fileId or binary.
Desktop (please complete the following information):
Edit 5/25/24
The text was updated successfully, but these errors were encountered: