-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Custom Headers in LLM Requests #169
Comments
Hey @k1ng , cool idea. Would you be open to contributing this functionality to the project? If so, I suggest the following approach: Config
You may want to add two config options: One the header name and the other a secret, with the first being added in two above, but the secret kept to an environment variable only. Add the header middlewareCreate a new middleware function that pulls the header from Line 12 in 90cd50d
Add the middleware to the RouterSee here: Line 44 in 90cd50d
Happy to answer any questions. Also, happy to review a rough PR and work with you to finalize it. |
Hi @danielchalef, Thank you very much for your detailed explanation, it is appreciated. I'd like to contribute, but unfortunately, I lack the necessary experience with Go to make a pull request at this time. I will definitely keep your guidance in mind and hopefully, in the future, I will be able to make more substantial contributions to the project. |
I'd like to work on this issue. Could you please assign it to me? |
Feature Description
To integrate and proxy requests from Zep through Portkey.ai, we need the ability to add custom headers to our requests to the LLM. Please note that Portkey.ai already has an integration with Langchain.
Portkey.ai requires certain specific headers to be passed in every API call, which can be found in their documentation: https://docs.portkey.ai/how-portkey-works/portkey-headers
Value of Feature
This feature will allow logging Zep's requests to LLM and calculating the cost of LLM calls as a part of Zep-Portkey.ai integration. Custom headers support could also be useful for other potential integrations and use-cases.
Possible Implementation
We could provide the ability to set custom headers through environment variables, a
.env
file, or theconfig.yaml
file. This provides flexibility in choosing how to supply custom headers, depending on user preferences or security requirements.Thank You.
The text was updated successfully, but these errors were encountered: