mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
STREAM_SSE_DONE_STRING
This commit is contained in:
parent
aa250088b2
commit
58acf23c3e
2 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue