Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rig/rig-core/src/providers/deepseek.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ impl ProviderClient for Client {
// If you prefer the environment variable approach:
fn from_env() -> Self {
let api_key = std::env::var("DEEPSEEK_API_KEY").expect("DEEPSEEK_API_KEY not set");
Self::from_val(api_key.into())
}

fn from_val(input: Self::Input) -> Self {
let mut client_builder = Self::builder();
client_builder.headers_mut().insert(
http::header::CONTENT_TYPE,
http::HeaderValue::from_static("application/json"),
);
let client_builder = client_builder.api_key(&api_key);
let client_builder = client_builder.api_key(input);
client_builder.build().unwrap()
}

fn from_val(input: Self::Input) -> Self {
Self::new(input).unwrap()
}
}

#[derive(Debug, Deserialize)]
Expand Down