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): save model config by provider in preferences #5216

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

Parker-Stafford
Copy link
Contributor

resolves #5069

  • allows for saving a model configuration by provider in the preferences store, persisted to local storage
    Behavior:
  • will attempt to pull from local storage when navigating to the default playground with no instances passed in (i.e., not from a span)
    • this will attempt to pull from the default provider for the playground (i.e., openai)
    • if an openai config is not save din local storage it will pull from the first provider in local storage if one exists, otherwise falling back to default model config
  • when switching between providers within a playground instance it will pull from local storage for the provider switched to
    • it will populate the model or model like fields for azure
    • it will not populate invocation params from the config in local storage (this can be changed but seems a little bit counter to testing flows
Screen.Recording.2024-10-28.at.10.05.28.PM.mov

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 29, 2024
Comment on lines 200 to 201
Save {ModelProviders[instance.model.provider]} configuration to
local storage.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

any advice on messaging here is appreciated

Copy link
Contributor

@cephalization cephalization left a comment

Choose a reason for hiding this comment

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

Works great

Comment on lines 199 to 202
<Tooltip>
Save {ModelProviders[instance.model.provider]} configuration to
local storage.
</Tooltip>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Tooltip>
Save {ModelProviders[instance.model.provider]} configuration to
local storage.
</Tooltip>
<Tooltip>
Remember configuration for {ModelProviders[instance.model.provider] ?? "this provider"}.
</Tooltip>

How does this sound? I'd probably avoid mentioning local storage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes much better! Thanks!

@Parker-Stafford Parker-Stafford merged commit d9cb1f1 into main Oct 29, 2024
7 checks passed
@Parker-Stafford Parker-Stafford deleted the parker/5069-save-model-config branch October 29, 2024 16:14
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
Status: Done
Development

Successfully merging this pull request may close these issues.

[playground][ui] save off model config by provider and use as default in playground
2 participants