-
Notifications
You must be signed in to change notification settings - Fork 563
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
Conversation
ee492b0
to
56df3f7
Compare
@@ -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()); |
There was a problem hiding this comment.
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()
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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
No description provided.