Skip to content

fix: ensure default model is parsed when using default model provider #684

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

Merged

Conversation

thedadams
Copy link
Contributor

@thedadams thedadams commented Jul 31, 2024

When using the default model provider flag, the default model will be
gpt-4o. However, when it is parsed, the expected format is 'gpt-4p from
my-model-provider'. When using a default model provider, the 'gpt-4o'
was being parsed and the model was set to the empty string.

After this change, if the model name is empty after parsing, then we
know that the model from the request doesn't have a 'from' in it and the
first part of the split reference should be used.

When using the default model provider flag, the default model will be
gpt-4o. However, when it is parsed, the expected format is 'gpt-4p from
my-model-provider'. When using a default model provider, the 'gpt-4o'
was being parsed and the model was set to the empty string.

After this change, if the model name is empty after parsing, then we
know that the model from the request doesn't have a 'from' in it and the
first part of the split reference should be used.

Signed-off-by: Donnie Adams <[email protected]>
@thedadams thedadams force-pushed the default-model-provider-set-model branch from d3f07ad to 7646c4b Compare July 31, 2024 16:58
@thedadams thedadams merged commit c94dd10 into gptscript-ai:main Jul 31, 2024
10 checks passed
@thedadams thedadams deleted the default-model-provider-set-model branch July 31, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants