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

Add possibility to use api_key per chat invocation. #46

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

michalwarda
Copy link
Contributor

In this PR I'm suggesting an addition of api_key passing directly through the Chat interface. This is done to allow users of the library to dynamically pass api_key based on who is using the chat.

My personal use case is as following:
I give my users possibility to pass their own OpenAI API_KEY through interface. Because of that I can't retrieve it from config. I have to inject it during the call.

In case I''ve missed anything in the PR I'm happy to improve it!

Thanks!

@brainlid
Copy link
Owner

brainlid commented Dec 4, 2023

Your use case makes sense and it's a clean solution. Thanks!

❤️💛💙💜

@brainlid brainlid merged commit 407449b into brainlid:main Dec 4, 2023
1 check passed
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 this pull request may close these issues.

2 participants