Skip to content

Commit

Permalink
Sync updates from stainless branch: ashwinb/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinb committed Jan 9, 2025
1 parent eedbf51 commit 30df55b
Show file tree
Hide file tree
Showing 116 changed files with 1,469 additions and 348 deletions.
7 changes: 4 additions & 3 deletions src/llama_stack_client/_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations

import json
from __future__ import annotations

import os
from typing import Any, Union, Mapping
from typing_extensions import Self, override
Expand Down Expand Up @@ -130,7 +131,7 @@ def __init__(
if provider_data is not None:
if default_headers is None:
default_headers = {}
default_headers["X-LlamaStack-ProviderData"] = json.dumps(provider_data)
default_headers["X-LlamaStack-Provider-Data"] = json.dumps(provider_data)

super().__init__(
version=__version__,
Expand Down Expand Up @@ -327,7 +328,7 @@ def __init__(
if provider_data is not None:
if default_headers is None:
default_headers = {}
default_headers["X-LlamaStack-ProviderData"] = json.dumps(provider_data)
default_headers["X-LlamaStack-Provider-Data"] = json.dumps(provider_data)

super().__init__(
version=__version__,
Expand Down
32 changes: 28 additions & 4 deletions src/llama_stack_client/resources/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ 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.
Expand All @@ -105,7 +106,12 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -121,6 +127,7 @@ 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.
Expand All @@ -141,7 +148,12 @@ def delete(
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down Expand Up @@ -190,6 +202,7 @@ 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.
Expand All @@ -209,7 +222,12 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -225,6 +243,7 @@ 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.
Expand All @@ -245,7 +264,12 @@ async def delete(
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down
48 changes: 42 additions & 6 deletions src/llama_stack_client/resources/agents/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ 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.
Expand All @@ -72,7 +73,12 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -96,6 +102,7 @@ def retrieve(
agent_id: str,
session_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.
Expand All @@ -115,7 +122,12 @@ def retrieve(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -142,6 +154,7 @@ def delete(
*,
agent_id: str,
session_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.
Expand All @@ -162,7 +175,12 @@ def delete(
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down Expand Up @@ -206,6 +224,7 @@ 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.
Expand All @@ -225,7 +244,12 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -249,6 +273,7 @@ async def retrieve(
agent_id: str,
session_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.
Expand All @@ -268,7 +293,12 @@ async def retrieve(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand All @@ -295,6 +325,7 @@ async def delete(
*,
agent_id: str,
session_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.
Expand All @@ -315,7 +346,12 @@ async def delete(
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down
16 changes: 14 additions & 2 deletions src/llama_stack_client/resources/agents/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def retrieve(
session_id: str,
step_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.
Expand All @@ -71,7 +72,12 @@ def retrieve(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down Expand Up @@ -122,6 +128,7 @@ async def retrieve(
session_id: str,
step_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.
Expand All @@ -141,7 +148,12 @@ async def retrieve(
timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {
**strip_not_given({"X-LlamaStack-ProviderData": x_llama_stack_provider_data}),
**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(
Expand Down
Loading

0 comments on commit 30df55b

Please sign in to comment.