Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the purpose of this pull request.
I added key roller fitch.
Now, in credential it can bee added multiple api keys, like this:
Output will be:
sk-first
sk-second
this can be critically necessary to prevent the "rate limit error".
Backward compatability:
sk-first
sk-first
How to test
How can we test your PR during review? What commands should we run? What outcomes should we expect?
Have you tested this PR?
I tested lib before changes an after. Errors are identical:
============================================= short test summary info =============================================
FAILED tests/test_autogen_integration.py::test_agent_groupchat - AssertionError: Script exited with code 1: Traceback (most recent call last):
FAILED tests/test_base_functions.py::test_archival - openai.PermissionDeniedError:
FAILED tests/test_different_embedding_size.py::test_create_user - openai.PermissionDeniedError:
FAILED tests/test_load_archival.py::test_load_directory[chroma-sqlite] - UnboundLocalError: local variable 'num_passages' referenced before assignment
FAILED tests/test_metadata_store.py::test_storage[sqlite] - UnboundLocalError: local variable 'add_default_presets' referenced before assignment
FAILED tests/test_openai_client.py::test_openai_assistant - openai.APIConnectionError: Connection error.
FAILED tests/test_storage.py::test_storage[recall_memory-sqlite] - openai.PermissionDeniedError:
FAILED tests/test_storage.py::test_storage[archival_memory-chroma] - openai.PermissionDeniedError:
FAILED tests/test_summarize.py::test_summarize - requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.openai.com/v1/chat/completions
ERROR tests/test_server.py::test_load_data - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_server.py::test_attach_source_to_agent - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_server.py::test_user_message - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_client.py::test_create_agent[client0] - KeyError: 'user_id'
ERROR tests/test_client.py::test_user_message[client0] - KeyError: 'user_id'
ERROR tests/test_client.py::test_create_agent[client1] - KeyError: 'user_id'
ERROR tests/test_client.py::test_user_message[client1] - KeyError: 'user_id'
ERROR tests/test_server.py::test_error_on_nonexistent_agent - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_server.py::test_save_archival_memory - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_server.py::test_get_recall_memory - AssertionError: Missing PGVECTOR_TEST_DB_URL
ERROR tests/test_server.py::test_get_archival_memory - AssertionError: Missing PGVECTOR_TEST_DB_URL
=================== 9 failed, 23 passed, 2 skipped, 20 warnings, 11 errors in 124.39s (0:02:04) ===================
Related issues or PRs
i added one feature request
I am sure that if it is possible to purchase two api keys, many people will be able to work around this problems:
#155
#125
Additional context
Add any other context or screenshots about the PR here.