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
Is your feature request related to a problem? Please describe.
I would like to integrate with OpenAI via the Helicone proxy, but to do so, I need to be able to specify a custom HTTP header.
Describe the solution you'd like
Proxy APIs like Helicone wrap OpenAI's APIs with additional functionality. To use Helicone, you not only need to point the OpenAI client at the Helicone host, but you also have to set an additional HTTP header on the requests. For details, please refer to https://docs.helicone.ai/getting-started/integration-method/openai-proxy.
To enable this, I propose:
Changing OpenAI.swift's Configuration struct to take an optional dictionary of key/value pairs, where the key is the name of the HTTP header, and the value is its value.
Modifying performRequest() and performSteamingRequest() in that file to pass that optional dictionary to URLRequestBuildable.build() in a similar manner as organizationIdentifier is passed today
Changing the URLRequestBuildable.build() interface to accept that optional dictionary
Changing JSONRequest.build(), MultipartFormDataRequest.build(), etc. to conform to the updated interface, setting the header(s) on the request that is built if any were supplied in the optional dictionary.
Describe alternatives you've considered
I think taking an optional dictionary of headers is preferable to explicitly covering every possible header that might be used by other proxies like Helicone. Other than that, I can't think of too many other ways to do this.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to integrate with OpenAI via the Helicone proxy, but to do so, I need to be able to specify a custom HTTP header.
Describe the solution you'd like
Proxy APIs like Helicone wrap OpenAI's APIs with additional functionality. To use Helicone, you not only need to point the OpenAI client at the Helicone host, but you also have to set an additional HTTP header on the requests. For details, please refer to https://docs.helicone.ai/getting-started/integration-method/openai-proxy.
To enable this, I propose:
Describe alternatives you've considered
I think taking an optional dictionary of headers is preferable to explicitly covering every possible header that might be used by other proxies like Helicone. Other than that, I can't think of too many other ways to do this.
Additional context
N/A
The text was updated successfully, but these errors were encountered: