Skip to content
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

feat: Auth Bearer Token Support #450

Closed
ColinLeverger opened this issue Oct 6, 2023 · 1 comment · Fixed by #605
Closed

feat: Auth Bearer Token Support #450

ColinLeverger opened this issue Oct 6, 2023 · 1 comment · Fixed by #605

Comments

@ColinLeverger
Copy link

Feature request

I have deployed an OpenLLM on a managed service that is protected by the use of an auth Bearer token:

curl -X 'POST' \
  'https://themodel.url/v1/generate' \
  -H "Authorization: Bearer Sh6Kh4[ . . . super long bearer token ]W18UiWuzsz+0r+U"
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "What is the difference between a pigeon",
  "llm_config": {
    "use[ . . . and so on]
    }
  }'

Curl works like a charm.

In LangChain, I try to create my new llm as such:

llm = OpenLLM(server_url="https://themodel.url/v1/generate", temperature=0.2)

After digging your repo, did not find any options for including the Bearer token nor to modify the headers of a distant openllm session!

Motivation

Modifying the Headers would enable the use of self deployed LLM without any auth proxy

Other

No response

@aarnphm
Copy link
Member

aarnphm commented Nov 10, 2023

This is now supported with #605, you can export the envvar with OPENLLM_AUTH_TOKEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants