Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(main.py): fix linting error for python3.8

Krrish Dholakiac0ef2e9dd0e6
diff --git a/litellm/main.py b/litellm/main.py
index 0e281b5edcb..e1660b21a99 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -31,6 +31,7 @@ from typing import (
Literal,
Mapping,
Optional,
+ Type,
Union,
)
@@ -608,7 +609,7 @@ def completion(
logit_bias: Optional[dict] = None,
user: Optional[str] = None,
# openai v1.0+ new params
- response_format: Optional[Union[dict, type[BaseModel]]] = None,
+ response_format: Optional[Union[dict, Type[BaseModel]]] = None,
seed: Optional[int] = None,
tools: Optional[List] = None,
tool_choice: Optional[Union[str, dict]] = None,