Commit 4a943ad4
Changed files (1)
src
openai
resources
responses
src/openai/resources/responses/responses.py
@@ -943,22 +943,27 @@ class Responses(SyncAPIResource):
def parse(
self,
*,
- input: Union[str, ResponseInputParam],
- model: Union[str, ChatModel],
text_format: type[TextFormatT] | NotGiven = NOT_GIVEN,
- tools: Iterable[ParseableToolParam] | NotGiven = NOT_GIVEN,
+ background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
+ input: Union[str, ResponseInputParam] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
+ max_tool_calls: Optional[int] | NotGiven = NOT_GIVEN,
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
+ model: ResponsesModel | NotGiven = NOT_GIVEN,
parallel_tool_calls: Optional[bool] | NotGiven = NOT_GIVEN,
previous_response_id: Optional[str] | NotGiven = NOT_GIVEN,
+ prompt: Optional[ResponsePromptParam] | NotGiven = NOT_GIVEN,
reasoning: Optional[Reasoning] | NotGiven = NOT_GIVEN,
+ service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] | NotGiven = NOT_GIVEN,
store: Optional[bool] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
text: ResponseTextConfigParam | NotGiven = NOT_GIVEN,
tool_choice: response_create_params.ToolChoice | NotGiven = NOT_GIVEN,
+ tools: Iterable[ParseableToolParam] | NotGiven = NOT_GIVEN,
+ top_logprobs: Optional[int] | NotGiven = NOT_GIVEN,
top_p: Optional[float] | NotGiven = NOT_GIVEN,
truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN,
user: str | NotGiven = NOT_GIVEN,
@@ -991,21 +996,26 @@ class Responses(SyncAPIResource):
"/responses",
body=maybe_transform(
{
- "input": input,
- "model": model,
+ "background": background,
"include": include,
+ "input": input,
"instructions": instructions,
"max_output_tokens": max_output_tokens,
+ "max_tool_calls": max_tool_calls,
"metadata": metadata,
+ "model": model,
"parallel_tool_calls": parallel_tool_calls,
"previous_response_id": previous_response_id,
+ "prompt": prompt,
"reasoning": reasoning,
+ "service_tier": service_tier,
"store": store,
"stream": stream,
"temperature": temperature,
"text": text,
"tool_choice": tool_choice,
"tools": tools,
+ "top_logprobs": top_logprobs,
"top_p": top_p,
"truncation": truncation,
"user": user,
@@ -2202,22 +2212,27 @@ class AsyncResponses(AsyncAPIResource):
async def parse(
self,
*,
- input: Union[str, ResponseInputParam],
- model: Union[str, ChatModel],
text_format: type[TextFormatT] | NotGiven = NOT_GIVEN,
- tools: Iterable[ParseableToolParam] | NotGiven = NOT_GIVEN,
+ background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
+ input: Union[str, ResponseInputParam] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
+ max_tool_calls: Optional[int] | NotGiven = NOT_GIVEN,
metadata: Optional[Metadata] | NotGiven = NOT_GIVEN,
+ model: ResponsesModel | NotGiven = NOT_GIVEN,
parallel_tool_calls: Optional[bool] | NotGiven = NOT_GIVEN,
previous_response_id: Optional[str] | NotGiven = NOT_GIVEN,
+ prompt: Optional[ResponsePromptParam] | NotGiven = NOT_GIVEN,
reasoning: Optional[Reasoning] | NotGiven = NOT_GIVEN,
+ service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] | NotGiven = NOT_GIVEN,
store: Optional[bool] | NotGiven = NOT_GIVEN,
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
temperature: Optional[float] | NotGiven = NOT_GIVEN,
text: ResponseTextConfigParam | NotGiven = NOT_GIVEN,
tool_choice: response_create_params.ToolChoice | NotGiven = NOT_GIVEN,
+ tools: Iterable[ParseableToolParam] | NotGiven = NOT_GIVEN,
+ top_logprobs: Optional[int] | NotGiven = NOT_GIVEN,
top_p: Optional[float] | NotGiven = NOT_GIVEN,
truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN,
user: str | NotGiven = NOT_GIVEN,
@@ -2250,21 +2265,26 @@ class AsyncResponses(AsyncAPIResource):
"/responses",
body=maybe_transform(
{
- "input": input,
- "model": model,
+ "background": background,
"include": include,
+ "input": input,
"instructions": instructions,
"max_output_tokens": max_output_tokens,
+ "max_tool_calls": max_tool_calls,
"metadata": metadata,
+ "model": model,
"parallel_tool_calls": parallel_tool_calls,
"previous_response_id": previous_response_id,
+ "prompt": prompt,
"reasoning": reasoning,
+ "service_tier": service_tier,
"store": store,
"stream": stream,
"temperature": temperature,
"text": text,
"tool_choice": tool_choice,
"tools": tools,
+ "top_logprobs": top_logprobs,
"top_p": top_p,
"truncation": truncation,
"user": user,