-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
We should probably use RwLock for API key & base url? #19
Comments
TBH, I would rather have a structure holding the key instead of setting it globally. |
We could keep the option of setting a global key, for simplicity, and also allow for specifying a key (to override the global) within the builder pattern for each API. This keeps it simple for users that only need to use a single key while allowing for users that need multiple keys. |
Same. To be honest, I don't expect a library like this to even assume any defaults from the env. |
IMHO
Sorry, if I sound too critical. But I just got highly triggered 😆 You have a very good and interesting library, but I would certainly NOT use it in my projects. What if I want to build a multi-agent system? Use different, but OpenAI compatible API, different keys for different projects?, etc. |
Problem
We're currently using Mutexes but it makes sense to use a RwLock since it allows multiple readers at the same time.
Solution
Use RwLock
Let me know your thoughts
The text was updated successfully, but these errors were encountered: