Skip to content

Commit

Permalink
Add response args in turn.create
Browse files Browse the repository at this point in the history
To support meta-llama/llama-stack-apps#122

* Add response_format for turn.create
  • Loading branch information
hanzlfs authored Dec 18, 2024
1 parent a462997 commit 3f0728b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/llama_stack_client/resources/agents/turn.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import httpx

from ..._types import inference_chat_completion_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
required_args,
Expand Down Expand Up @@ -61,6 +62,7 @@ def create(
session_id: str,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
stream: Literal[False] | NotGiven = NOT_GIVEN,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -89,6 +91,7 @@ def create(
messages: Iterable[turn_create_params.Message],
session_id: str,
stream: Literal[True],
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -118,6 +121,7 @@ def create(
messages: Iterable[turn_create_params.Message],
session_id: str,
stream: bool,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -148,6 +152,7 @@ def create(
session_id: str,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -172,6 +177,7 @@ def create(
"session_id": session_id,
"attachments": attachments,
"stream": stream,
"response_format": response_format,
},
turn_create_params.TurnCreateParams,
),
Expand Down Expand Up @@ -263,6 +269,7 @@ async def create(
session_id: str,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
stream: Literal[False] | NotGiven = NOT_GIVEN,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -291,6 +298,7 @@ async def create(
messages: Iterable[turn_create_params.Message],
session_id: str,
stream: Literal[True],
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -320,6 +328,7 @@ async def create(
messages: Iterable[turn_create_params.Message],
session_id: str,
stream: bool,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -348,6 +357,7 @@ async def create(
agent_id: str,
messages: Iterable[turn_create_params.Message],
session_id: str,
response_format: inference_chat_completion_params.ResponseFormat | NotGiven = NOT_GIVEN,
attachments: Iterable[Attachment] | NotGiven = NOT_GIVEN,
stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
x_llama_stack_provider_data: str | NotGiven = NOT_GIVEN,
Expand All @@ -374,6 +384,7 @@ async def create(
"session_id": session_id,
"attachments": attachments,
"stream": stream,
"response_format": response_format,
},
turn_create_params.TurnCreateParams,
),
Expand Down

0 comments on commit 3f0728b

Please sign in to comment.