async-openai
async-openai copied to clipboard
chore: add with_headers method
Support custom headers required for observability applications
let client = Client::with_config(
OpenAIConfig::default()
.with_api_base(api_base)
.with_headers(HashMap::from([(
"Helicone-Auth".to_string(),
format!("Bearer {}", config_env_var("HELICONE_API_KEY")?),
)])),
);
Thanks for the PR, I'll leave review seperately
Hey, any raeson this is not merged yet ?
Thanks for the PR!
The latest release has with_header method to enable this behaviour without custom deserialization implementation:
https://docs.rs/async-openai/0.31.0-alpha.7/async_openai/config/struct.OpenAIConfig.html#method.with_header, hence closing.