mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 15:15:34 +00:00
Add headers to client
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user