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

API Key Authentication for Michaelfeil Infinity #207

Closed
3 tasks
AjayKarma05 opened this issue Apr 26, 2024 · 8 comments
Closed
3 tasks

API Key Authentication for Michaelfeil Infinity #207

AjayKarma05 opened this issue Apr 26, 2024 · 8 comments

Comments

@AjayKarma05
Copy link

AjayKarma05 commented Apr 26, 2024

Model description

Could you please provide guidance on how to enable API_KEY authentication? Alternatively, is there a plan to implement API_KEY authentication similar to OpenAI's approach?

Open source status

  • The model implementation is available on transformers
  • The model weights are available on huggingface-hub
  • I verified that the model is currently not running in infinity

Provide useful links for the implementation

No response

@semoal
Copy link

semoal commented May 12, 2024

It's just a fastapi server, implement it as usual like you do on FastAPI.

@michaelfeil michaelfeil mentioned this issue May 18, 2024
@michaelfeil
Copy link
Owner

I added an example on how to use infinity with runpod.io

note, that API_Keys are typically not set, they are generated. Also they are not verified by the application itself, but by e.g. AWS API Gateway. I understand ypur interest, but i think such a feature is easy to implement yourself or better be added with another service

@michaelfeil
Copy link
Owner

monotykamary@36680ae

@monotykamary has implemented it. Changed my mind: If the contribution is easy enough, comes with a unit test that covers every LOC, and defaults to no api key as default behauviour, would be accepted

@monotykamary
Copy link

Oh, I just did a dirty implementation to quickly spin up a quick embedding server with auth on Modal: https://github.com/dwarvesf/llm-hosting/blob/main/infinity_snowflake_arctic_embed_l_335m.py

@michaelfeil
Copy link
Owner

Looks not dirty at all @monotykamary! Awesome

@michaelfeil
Copy link
Owner

michaelfeil commented May 31, 2024

@monotykamary @semoal @AjayKarma05 Added auth, you can set a Bearer token via INFINITY_API_KEY=mykey123 or --api-key mykey123

@Jimmy-Newtron
Copy link

How to set the API_KEY in the Langchain Infinity Embedding?

@michaelfeil
Copy link
Owner

michaelfeil commented Jun 20, 2024

@Jimmy-Newtron PRs to langchain are welcome. I think this feature is missing there.

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

No branches or pull requests

5 participants