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
45 changes: 0 additions & 45 deletions src/llama_stack_client/resources/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._utils import (
maybe_transform,
strip_not_given,
async_maybe_transform,
)
from ..._compat import cached_property
Expand Down Expand Up @@ -86,8 +85,6 @@ def create(
self,
*,
agent_config: AgentConfig,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -105,15 +102,6 @@ def create(

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._post(
"/v1/agents",
body=maybe_transform({"agent_config": agent_config}, agent_create_params.AgentCreateParams),
Expand All @@ -127,8 +115,6 @@ def delete(
self,
agent_id: str,
*,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -149,15 +135,6 @@ def delete(
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._delete(
f"/v1/agents/{agent_id}",
options=make_request_options(
Expand Down Expand Up @@ -203,8 +180,6 @@ async def create(
self,
*,
agent_config: AgentConfig,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -222,15 +197,6 @@ async def create(

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._post(
"/v1/agents",
body=await async_maybe_transform({"agent_config": agent_config}, agent_create_params.AgentCreateParams),
Expand All @@ -244,8 +210,6 @@ async def delete(
self,
agent_id: str,
*,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -266,15 +230,6 @@ async def delete(
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._delete(
f"/v1/agents/{agent_id}",
options=make_request_options(
Expand Down
67 changes: 0 additions & 67 deletions src/llama_stack_client/resources/agents/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._utils import (
maybe_transform,
strip_not_given,
async_maybe_transform,
)
from ..._compat import cached_property
Expand Down Expand Up @@ -53,8 +52,6 @@ def create(
agent_id: str,
*,
session_name: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -74,15 +71,6 @@ def create(
"""
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._post(
f"/v1/agents/{agent_id}/session",
body=maybe_transform({"session_name": session_name}, session_create_params.SessionCreateParams),
Expand All @@ -98,8 +86,6 @@ def retrieve(
*,
agent_id: str,
turn_ids: List[str] | NotGiven = NOT_GIVEN,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -121,15 +107,6 @@ def retrieve(
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
if not session_id:
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._get(
f"/v1/agents/{agent_id}/session/{session_id}",
options=make_request_options(
Expand All @@ -147,8 +124,6 @@ def delete(
session_id: str,
*,
agent_id: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -171,15 +146,6 @@ def delete(
if not session_id:
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._delete(
f"/v1/agents/{agent_id}/session/{session_id}",
options=make_request_options(
Expand Down Expand Up @@ -214,8 +180,6 @@ async def create(
agent_id: str,
*,
session_name: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -235,15 +199,6 @@ async def create(
"""
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._post(
f"/v1/agents/{agent_id}/session",
body=await async_maybe_transform({"session_name": session_name}, session_create_params.SessionCreateParams),
Expand All @@ -259,8 +214,6 @@ async def retrieve(
*,
agent_id: str,
turn_ids: List[str] | NotGiven = NOT_GIVEN,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -282,15 +235,6 @@ async def retrieve(
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
if not session_id:
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._get(
f"/v1/agents/{agent_id}/session/{session_id}",
options=make_request_options(
Expand All @@ -310,8 +254,6 @@ async def delete(
session_id: str,
*,
agent_id: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -334,15 +276,6 @@ async def delete(
if not session_id:
raise ValueError(f"Expected a non-empty value for `session_id` but received {session_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._delete(
f"/v1/agents/{agent_id}/session/{session_id}",
options=make_request_options(
Expand Down
23 changes: 0 additions & 23 deletions src/llama_stack_client/resources/agents/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import strip_not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
Expand Down Expand Up @@ -47,8 +46,6 @@ def retrieve(
agent_id: str,
session_id: str,
turn_id: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -74,15 +71,6 @@ def retrieve(
raise ValueError(f"Expected a non-empty value for `turn_id` but received {turn_id!r}")
if not step_id:
raise ValueError(f"Expected a non-empty value for `step_id` but received {step_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return self._get(
f"/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}",
options=make_request_options(
Expand Down Expand Up @@ -119,8 +107,6 @@ async def retrieve(
agent_id: str,
session_id: str,
turn_id: str,
x_llama_stack_client_version: str | 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.
extra_headers: Headers | None = None,
Expand All @@ -146,15 +132,6 @@ async def retrieve(
raise ValueError(f"Expected a non-empty value for `turn_id` but received {turn_id!r}")
if not step_id:
raise ValueError(f"Expected a non-empty value for `step_id` but received {step_id!r}")
extra_headers = {
**strip_not_given(
{
"X-LlamaStack-Client-Version": x_llama_stack_client_version,
"X-LlamaStack-Provider-Data": x_llama_stack_provider_data,
}
),
**(extra_headers or {}),
}
return await self._get(
f"/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}",
options=make_request_options(
Expand Down
Loading