mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-23 18:25:22 +00:00
fix mypy linting errors
This commit is contained in:
@@ -36,7 +36,7 @@ class BaseResponsesAPIStreamingIterator:
|
||||
self.logging_obj = logging_obj
|
||||
self.finished = False
|
||||
self.responses_api_provider_config = responses_api_provider_config
|
||||
self.completed_response = None
|
||||
self.completed_response: Optional[ResponsesAPIStreamingResponse] = None
|
||||
self.start_time = datetime.now()
|
||||
|
||||
def _process_chunk(self, chunk):
|
||||
@@ -102,7 +102,6 @@ class ResponsesAPIStreamingIterator(BaseResponsesAPIStreamingIterator):
|
||||
):
|
||||
super().__init__(response, model, responses_api_provider_config, logging_obj)
|
||||
self.stream_iterator = response.aiter_lines()
|
||||
self.completed_response: Optional[ResponsesAPIStreamingResponse] = None
|
||||
|
||||
def __aiter__(self):
|
||||
return self
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, get_type_hints
|
||||
from typing import Any, Dict, cast, get_type_hints
|
||||
|
||||
import litellm
|
||||
from litellm.llms.base_llm.responses.transformation import BaseResponsesAPIConfig
|
||||
@@ -73,7 +73,7 @@ class ResponsesAPIRequestUtils:
|
||||
"""
|
||||
valid_keys = get_type_hints(ResponsesAPIOptionalRequestParams).keys()
|
||||
filtered_params = {k: v for k, v in params.items() if k in valid_keys}
|
||||
return ResponsesAPIOptionalRequestParams(**filtered_params)
|
||||
return cast(ResponsesAPIOptionalRequestParams, filtered_params)
|
||||
|
||||
|
||||
class ResponseAPILoggingUtils:
|
||||
|
||||
@@ -35,7 +35,6 @@ from openai.types.embedding import Embedding as OpenAIEmbedding
|
||||
from openai.types.fine_tuning.fine_tuning_job import FineTuningJob
|
||||
from openai.types.responses.response import (
|
||||
IncompleteDetails,
|
||||
Reasoning,
|
||||
Response,
|
||||
ResponseOutputItem,
|
||||
ResponseTextConfig,
|
||||
|
||||
Reference in New Issue
Block a user