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]

Update litellm/llms/chatgpt/chat/streaming_utils.py

Cesar Garcia3b7236d6181f
diff --git a/litellm/llms/chatgpt/chat/streaming_utils.py b/litellm/llms/chatgpt/chat/streaming_utils.py
index 953309266e6..730becb06e6 100644
--- a/litellm/llms/chatgpt/chat/streaming_utils.py
+++ b/litellm/llms/chatgpt/chat/streaming_utils.py
@@ -22,9 +22,9 @@ class ChatGPTToolCallNormalizer:
def __init__(self, stream: Any):
self._stream = stream
- self._seen_ids: dict[str, int] = {} # tool_call_id -> assigned_index
+ self._seen_ids: Dict[str, int] = {} # tool_call_id -> assigned_index
self._next_index: int = 0
- self._last_id: str | None = None # tracks which tool call the next delta belongs to
+ self._last_id: Optional[str] = None # tracks which tool call the next delta belongs to
def __getattr__(self, name: str) -> Any:
return getattr(self._stream, name)