Add headers to client

This commit is contained in:
Dongri Jin
2025-03-05 07:26:04 +09:00
parent 2e6ea3eedd
commit ddeefd256c
26 changed files with 77 additions and 113 deletions

View File

@ -10,7 +10,7 @@ use std::env;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key = env::var("OPENAI_API_KEY").unwrap().to_string();
let client = OpenAIClient::builder().with_api_key(api_key).build()?;
let mut client = OpenAIClient::builder().with_api_key(api_key).build()?;
let mut tools = HashMap::new();
tools.insert("type".to_string(), "code_interpreter".to_string());