mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test(test_async_fn.py): adding additional logging for tests
This commit is contained in:
parent
f9ff8cbfb1
commit
1eca893d2f
2 changed files with 2 additions and 1 deletions
|
@ -30,6 +30,8 @@ def test_get_response_streaming():
|
||||||
user_message = "Hello, how are you?"
|
user_message = "Hello, how are you?"
|
||||||
messages = [{"content": user_message, "role": "user"}]
|
messages = [{"content": user_message, "role": "user"}]
|
||||||
try:
|
try:
|
||||||
|
import litellm
|
||||||
|
litellm.set_verbose = True
|
||||||
response = await acompletion(model="gpt-3.5-turbo", messages=messages, stream=True)
|
response = await acompletion(model="gpt-3.5-turbo", messages=messages, stream=True)
|
||||||
print(type(response))
|
print(type(response))
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,6 @@ def test_redis_cache_completion():
|
||||||
def custom_get_cache_key(*args, **kwargs):
|
def custom_get_cache_key(*args, **kwargs):
|
||||||
# return key to use for your cache:
|
# return key to use for your cache:
|
||||||
key = kwargs.get("model", "") + str(kwargs.get("messages", "")) + str(kwargs.get("temperature", "")) + str(kwargs.get("logit_bias", ""))
|
key = kwargs.get("model", "") + str(kwargs.get("messages", "")) + str(kwargs.get("temperature", "")) + str(kwargs.get("logit_bias", ""))
|
||||||
print("key for cache", key)
|
|
||||||
return key
|
return key
|
||||||
|
|
||||||
def test_custom_redis_cache_with_key():
|
def test_custom_redis_cache_with_key():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue