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

Ldelalande/model settings #651

Merged
merged 19 commits into from
Jan 21, 2025
Merged

Ldelalande/model settings #651

merged 19 commits into from
Jan 21, 2025

Conversation

lily-de
Copy link
Collaborator

@lily-de lily-de commented Jan 19, 2025

No description provided.

ui/desktop/package.json Outdated Show resolved Hide resolved
@lily-de lily-de force-pushed the ldelalande/model-settings branch from ee492b0 to 56df3f7 Compare January 21, 2025 05:28
@lily-de lily-de marked this pull request as ready for review January 21, 2025 18:00
@@ -73,6 +75,13 @@ async fn create_agent(
return Err(StatusCode::UNAUTHORIZED);
}

// Set the environment variable for the model if provided
if let Some(model) = &payload.model {
let env_var_key = format!("{}_MODEL", payload.provider.to_uppercase());
Copy link
Collaborator

@alexhancock alexhancock Jan 21, 2025

Choose a reason for hiding this comment

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

Should this be payload.model.to_uppercase()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's provider pretty sure ... like OPENAI_MODEL, ANTHROPIC_MODEL, DATABRICKS_MODEL etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

seems to work based on log statements!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. I guess I was just confused by the surface level param mapping

We have payload.model and payload.provider but we set {}_MODEL to payload.provider

Not a big deal though!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh yeah i see how that is confusing.. it's just to match what we are looking for in the backend when we set up an agent with a specific provider -- eg here's where we set up anthropic with a model or default to sonnet

@alexhancock alexhancock merged commit e92b24d into v1.0 Jan 21, 2025
4 checks passed
@yingjiehe-xyz yingjiehe-xyz deleted the ldelalande/model-settings branch February 5, 2025 21:07
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.

2 participants