Fix OpenAI model definitions by restricting to gpt-4o models for multimodal support#18
Merged
felixarntz merged 3 commits intofelixarntz:mainfrom Nov 18, 2024
Merged
Conversation
felixarntz
approved these changes
Nov 18, 2024
Owner
felixarntz
left a comment
There was a problem hiding this comment.
Thank you for the PR @mslinnea, this is a great catch!
gpt-4o models for multimodal support
felixarntz
reviewed
Nov 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I encountered an issue with the current model selection for the OpenAI service. It defaults to gpt-4-turbo-preview as the preferred multimodal model, but this model fails to generate image alt text, returning the error:
This error persists even though a valid base64-encoded image is sent in the request.
To resolve this, I’ve updated the model selection to use only gpt-4o models, which are compatible and successfully handle the image input for generating alt text.
I also excluded realtime and audio models. Realtime models are incompatiable with the
v1/chat/completionsendpoint (they requirev1/completionsendpoint). Audio models don't accept image inputs.Let me know if this fits or if you need any more tweaks!