fix: fix linting errors

This commit is contained in:
Krrish Dholakia
2025-10-11 13:38:28 -07:00
parent 8661b3aaa6
commit ee1e9da7b2
2 changed files with 13 additions and 6 deletions
@@ -10,6 +10,7 @@ from litellm.responses.litellm_completion_transformation.transformation import (
from litellm.responses.streaming_iterator import ResponsesAPIStreamingIterator
from litellm.responses.utils import ResponsesAPIRequestUtils
from litellm.types.llms.openai import (
PART_UNION_TYPES,
BaseLiteLLMOpenAIResponseObject,
ContentPartAddedEvent,
ContentPartDoneEvent,
@@ -203,6 +204,7 @@ class LiteLLMCompletionStreamingIterator(ResponsesAPIStreamingIterator):
text = getattr(litellm_complete_object.choices[0].message, "content", "") or "" # type: ignore
reasoning_content = getattr(litellm_complete_object.choices[0].message, "reasoning_content", "") or "" # type: ignore
part: Optional[PART_UNION_TYPES] = None
if reasoning_content:
part = ContentPartDonePartReasoningText(
type="reasoning_text",
+11 -6
View File
@@ -1059,7 +1059,9 @@ class ResponsesAPIResponse(BaseLiteLLMOpenAIResponseObject):
parallel_tool_calls: Optional[bool] = None
temperature: Optional[float] = None
tool_choice: Optional[ToolChoice] = None
tools: Optional[Union[List[Tool], List[ResponseFunctionToolCall], List[Dict[str, Any]]]] = None
tools: Optional[
Union[List[Tool], List[ResponseFunctionToolCall], List[Dict[str, Any]]]
] = None
top_p: Optional[float] = None
max_output_tokens: Optional[int] = None
previous_response_id: Optional[str] = None
@@ -1231,16 +1233,19 @@ class ContentPartDonePartReasoningText(BaseLiteLLMOpenAIResponseObject):
reasoning: str
PART_UNION_TYPES = Union[
ContentPartDonePartOutputText,
ContentPartDonePartRefusal,
ContentPartDonePartReasoningText,
]
class ContentPartDoneEvent(BaseLiteLLMOpenAIResponseObject):
type: Literal[ResponsesAPIStreamEvents.CONTENT_PART_DONE]
item_id: str
output_index: int
content_index: int
part: Union[
ContentPartDonePartOutputText,
ContentPartDonePartRefusal,
ContentPartDonePartReasoningText,
]
part: PART_UNION_TYPES
class OutputTextDeltaEvent(BaseLiteLLMOpenAIResponseObject):