STREAM_SSE_DONE_STRING

This commit is contained in:
Ishaan Jaff 2025-03-12 09:33:28 -07:00
parent aa250088b2
commit 58acf23c3e
2 changed files with 3 additions and 4 deletions

View file

@ -5,17 +5,15 @@ from typing import Any, AsyncIterator, Dict, Optional, Union
import httpx
from litellm.constants import STREAM_SSE_DONE_STRING
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
from litellm.llms.base_llm.responses.transformation import BaseResponsesAPIConfig
from litellm.types.llms.openai import (
ResponsesAPIResponse,
ResponsesAPIStreamEvents,
ResponsesAPIStreamingResponse,
)
from litellm.utils import CustomStreamWrapper
COMPLETED_OPENAI_CHUNK_TYPE = "response.completed"
class BaseResponsesAPIStreamingIterator:
"""
@ -50,7 +48,7 @@ class BaseResponsesAPIStreamingIterator:
return None
# Handle "[DONE]" marker
if chunk == "[DONE]":
if chunk == STREAM_SSE_DONE_STRING:
self.finished = True
return None