mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test: testing fixes
This commit is contained in:
parent
9cf5ab468f
commit
edbf97adf2
4 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
Task exception was never retrieved
|
||||
future: <Task finished name='Task-336' coro=<QueryEngine.aclose() done, defined at /opt/homebrew/lib/python3.11/site-packages/prisma/engine/query.py:110> exception=RuntimeError('Event loop is closed')>
|
||||
future: <Task finished name='Task-308' coro=<QueryEngine.aclose() done, defined at /opt/homebrew/lib/python3.11/site-packages/prisma/engine/query.py:110> exception=RuntimeError('Event loop is closed')>
|
||||
Traceback (most recent call last):
|
||||
File "/opt/homebrew/lib/python3.11/site-packages/prisma/engine/query.py", line 112, in aclose
|
||||
await self._close_session()
|
||||
|
|
|
@ -67,3 +67,9 @@ model_list:
|
|||
description: this is a test openai model
|
||||
id: f6f74e14-ac64-4403-9365-319e584dcdc5
|
||||
model_name: test_openai_models
|
||||
- litellm_params:
|
||||
model: gpt-3.5-turbo
|
||||
model_info:
|
||||
description: this is a test openai model
|
||||
id: 9b1ef341-322c-410a-8992-903987fef439
|
||||
model_name: test_openai_models
|
||||
|
|
|
@ -17,10 +17,10 @@ model_alias_map = {
|
|||
"good-model": "anyscale/meta-llama/Llama-2-7b-chat-hf"
|
||||
}
|
||||
|
||||
litellm.model_alias_map = model_alias_map
|
||||
|
||||
def test_model_alias_map():
|
||||
try:
|
||||
litellm.model_alias_map = model_alias_map
|
||||
response = completion(
|
||||
"good-model",
|
||||
messages=[{"role": "user", "content": "Hey, how's it going?"}],
|
||||
|
|
|
@ -366,7 +366,7 @@ def test_function_calling():
|
|||
}
|
||||
]
|
||||
|
||||
router = Router(model_list=model_list, routing_strategy="latency-based-routing")
|
||||
router = Router(model_list=model_list)
|
||||
response = router.completion(model="gpt-3.5-turbo-0613", messages=messages, functions=functions)
|
||||
router.reset()
|
||||
print(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue