Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/llama_stack_client/lib/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from llama_stack_client.types.agent_create_params import AgentConfig
from llama_stack_client.types.agents.turn import CompletionMessage, Turn
from llama_stack_client.types.agents.turn_create_params import Document, Toolgroup
from llama_stack_client.types.agents.turn_create_response import AgentTurnResponseStreamChunk
from llama_stack_client.types.agents.agent_turn_response_stream_chunk import AgentTurnResponseStreamChunk
from llama_stack_client.types.shared.tool_call import ToolCall
from llama_stack_client.types.shared_params.agent_config import ToolConfig
from llama_stack_client.types.shared_params.response_format import ResponseFormat
Expand Down
37 changes: 15 additions & 22 deletions src/llama_stack_client/resources/agents/turn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Union, Iterable
from typing import List, Iterable
from typing_extensions import Literal, overload

import httpx
Expand All @@ -26,7 +26,6 @@
from ...types.agents import turn_create_params, turn_resume_params
from ...types.agents.turn import Turn
from ...types.tool_response_param import ToolResponseParam
from ...types.shared_params.tool_response_message import ToolResponseMessage
from ...types.agents.agent_turn_response_stream_chunk import AgentTurnResponseStreamChunk

__all__ = ["TurnResource", "AsyncTurnResource"]
Expand Down Expand Up @@ -275,7 +274,7 @@ def resume(
*,
agent_id: str,
session_id: str,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
stream: Literal[False] | 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 @@ -292,8 +291,7 @@ def resume(
ready.

Args:
tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

stream: Whether to stream the response.

Expand All @@ -315,7 +313,7 @@ def resume(
agent_id: str,
session_id: str,
stream: Literal[True],
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
# 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.
extra_headers: Headers | None = None,
Expand All @@ -333,8 +331,7 @@ def resume(
Args:
stream: Whether to stream the response.

tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

extra_headers: Send extra headers

Expand All @@ -354,7 +351,7 @@ def resume(
agent_id: str,
session_id: str,
stream: bool,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
# 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.
extra_headers: Headers | None = None,
Expand All @@ -372,8 +369,7 @@ def resume(
Args:
stream: Whether to stream the response.

tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

extra_headers: Send extra headers

Expand All @@ -392,7 +388,7 @@ def resume(
*,
agent_id: str,
session_id: str,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
stream: Literal[False] | Literal[True] | 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 @@ -668,7 +664,7 @@ async def resume(
*,
agent_id: str,
session_id: str,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
stream: Literal[False] | 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 @@ -685,8 +681,7 @@ async def resume(
ready.

Args:
tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

stream: Whether to stream the response.

Expand All @@ -708,7 +703,7 @@ async def resume(
agent_id: str,
session_id: str,
stream: Literal[True],
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
# 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.
extra_headers: Headers | None = None,
Expand All @@ -726,8 +721,7 @@ async def resume(
Args:
stream: Whether to stream the response.

tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

extra_headers: Send extra headers

Expand All @@ -747,7 +741,7 @@ async def resume(
agent_id: str,
session_id: str,
stream: bool,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
# 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.
extra_headers: Headers | None = None,
Expand All @@ -765,8 +759,7 @@ async def resume(
Args:
stream: Whether to stream the response.

tool_responses: The tool call responses to resume the turn with. NOTE: ToolResponseMessage will
be deprecated. Use ToolResponse.
tool_responses: The tool call responses to resume the turn with.

extra_headers: Send extra headers

Expand All @@ -785,7 +778,7 @@ async def resume(
*,
agent_id: str,
session_id: str,
tool_responses: Union[Iterable[ToolResponseParam], Iterable[ToolResponseMessage]],
tool_responses: Iterable[ToolResponseParam],
stream: Literal[False] | Literal[True] | 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
Loading