Skip to content

Commit 3879f7a

Browse files
committed
Sync updates from stainless branch: ashwinb/dev
1 parent e72d9e8 commit 3879f7a

File tree

92 files changed

+3142
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3142
-468
lines changed

src/llama_stack_client/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
import typing as _t
4+
35
from . import types
46
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
57
from ._utils import file_from_path
@@ -84,6 +86,9 @@
8486
"DefaultAsyncHttpxClient",
8587
]
8688

89+
if not _t.TYPE_CHECKING:
90+
from ._utils._resources_proxy import resources as resources
91+
8792
_setup_logging()
8893

8994
# Update the __module__ attribute for exported symbols so that

src/llama_stack_client/_utils/_proxy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def __dir__(self) -> Iterable[str]:
4646
@property # type: ignore
4747
@override
4848
def __class__(self) -> type: # pyright: ignore
49-
proxied = self.__get_proxied__()
49+
try:
50+
proxied = self.__get_proxied__()
51+
except Exception:
52+
return type(self)
5053
if issubclass(type(proxied), LazyProxy):
5154
return type(proxied)
5255
return proxied.__class__
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from __future__ import annotations
2+
3+
from typing import Any
4+
from typing_extensions import override
5+
6+
from ._proxy import LazyProxy
7+
8+
9+
class ResourcesProxy(LazyProxy[Any]):
10+
"""A proxy for the `llama_stack_client.resources` module.
11+
12+
This is used so that we can lazily import `llama_stack_client.resources` only when
13+
needed *and* so that users can just import `llama_stack_client` and reference `llama_stack_client.resources`
14+
"""
15+
16+
@override
17+
def __load__(self) -> Any:
18+
import importlib
19+
20+
mod = importlib.import_module("llama_stack_client.resources")
21+
return mod
22+
23+
24+
resources = ResourcesProxy().__as_proxied__()

src/llama_stack_client/resources/agents/agents.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def delete(
124124
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
125125
) -> None:
126126
"""
127-
Delete an agent by its ID.
127+
Delete an agent by its ID and its associated sessions and turns.
128128
129129
Args:
130130
extra_headers: Send extra headers
@@ -225,7 +225,7 @@ async def delete(
225225
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
226226
) -> None:
227227
"""
228-
Delete an agent by its ID.
228+
Delete an agent by its ID and its associated sessions and turns.
229229
230230
Args:
231231
extra_headers: Send extra headers

src/llama_stack_client/resources/agents/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def delete(
137137
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
138138
) -> None:
139139
"""
140-
Delete an agent session by its ID.
140+
Delete an agent session by its ID and its associated turns.
141141
142142
Args:
143143
extra_headers: Send extra headers
@@ -277,7 +277,7 @@ async def delete(
277277
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
278278
) -> None:
279279
"""
280-
Delete an agent session by its ID.
280+
Delete an agent session by its ID and its associated turns.
281281
282282
Args:
283283
extra_headers: Send extra headers

src/llama_stack_client/resources/benchmarks.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def retrieve(
5757
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
5858
) -> Benchmark:
5959
"""
60+
Get a benchmark by its ID.
61+
6062
Args:
6163
extra_headers: Send extra headers
6264
@@ -86,6 +88,7 @@ def list(
8688
extra_body: Body | None = None,
8789
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
8890
) -> BenchmarkListResponse:
91+
"""List all benchmarks."""
8992
return self._get(
9093
"/v1/eval/benchmarks",
9194
options=make_request_options(
@@ -115,7 +118,21 @@ def register(
115118
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
116119
) -> None:
117120
"""
121+
Register a benchmark.
122+
118123
Args:
124+
benchmark_id: The ID of the benchmark to register.
125+
126+
dataset_id: The ID of the dataset to use for the benchmark.
127+
128+
scoring_functions: The scoring functions to use for the benchmark.
129+
130+
metadata: The metadata to use for the benchmark.
131+
132+
provider_benchmark_id: The ID of the provider benchmark to use for the benchmark.
133+
134+
provider_id: The ID of the provider to use for the benchmark.
135+
119136
extra_headers: Send extra headers
120137
121138
extra_query: Add additional query parameters to the request
@@ -177,6 +194,8 @@ async def retrieve(
177194
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
178195
) -> Benchmark:
179196
"""
197+
Get a benchmark by its ID.
198+
180199
Args:
181200
extra_headers: Send extra headers
182201
@@ -206,6 +225,7 @@ async def list(
206225
extra_body: Body | None = None,
207226
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
208227
) -> BenchmarkListResponse:
228+
"""List all benchmarks."""
209229
return await self._get(
210230
"/v1/eval/benchmarks",
211231
options=make_request_options(
@@ -235,7 +255,21 @@ async def register(
235255
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236256
) -> None:
237257
"""
258+
Register a benchmark.
259+
238260
Args:
261+
benchmark_id: The ID of the benchmark to register.
262+
263+
dataset_id: The ID of the dataset to use for the benchmark.
264+
265+
scoring_functions: The scoring functions to use for the benchmark.
266+
267+
metadata: The metadata to use for the benchmark.
268+
269+
provider_benchmark_id: The ID of the provider benchmark to use for the benchmark.
270+
271+
provider_id: The ID of the provider to use for the benchmark.
272+
239273
extra_headers: Send extra headers
240274
241275
extra_query: Add additional query parameters to the request

0 commit comments

Comments
 (0)