Skip to content
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

feat(playground): parse model name and infer provider form span #5021

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

Parker-Stafford
Copy link
Contributor

@Parker-Stafford Parker-Stafford commented Oct 15, 2024

resolves #4998

Screen.Recording.2024-10-15.at.3.26.56.PM.mov

Small fix on azure

Azure OpenAI api requires you to pass in a string model name which matches the deployment name which is user defined (backed by a real open ai model)
Note: Still missing - azure endpoint / api version: #5023

Screen.Recording.2024-10-15.at.3.38.47.PM.mov

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 15, 2024
/>
{instance.model.provider === "AZURE_OPENAI" ? (
<TextField
label="Deployment Name"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can have this as model, not sure what's easier for users, technically we need the deployment name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

Comment on lines 141 to 143
if (modelName.includes("gpt") || modelName.includes("o1")) {
return "OPENAI";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just have prefix maps? e.g. OPENAI_MODEL_PREFIXES = ['gpt', 'o1']

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup can do that

Comment on lines +161 to +162
| { modelConfig: ModelConfig; parsingErrors: never[] }
| { modelConfig: null; parsingErrors: string[] } {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woa getting fancy now

Copy link
Contributor

@mikeldking mikeldking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe be get some Azure fixtures setup to test

@Parker-Stafford Parker-Stafford merged commit 45973b7 into playground Oct 16, 2024
6 of 7 checks passed
@Parker-Stafford Parker-Stafford deleted the parker/4998-parse-model-config-from-span branch October 16, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants