mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix: fix linting errors
This commit is contained in:
parent
ca9e2c8c4c
commit
880fd0e736
1 changed files with 9 additions and 1 deletions
|
@ -14,6 +14,7 @@ from litellm.types.llms.openai import ChatCompletionThinkingBlock
|
||||||
from litellm.types.utils import (
|
from litellm.types.utils import (
|
||||||
ChatCompletionDeltaToolCall,
|
ChatCompletionDeltaToolCall,
|
||||||
ChatCompletionMessageToolCall,
|
ChatCompletionMessageToolCall,
|
||||||
|
ChatCompletionRedactedThinkingBlock,
|
||||||
Choices,
|
Choices,
|
||||||
Delta,
|
Delta,
|
||||||
EmbeddingResponse,
|
EmbeddingResponse,
|
||||||
|
@ -486,7 +487,14 @@ def convert_to_model_response_object( # noqa: PLR0915
|
||||||
)
|
)
|
||||||
|
|
||||||
# Handle thinking models that display `thinking_blocks` within `content`
|
# Handle thinking models that display `thinking_blocks` within `content`
|
||||||
thinking_blocks: Optional[List[ChatCompletionThinkingBlock]] = None
|
thinking_blocks: Optional[
|
||||||
|
List[
|
||||||
|
Union[
|
||||||
|
ChatCompletionThinkingBlock,
|
||||||
|
ChatCompletionRedactedThinkingBlock,
|
||||||
|
]
|
||||||
|
]
|
||||||
|
] = None
|
||||||
if "thinking_blocks" in choice["message"]:
|
if "thinking_blocks" in choice["message"]:
|
||||||
thinking_blocks = choice["message"]["thinking_blocks"]
|
thinking_blocks = choice["message"]["thinking_blocks"]
|
||||||
provider_specific_fields["thinking_blocks"] = thinking_blocks
|
provider_specific_fields["thinking_blocks"] = thinking_blocks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue