mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix test
This commit is contained in:
parent
ec12f55c21
commit
97626f2d02
2 changed files with 8 additions and 10 deletions
|
|
@ -44,7 +44,7 @@ from openai.types.responses.response import (
|
|||
# Handle OpenAI SDK version compatibility for Text type
|
||||
try:
|
||||
# fmt: off
|
||||
from openai.types.responses.response_create_params import ( # type: ignore[attr-defined]
|
||||
from openai.types.responses.response_create_params import (
|
||||
Text as ResponseText, # type: ignore[attr-defined]
|
||||
)
|
||||
|
||||
|
|
@ -1053,11 +1053,11 @@ class ResponsesAPIResponse(BaseLiteLLMOpenAIResponseObject):
|
|||
List[Union[ResponseOutputItem, Dict]],
|
||||
List[Union[GenericResponseOutputItem, OutputFunctionToolCall]],
|
||||
]
|
||||
parallel_tool_calls: bool
|
||||
parallel_tool_calls: Optional[bool] = None
|
||||
temperature: Optional[float] = None
|
||||
tool_choice: ToolChoice
|
||||
tools: Union[List[Tool], List[ResponseFunctionToolCall], List[Dict[str, Any]]]
|
||||
top_p: Optional[float]
|
||||
tool_choice: Optional[ToolChoice] = 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
|
||||
reasoning: Optional[Reasoning] = None
|
||||
|
|
|
|||
|
|
@ -57,9 +57,6 @@ def validate_responses_api_response(response, final_chunk: bool = False):
|
|||
assert "output" in response and isinstance(
|
||||
response["output"], list
|
||||
), "Response should have a list 'output' field"
|
||||
assert "parallel_tool_calls" in response and isinstance(
|
||||
response["parallel_tool_calls"], bool
|
||||
), "Response should have a boolean 'parallel_tool_calls' field"
|
||||
|
||||
# Optional fields with their expected types
|
||||
optional_fields = {
|
||||
|
|
@ -69,9 +66,10 @@ def validate_responses_api_response(response, final_chunk: bool = False):
|
|||
"metadata": dict,
|
||||
"model": str,
|
||||
"object": str,
|
||||
"parallel_tool_calls": (bool, type(None)),
|
||||
"temperature": (int, float, type(None)),
|
||||
"tool_choice": (dict, str),
|
||||
"tools": list,
|
||||
"tool_choice": (dict, str, type(None)),
|
||||
"tools": (list, type(None)),
|
||||
"top_p": (int, float, type(None)),
|
||||
"max_output_tokens": (int, type(None)),
|
||||
"previous_response_id": (str, type(None)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue