mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix failing tests
This commit is contained in:
parent
9aefbdd0e7
commit
b915c4beb1
2 changed files with 3 additions and 0 deletions
|
@ -41,3 +41,4 @@ def test_completion_gpt():
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
litellm.cache = False # rest to False for the next test
|
|
@ -722,6 +722,8 @@ def message_to_user_question(messages):
|
||||||
|
|
||||||
def add_cache(messages, model_response):
|
def add_cache(messages, model_response):
|
||||||
global cache_collection
|
global cache_collection
|
||||||
|
if cache_collection == None:
|
||||||
|
make_collection()
|
||||||
user_question = message_to_user_question(messages)
|
user_question = message_to_user_question(messages)
|
||||||
cache_collection.add(
|
cache_collection.add(
|
||||||
documents=[user_question],
|
documents=[user_question],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue