mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-15 06:19:29 +00:00
(test) semantic cache
This commit is contained in:
committed by
Krrish Dholakia
parent
a510adb1e6
commit
a5afbf6d56
@@ -990,7 +990,7 @@ def test_cache_context_managers():
|
||||
|
||||
|
||||
def test_redis_semantic_cache_completion():
|
||||
litellm.set_verbose = False
|
||||
litellm.set_verbose = True
|
||||
|
||||
random_number = random.randint(
|
||||
1, 100000
|
||||
@@ -1003,6 +1003,7 @@ def test_redis_semantic_cache_completion():
|
||||
host=os.environ["REDIS_HOST"],
|
||||
port=os.environ["REDIS_PORT"],
|
||||
password=os.environ["REDIS_PASSWORD"],
|
||||
similarity_threshold=0.5,
|
||||
)
|
||||
print("test2 for Redis Caching - non streaming")
|
||||
response1 = completion(model="gpt-3.5-turbo", messages=messages, max_tokens=20)
|
||||
|
||||
Reference in New Issue
Block a user