-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: add API_KEY list support #877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good here, thanks!
@neboman11 you rock ❤️ thank you! |
I'm sorry, and how does it work with I'm having problems checking for the models available: # curl http://localhost:8080/models/available -H "Authorization: Bearer $myApiKey"
{"message":"Invalid API key"} |
btw, same when I try to query the model, by using default's OpenAI's example: curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $myApiKey" -d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."
},
{
"role": "user",
"content": "Compose a poem that explains the concept of recursion in programming."
}
]
}'
{"message":"Invalid API key"} |
Please, forgive me - I shouldn't been adding quotes for the key in my |
Description
This PR fixes #729 and #480
This PR is a copy of #740 but with the API key option changed to a list (as requested in that PR).
This PR adds
api-key
flag. When this flag is set, all API requests needs to provide the same value as Bear token in the request hear. If this flag is not set, no auth will be enabled. This flag is not set by default.Notes for Reviewers
Signed commits