mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
test(test_lowest_latency_routing.py): add more tests
This commit is contained in:
parent
25ee96271e
commit
d3dee9b20c
3 changed files with 146 additions and 139 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
import dotenv, os, requests, random
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
dotenv.load_dotenv() # Loading env variables using dotenv
|
||||
import traceback
|
||||
|
@ -135,6 +135,9 @@ class LowestLatencyLoggingHandler(CustomLogger):
|
|||
if _deployment is None:
|
||||
continue # skip to next one
|
||||
|
||||
if isinstance(item_latency, timedelta):
|
||||
item_latency = float(item_latency.total_seconds())
|
||||
|
||||
if item_latency == 0:
|
||||
deployment = _deployment
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue