You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature or improvement you're requesting
Description
Some integrations with LLM providers require setting custom headers in API requests. For example, I am using Helicone alongside PostHog, which requires additional headers (Helicone-Auth, Helicone-Posthog-Key, etc.) to track usage and analytics effectively. However, I could not find an option to set custom headers in the OpenAI library.
Expected Behavior
The client initialization could allow a default_headers parameter to define headers that apply to all requests, e.g.:
This would provide flexibility for monitoring, analytics, and other third-party integrations.
Proposed Implementation
If this feature is not currently supported, I am happy to contribute by submitting a PR to add this functionality. Please let me know if this aligns with the library's goals.
Use Cases
Tracking requests with Helicone and PostHog.
Supporting other custom integrations that require headers.
Steps Taken
I reviewed the library documentation and source code but could not find support for setting default headers. If this feature is already available, I'd appreciate guidance on how to use it.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the feature or improvement you're requesting
Description
Some integrations with LLM providers require setting custom headers in API requests. For example, I am using Helicone alongside PostHog, which requires additional headers (
Helicone-Auth
,Helicone-Posthog-Key
, etc.) to track usage and analytics effectively. However, I could not find an option to set custom headers in the OpenAI library.Expected Behavior
The client initialization could allow a default_headers parameter to define headers that apply to all requests, e.g.:
This would provide flexibility for monitoring, analytics, and other third-party integrations.
Proposed Implementation
If this feature is not currently supported, I am happy to contribute by submitting a PR to add this functionality. Please let me know if this aligns with the library's goals.
Use Cases
Tracking requests with Helicone and PostHog.
Supporting other custom integrations that require headers.
Steps Taken
I reviewed the library documentation and source code but could not find support for setting default headers. If this feature is already available, I'd appreciate guidance on how to use it.
Additional context
No response
The text was updated successfully, but these errors were encountered: