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

@ -18,7 +18,7 @@ fn get_coin_price(coin: &str) -> f64 {
#[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 properties = HashMap::new();
properties.insert(