From e6a964e9970e5d4bbd9f3bb9dae959ce6488b3bf Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 001/102] chore(internal): version bump
From eee6f0b5cd146fc962d13da371e09e5abd66f05e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 002/102] chore(internal): version bump
From 072269f0c2421313a1ba7a9feb372a72cc5f5f0f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 003/102] chore(internal): version bump
From 590de6d2ac748199b489c00fe8f79d9f8111a283 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 004/102] chore(internal): version bump
From 8a1efade982126d1742c912069321ce7bd267bd8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 005/102] chore(ci): only run for pushes and fork pull requests
From 5d6ccb56adf0cdeafd2d027ba2f897fd2f5c7070 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 02:24:02 +0000
Subject: [PATCH 006/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
README.md | 3 +++
scripts/utils/upload-artifact.sh | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b3b5e583..45f2163e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.4"
+ ".": "0.2.13"
}
diff --git a/README.md b/README.md
index 23e32f01..bbd86e1c 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,9 @@ You can find more example apps with client SDKs to talk with the Llama Stack ser
pip install llama-stack-client
```
+> [!NOTE]
+> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install llama_stack_client`
+
## Usage
The full API of this library can be found in [api.md](api.md). You may find basic client examples in our [llama-stack-apps](https://github.com/meta-llama/llama-stack-apps/tree/main) repo.
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index f6c7413b..f9bfddee 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: pip install --pre 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
From 4368fbd1f733cfda7a2d4273f0c983e44be63fe1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:07:38 +0000
Subject: [PATCH 007/102] fix(ci): correct conditional
---
.github/workflows/ci.yml | 82 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 .github/workflows/ci.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..181b5cc1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,82 @@
+name: CI
+on:
+ push:
+ branches-ignore:
+ - 'generated'
+ - 'codegen/**'
+ - 'integrated/**'
+ - 'stl-preview-head/**'
+ - 'stl-preview-base/**'
+ pull_request:
+ branches-ignore:
+ - 'stl-preview-head/**'
+ - 'stl-preview-base/**'
+
+jobs:
+ lint:
+ timeout-minutes: 10
+ name: lint
+ runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Install dependencies
+ run: rye sync --all-features
+
+ - name: Run lints
+ run: ./scripts/lint
+
+ upload:
+ if: github.repository == 'stainless-sdks/llama-stack-client-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
+ timeout-minutes: 10
+ name: upload
+ permissions:
+ contents: read
+ id-token: write
+ runs-on: depot-ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Get GitHub OIDC Token
+ id: github-oidc
+ uses: actions/github-script@v6
+ with:
+ script: core.setOutput('github_token', await core.getIDToken());
+
+ - name: Upload tarball
+ env:
+ URL: https://pkg.stainless.com/s
+ AUTH: ${{ steps.github-oidc.outputs.github_token }}
+ SHA: ${{ github.sha }}
+ run: ./scripts/utils/upload-artifact.sh
+
+ test:
+ timeout-minutes: 10
+ name: test
+ runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Bootstrap
+ run: ./scripts/bootstrap
+
+ - name: Run tests
+ run: ./scripts/test
From 5febc136956ce6ac5af8e638a6fa430a9d0f3dc3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 2 Jul 2025 05:21:21 +0000
Subject: [PATCH 008/102] chore(ci): change upload type
---
.github/workflows/ci.yml | 18 ++++++++++++++++--
scripts/utils/upload-artifact.sh | 12 +++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 181b5cc1..ee914c4e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,10 +35,10 @@ jobs:
- name: Run lints
run: ./scripts/lint
- upload:
+ build:
if: github.repository == 'stainless-sdks/llama-stack-client-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
- name: upload
+ name: build
permissions:
contents: read
id-token: write
@@ -46,6 +46,20 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Install dependencies
+ run: rye sync --all-features
+
+ - name: Run build
+ run: rye build
+
- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index f9bfddee..8593351a 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -exuo pipefail
-RESPONSE=$(curl -X POST "$URL" \
+FILENAME=$(basename dist/*.whl)
+
+RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \
-H "Authorization: Bearer $AUTH" \
-H "Content-Type: application/json")
@@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi
-UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
- -H "Content-Type: application/gzip" \
- --data-binary @- "$SIGNED_URL" 2>&1)
+UPLOAD_RESPONSE=$(curl -v -X PUT \
+ -H "Content-Type: binary/octet-stream" \
+ --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1)
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA/$FILENAME'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
From aa45ba35f7107e6278c45134f6130ffaf99eb20e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 8 Jul 2025 02:12:32 +0000
Subject: [PATCH 009/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
requirements-dev.lock | 2 +-
requirements.lock | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 45f2163e..9007059e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.13"
+ ".": "0.2.14"
}
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 869ac57f..1e9ccc5b 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -56,7 +56,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via llama-stack-client
# via respx
-httpx-aiohttp==0.1.6
+httpx-aiohttp==0.1.8
# via llama-stack-client
idna==3.4
# via anyio
diff --git a/requirements.lock b/requirements.lock
index ac621298..de13db42 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -43,7 +43,7 @@ httpcore==1.0.2
httpx==0.28.1
# via httpx-aiohttp
# via llama-stack-client
-httpx-aiohttp==0.1.6
+httpx-aiohttp==0.1.8
# via llama-stack-client
idna==3.4
# via anyio
From 0568d6d078eab8f65ac191218d6467df9bfa7901 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 9 Jul 2025 02:28:56 +0000
Subject: [PATCH 010/102] chore(internal): bump pinned h11 dep
---
requirements-dev.lock | 4 ++--
requirements.lock | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 1e9ccc5b..e1a5175a 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -48,9 +48,9 @@ filelock==3.12.4
frozenlist==1.6.2
# via aiohttp
# via aiosignal
-h11==0.14.0
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
diff --git a/requirements.lock b/requirements.lock
index de13db42..098354a7 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -36,9 +36,9 @@ exceptiongroup==1.2.2
frozenlist==1.6.2
# via aiohttp
# via aiosignal
-h11==0.14.0
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
From d1a4e40ba6a6d1b0ecf7b84cff55a79a6c00b925 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 9 Jul 2025 02:47:48 +0000
Subject: [PATCH 011/102] chore(package): mark python 3.13 as supported
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index 1e3ddaf9..71c7cb78 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -27,6 +27,7 @@ classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
From 8b7e9ba42dbafb89d765f870d7874c86f47b2e7b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 10 Jul 2025 02:44:02 +0000
Subject: [PATCH 012/102] fix(parsing): correctly handle nested discriminated
unions
---
src/llama_stack_client/_models.py | 13 +++++----
tests/test_models.py | 45 +++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index 4f214980..528d5680 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -2,9 +2,10 @@
import os
import inspect
-from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
+from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
from datetime import date, datetime
from typing_extensions import (
+ List,
Unpack,
Literal,
ClassVar,
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
if type_ is None:
raise RuntimeError(f"Unexpected field type is None for {key}")
- return construct_type(value=value, type_=type_)
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
def is_basemodel(type_: type) -> bool:
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
return cast(_T, construct_type(value=value, type_=type_))
-def construct_type(*, value: object, type_: object) -> object:
+def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
"""Loose coercion to the expected type with construction of nested values.
If the given value does not match the expected type then it is returned as-is.
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
- if is_annotated_type(type_):
- meta: tuple[Any, ...] = get_args(type_)[1:]
+ if metadata is not None:
+ meta: tuple[Any, ...] = tuple(metadata)
+ elif is_annotated_type(type_):
+ meta = get_args(type_)[1:]
type_ = extract_type_arg(type_, 0)
else:
meta = tuple()
diff --git a/tests/test_models.py b/tests/test_models.py
index a27dfa46..493215f0 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -889,3 +889,48 @@ class ModelB(BaseModel):
)
assert isinstance(m, ModelB)
+
+
+def test_nested_discriminated_union() -> None:
+ class InnerType1(BaseModel):
+ type: Literal["type_1"]
+
+ class InnerModel(BaseModel):
+ inner_value: str
+
+ class InnerType2(BaseModel):
+ type: Literal["type_2"]
+ some_inner_model: InnerModel
+
+ class Type1(BaseModel):
+ base_type: Literal["base_type_1"]
+ value: Annotated[
+ Union[
+ InnerType1,
+ InnerType2,
+ ],
+ PropertyInfo(discriminator="type"),
+ ]
+
+ class Type2(BaseModel):
+ base_type: Literal["base_type_2"]
+
+ T = Annotated[
+ Union[
+ Type1,
+ Type2,
+ ],
+ PropertyInfo(discriminator="base_type"),
+ ]
+
+ model = construct_type(
+ type_=T,
+ value={
+ "base_type": "base_type_1",
+ "value": {
+ "type": "type_2",
+ },
+ },
+ )
+ assert isinstance(model, Type1)
+ assert isinstance(model.value, InnerType2)
From 193fb64864ce57e9a488d9ee874cededeaad1eae Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:01:47 +0000
Subject: [PATCH 013/102] chore(readme): fix version rendering on pypi
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index bbd86e1c..1ccdb98b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# Llama Stack Client Python API library
+
[](https://pypi.org/project/llama_stack_client/) [](https://pypi.org/project/llama-stack-client/)
[](https://discord.gg/llama-stack)
From c6e0026218d4fde46e23663b55384bdf417fbcbf Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:06:49 +0000
Subject: [PATCH 014/102] fix(client): don't send Content-Type header on GET
requests
---
pyproject.toml | 2 --
src/llama_stack_client/_base_client.py | 11 +++++++++--
tests/test_client.py | 4 ++--
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 71c7cb78..245181b1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,8 +53,6 @@ dev = [
Homepage = "https://github.com/llamastack/llama-stack-client-python"
Repository = "https://github.com/llamastack/llama-stack-client-python"
-
-
[build-system]
requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
diff --git a/src/llama_stack_client/_base_client.py b/src/llama_stack_client/_base_client.py
index a0bbc468..4224d36a 100644
--- a/src/llama_stack_client/_base_client.py
+++ b/src/llama_stack_client/_base_client.py
@@ -529,6 +529,15 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
+ is_body_allowed = options.method.lower() != "get"
+
+ if is_body_allowed:
+ kwargs["json"] = json_data if is_given(json_data) else None
+ kwargs["files"] = files
+ else:
+ headers.pop("Content-Type", None)
+ kwargs.pop("data", None)
+
# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
@@ -540,8 +549,6 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
- json=json_data if is_given(json_data) else None,
- files=files,
**kwargs,
)
diff --git a/tests/test_client.py b/tests/test_client.py
index bc42682c..14889fae 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -431,7 +431,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, client: LlamaStackClient) -> None:
request = client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
@@ -1245,7 +1245,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, async_client: AsyncLlamaStackClient) -> None:
request = async_client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
From a93aea10aead2e209fc0608e2bb985bb1d933f63 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 15:36:56 +0000
Subject: [PATCH 015/102] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index fe4493c0..7a6a579a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: e1d37a77a6e8ca86fb6bccb4b0f172c9
+config_hash: d1c36a7d3bd810e6c309f861fa0263b1
From c27a7015e1627582e00de6c4f6cbc9df9da99c54 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 16 Jul 2025 02:08:10 +0000
Subject: [PATCH 016/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 9007059e..faf409dd 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.14"
+ ".": "0.2.15"
}
From 0a8544e75770431807e032a59af736134b1105f6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 16 Jul 2025 13:05:02 +0000
Subject: [PATCH 017/102] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 7a6a579a..71d6c6e2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: d1c36a7d3bd810e6c309f861fa0263b1
+config_hash: a2760f6aac3d1577995504a4d154a5a2
From 264f24c9c564a0a5ea862418bfebb6c3cad01cf0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 22 Jul 2025 02:08:15 +0000
Subject: [PATCH 018/102] fix(parsing): ignore empty metadata
---
src/llama_stack_client/_models.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index 528d5680..ffcbf67b 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -439,7 +439,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
- if metadata is not None:
+ if metadata is not None and len(metadata) > 0:
meta: tuple[Any, ...] = tuple(metadata)
elif is_annotated_type(type_):
meta = get_args(type_)[1:]
From d54c5db3df7b6e5dca66e8e7c855998c67d03250 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 23 Jul 2025 02:11:08 +0000
Subject: [PATCH 019/102] fix(parsing): parse extra field types
---
src/llama_stack_client/_models.py | 25 +++++++++++++++++++++++--
tests/test_models.py | 29 ++++++++++++++++++++++++++++-
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index ffcbf67b..b8387ce9 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -208,14 +208,18 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride]
else:
fields_values[name] = field_get_default(field)
+ extra_field_type = _get_extra_fields_type(__cls)
+
_extra = {}
for key, value in values.items():
if key not in model_fields:
+ parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
+
if PYDANTIC_V2:
- _extra[key] = value
+ _extra[key] = parsed
else:
_fields_set.add(key)
- fields_values[key] = value
+ fields_values[key] = parsed
object.__setattr__(m, "__dict__", fields_values)
@@ -370,6 +374,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
+def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
+ if not PYDANTIC_V2:
+ # TODO
+ return None
+
+ schema = cls.__pydantic_core_schema__
+ if schema["type"] == "model":
+ fields = schema["schema"]
+ if fields["type"] == "model-fields":
+ extras = fields.get("extras_schema")
+ if extras and "cls" in extras:
+ # mypy can't narrow the type
+ return extras["cls"] # type: ignore[no-any-return]
+
+ return None
+
+
def is_basemodel(type_: type) -> bool:
"""Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`"""
if is_union(type_):
diff --git a/tests/test_models.py b/tests/test_models.py
index 493215f0..c5135234 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -1,5 +1,5 @@
import json
-from typing import Any, Dict, List, Union, Optional, cast
+from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast
from datetime import datetime, timezone
from typing_extensions import Literal, Annotated, TypeAliasType
@@ -934,3 +934,30 @@ class Type2(BaseModel):
)
assert isinstance(model, Type1)
assert isinstance(model.value, InnerType2)
+
+
+@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now")
+def test_extra_properties() -> None:
+ class Item(BaseModel):
+ prop: int
+
+ class Model(BaseModel):
+ __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ other: str
+
+ if TYPE_CHECKING:
+
+ def __getattr__(self, attr: str) -> Item: ...
+
+ model = construct_type(
+ type_=Model,
+ value={
+ "a": {"prop": 1},
+ "other": "foo",
+ },
+ )
+ assert isinstance(model, Model)
+ assert model.a.prop == 1
+ assert isinstance(model.a, Item)
+ assert model.other == "foo"
From a201e22e2bad1b2290092784d4e2255eaaf73758 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 00:56:29 +0000
Subject: [PATCH 020/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
src/llama_stack_client/resources/inference.py | 91 +-
tests/api_resources/test_inference.py | 1032 +++++++++--------
3 files changed, 615 insertions(+), 510 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 71d6c6e2..eb0c1fdc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: a2760f6aac3d1577995504a4d154a5a2
+config_hash: da8da64a2803645fa2115ed0b2d44784
diff --git a/src/llama_stack_client/resources/inference.py b/src/llama_stack_client/resources/inference.py
index 84a8dd96..6a93f0f4 100644
--- a/src/llama_stack_client/resources/inference.py
+++ b/src/llama_stack_client/resources/inference.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import List, Union, Iterable
from typing_extensions import Literal, overload
@@ -183,6 +184,7 @@ def batch_completion(
cast_to=BatchCompletion,
)
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -251,6 +253,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -319,6 +322,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -387,6 +391,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
def chat_completion(
self,
@@ -437,6 +442,7 @@ def chat_completion(
stream_cls=Stream[ChatCompletionResponseStreamChunk],
)
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -483,6 +489,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -529,6 +536,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -575,6 +583,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@required_args(["content", "model_id"], ["content", "model_id", "stream"])
def completion(
self,
@@ -617,6 +626,7 @@ def completion(
stream_cls=Stream[CompletionResponse],
)
+ @typing_extensions.deprecated("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.")
def embeddings(
self,
*,
@@ -821,6 +831,7 @@ async def batch_completion(
cast_to=BatchCompletion,
)
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -889,6 +900,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -957,6 +969,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -1025,6 +1038,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
async def chat_completion(
self,
@@ -1075,6 +1089,7 @@ async def chat_completion(
stream_cls=AsyncStream[ChatCompletionResponseStreamChunk],
)
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1121,6 +1136,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1167,6 +1183,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1213,6 +1230,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@required_args(["content", "model_id"], ["content", "model_id", "stream"])
async def completion(
self,
@@ -1255,6 +1273,7 @@ async def completion(
stream_cls=AsyncStream[CompletionResponse],
)
+ @typing_extensions.deprecated("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.")
async def embeddings(
self,
*,
@@ -1327,14 +1346,20 @@ def __init__(self, inference: InferenceResource) -> None:
self.batch_completion = to_raw_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = to_raw_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = to_raw_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = to_raw_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1348,14 +1373,20 @@ def __init__(self, inference: AsyncInferenceResource) -> None:
self.batch_completion = async_to_raw_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = async_to_raw_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = async_to_raw_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = async_to_raw_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1369,14 +1400,20 @@ def __init__(self, inference: InferenceResource) -> None:
self.batch_completion = to_streamed_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = to_streamed_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = to_streamed_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = to_streamed_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1390,12 +1427,18 @@ def __init__(self, inference: AsyncInferenceResource) -> None:
self.batch_completion = async_to_streamed_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = async_to_streamed_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = async_to_streamed_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = async_to_streamed_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/tests/api_resources/test_inference.py b/tests/api_resources/test_inference.py
index 21967c9a..d5ef46d1 100644
--- a/tests/api_resources/test_inference.py
+++ b/tests/api_resources/test_inference.py
@@ -16,6 +16,8 @@
)
from llama_stack_client.types.shared import BatchCompletion, ChatCompletionResponse
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -178,75 +180,80 @@ def test_streaming_response_batch_completion(self, client: LlamaStackClient) ->
@parametrize
def test_method_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
def test_method_chat_completion_with_all_params_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
def test_raw_response_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -255,96 +262,102 @@ def test_raw_response_chat_completion_overload_1(self, client: LlamaStackClient)
@parametrize
def test_streaming_response_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(ChatCompletionResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(ChatCompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
+
inference_stream.response.close()
@parametrize
def test_method_chat_completion_with_all_params_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
inference_stream.response.close()
@parametrize
def test_raw_response_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = response.parse()
@@ -352,58 +365,64 @@ def test_raw_response_chat_completion_overload_2(self, client: LlamaStackClient)
@parametrize
def test_streaming_response_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stream = response.parse()
- stream.close()
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_completion_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
def test_method_completion_with_all_params_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.completion(
- content="string",
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
def test_raw_response_completion_overload_1(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -412,54 +431,60 @@ def test_raw_response_completion_overload_1(self, client: LlamaStackClient) -> N
@parametrize
def test_streaming_response_completion_overload_1(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(CompletionResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(CompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_completion_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
+
inference_stream.response.close()
@parametrize
def test_method_completion_with_all_params_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ )
+
inference_stream.response.close()
@parametrize
def test_raw_response_completion_overload_2(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = response.parse()
@@ -467,44 +492,50 @@ def test_raw_response_completion_overload_2(self, client: LlamaStackClient) -> N
@parametrize
def test_streaming_response_completion_overload_2(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stream = response.parse()
- stream.close()
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_embeddings(self, client: LlamaStackClient) -> None:
- inference = client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
def test_method_embeddings_with_all_params(self, client: LlamaStackClient) -> None:
- inference = client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- output_dimension=0,
- task_type="query",
- text_truncation="none",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ output_dimension=0,
+ task_type="query",
+ text_truncation="none",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
def test_raw_response_embeddings(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -513,15 +544,16 @@ def test_raw_response_embeddings(self, client: LlamaStackClient) -> None:
@parametrize
def test_streaming_response_embeddings(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.embeddings(
- contents=["string"],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(EmbeddingsResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(EmbeddingsResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -687,75 +719,80 @@ async def test_streaming_response_batch_completion(self, async_client: AsyncLlam
@parametrize
async def test_method_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
async def test_method_chat_completion_with_all_params_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
async def test_raw_response_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -764,96 +801,102 @@ async def test_raw_response_chat_completion_overload_1(self, async_client: Async
@parametrize
async def test_streaming_response_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = await response.parse()
- assert_matches_type(ChatCompletionResponse, inference, path=["response"])
+ inference = await response.parse()
+ assert_matches_type(ChatCompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_method_chat_completion_with_all_params_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_raw_response_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = await response.parse()
@@ -861,58 +904,64 @@ async def test_raw_response_chat_completion_overload_2(self, async_client: Async
@parametrize
async def test_streaming_response_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stream = await response.parse()
- await stream.close()
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
async def test_method_completion_with_all_params_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
async def test_raw_response_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -921,54 +970,60 @@ async def test_raw_response_completion_overload_1(self, async_client: AsyncLlama
@parametrize
async def test_streaming_response_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = await response.parse()
- assert_matches_type(CompletionResponse, inference, path=["response"])
+ inference = await response.parse()
+ assert_matches_type(CompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_method_completion_with_all_params_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_raw_response_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = await response.parse()
@@ -976,44 +1031,50 @@ async def test_raw_response_completion_overload_2(self, async_client: AsyncLlama
@parametrize
async def test_streaming_response_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stream = await response.parse()
- await stream.close()
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
async def test_method_embeddings_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- output_dimension=0,
- task_type="query",
- text_truncation="none",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ output_dimension=0,
+ task_type="query",
+ text_truncation="none",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
async def test_raw_response_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1022,14 +1083,15 @@ async def test_raw_response_embeddings(self, async_client: AsyncLlamaStackClient
@parametrize
async def test_streaming_response_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.embeddings(
- contents=["string"],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- inference = await response.parse()
- assert_matches_type(EmbeddingsResponse, inference, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ inference = await response.parse()
+ assert_matches_type(EmbeddingsResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
From ac4614a70aa632a7bc55037aa777f0ab40ea908b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 00:58:02 +0000
Subject: [PATCH 021/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
src/llama_stack_client/resources/inference.py | 32 ++++++++++++++-----
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index eb0c1fdc..96acf1e7 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: da8da64a2803645fa2115ed0b2d44784
+config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/inference.py b/src/llama_stack_client/resources/inference.py
index 6a93f0f4..7aec2dbd 100644
--- a/src/llama_stack_client/resources/inference.py
+++ b/src/llama_stack_client/resources/inference.py
@@ -184,7 +184,9 @@ def batch_completion(
cast_to=BatchCompletion,
)
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -253,7 +255,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -322,7 +326,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -391,7 +397,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
def chat_completion(
self,
@@ -831,7 +839,9 @@ async def batch_completion(
cast_to=BatchCompletion,
)
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -900,7 +910,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -969,7 +981,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -1038,7 +1052,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
async def chat_completion(
self,
From 1dd3e5310f668e81d246f929e2bd6b216a4ac9ad Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 03:41:31 +0000
Subject: [PATCH 022/102] chore(project): add settings file for vscode
---
.gitignore | 1 -
.vscode/settings.json | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 .vscode/settings.json
diff --git a/.gitignore b/.gitignore
index 87797408..95ceb189 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
.prism.log
-.vscode
_dev
__pycache__
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..5b010307
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "python.analysis.importFormat": "relative",
+}
From 4a54d613ee0a7ff7a561bc41db626aaea3c00096 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 18:38:36 +0000
Subject: [PATCH 023/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +--
.../resources/vector_dbs.py | 8 +++++
.../resources/vector_stores/vector_stores.py | 8 -----
.../post_training/job_artifacts_response.py | 31 +++++++++++++++++--
.../post_training/job_status_response.py | 28 +++++++++++++++--
.../types/shared/query_config.py | 2 +-
.../types/shared_params/query_config.py | 2 +-
.../types/vector_db_list_response.py | 2 ++
.../types/vector_db_register_params.py | 3 ++
.../types/vector_db_register_response.py | 2 ++
.../types/vector_db_retrieve_response.py | 2 ++
.../types/vector_store_create_params.py | 3 --
tests/api_resources/test_vector_dbs.py | 2 ++
tests/api_resources/test_vector_stores.py | 2 --
.../tool_runtime/test_rag_tool.py | 4 +--
15 files changed, 79 insertions(+), 24 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 96acf1e7..f45e5f38 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
-openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-001fdbbf185bc9fc18521e55461f50dbd77b2f6bdf4b9565fe18a5ade77004dd.yml
+openapi_spec_hash: f410f7b9ebf460becbfc1427256f68e8
config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/vector_dbs.py b/src/llama_stack_client/resources/vector_dbs.py
index 3838c38e..ab62fa6a 100644
--- a/src/llama_stack_client/resources/vector_dbs.py
+++ b/src/llama_stack_client/resources/vector_dbs.py
@@ -110,6 +110,7 @@ def register(
embedding_dimension: int | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
provider_vector_db_id: str | NotGiven = NOT_GIVEN,
+ vector_db_name: 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,
@@ -131,6 +132,8 @@ def register(
provider_vector_db_id: The identifier of the vector database in the provider.
+ vector_db_name: The name of the vector database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -148,6 +151,7 @@ def register(
"embedding_dimension": embedding_dimension,
"provider_id": provider_id,
"provider_vector_db_id": provider_vector_db_id,
+ "vector_db_name": vector_db_name,
},
vector_db_register_params.VectorDBRegisterParams,
),
@@ -276,6 +280,7 @@ async def register(
embedding_dimension: int | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
provider_vector_db_id: str | NotGiven = NOT_GIVEN,
+ vector_db_name: 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,
@@ -297,6 +302,8 @@ async def register(
provider_vector_db_id: The identifier of the vector database in the provider.
+ vector_db_name: The name of the vector database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -314,6 +321,7 @@ async def register(
"embedding_dimension": embedding_dimension,
"provider_id": provider_id,
"provider_vector_db_id": provider_vector_db_id,
+ "vector_db_name": vector_db_name,
},
vector_db_register_params.VectorDBRegisterParams,
),
diff --git a/src/llama_stack_client/resources/vector_stores/vector_stores.py b/src/llama_stack_client/resources/vector_stores/vector_stores.py
index 7985cee9..2e87ea8a 100644
--- a/src/llama_stack_client/resources/vector_stores/vector_stores.py
+++ b/src/llama_stack_client/resources/vector_stores/vector_stores.py
@@ -74,7 +74,6 @@ def create(
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
- provider_vector_db_id: 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,
@@ -104,8 +103,6 @@ def create(
provider_id: The ID of the provider to use for this vector store.
- provider_vector_db_id: The provider-specific vector database ID.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -126,7 +123,6 @@ def create(
"file_ids": file_ids,
"metadata": metadata,
"provider_id": provider_id,
- "provider_vector_db_id": provider_vector_db_id,
},
vector_store_create_params.VectorStoreCreateParams,
),
@@ -411,7 +407,6 @@ async def create(
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
- provider_vector_db_id: 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,
@@ -441,8 +436,6 @@ async def create(
provider_id: The ID of the provider to use for this vector store.
- provider_vector_db_id: The provider-specific vector database ID.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -463,7 +456,6 @@ async def create(
"file_ids": file_ids,
"metadata": metadata,
"provider_id": provider_id,
- "provider_vector_db_id": provider_vector_db_id,
},
vector_store_create_params.VectorStoreCreateParams,
),
diff --git a/src/llama_stack_client/types/post_training/job_artifacts_response.py b/src/llama_stack_client/types/post_training/job_artifacts_response.py
index 0fb98c6c..a5646e34 100644
--- a/src/llama_stack_client/types/post_training/job_artifacts_response.py
+++ b/src/llama_stack_client/types/post_training/job_artifacts_response.py
@@ -1,13 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
+from datetime import datetime
from ..._models import BaseModel
-__all__ = ["JobArtifactsResponse"]
+__all__ = ["JobArtifactsResponse", "Checkpoint", "CheckpointTrainingMetrics"]
+
+
+class CheckpointTrainingMetrics(BaseModel):
+ epoch: int
+
+ perplexity: float
+
+ train_loss: float
+
+ validation_loss: float
+
+
+class Checkpoint(BaseModel):
+ created_at: datetime
+
+ epoch: int
+
+ identifier: str
+
+ path: str
+
+ post_training_job_id: str
+
+ training_metrics: Optional[CheckpointTrainingMetrics] = None
class JobArtifactsResponse(BaseModel):
- checkpoints: List[object]
+ checkpoints: List[Checkpoint]
job_uuid: str
diff --git a/src/llama_stack_client/types/post_training/job_status_response.py b/src/llama_stack_client/types/post_training/job_status_response.py
index 5ba60a6a..e830b10d 100644
--- a/src/llama_stack_client/types/post_training/job_status_response.py
+++ b/src/llama_stack_client/types/post_training/job_status_response.py
@@ -6,11 +6,35 @@
from ..._models import BaseModel
-__all__ = ["JobStatusResponse"]
+__all__ = ["JobStatusResponse", "Checkpoint", "CheckpointTrainingMetrics"]
+
+
+class CheckpointTrainingMetrics(BaseModel):
+ epoch: int
+
+ perplexity: float
+
+ train_loss: float
+
+ validation_loss: float
+
+
+class Checkpoint(BaseModel):
+ created_at: datetime
+
+ epoch: int
+
+ identifier: str
+
+ path: str
+
+ post_training_job_id: str
+
+ training_metrics: Optional[CheckpointTrainingMetrics] = None
class JobStatusResponse(BaseModel):
- checkpoints: List[object]
+ checkpoints: List[Checkpoint]
job_uuid: str
diff --git a/src/llama_stack_client/types/shared/query_config.py b/src/llama_stack_client/types/shared/query_config.py
index 3628efbf..5c1e1806 100644
--- a/src/llama_stack_client/types/shared/query_config.py
+++ b/src/llama_stack_client/types/shared/query_config.py
@@ -55,7 +55,7 @@ class QueryConfig(BaseModel):
query_generator_config: QueryGeneratorConfig
"""Configuration for the query generator."""
- mode: Optional[str] = None
+ mode: Optional[Literal["vector", "keyword", "hybrid"]] = None
"""Search mode for retrieval—either "vector", "keyword", or "hybrid".
Default "vector".
diff --git a/src/llama_stack_client/types/shared_params/query_config.py b/src/llama_stack_client/types/shared_params/query_config.py
index dd482ecf..9da3da08 100644
--- a/src/llama_stack_client/types/shared_params/query_config.py
+++ b/src/llama_stack_client/types/shared_params/query_config.py
@@ -55,7 +55,7 @@ class QueryConfig(TypedDict, total=False):
query_generator_config: Required[QueryGeneratorConfig]
"""Configuration for the query generator."""
- mode: str
+ mode: Literal["vector", "keyword", "hybrid"]
"""Search mode for retrieval—either "vector", "keyword", or "hybrid".
Default "vector".
diff --git a/src/llama_stack_client/types/vector_db_list_response.py b/src/llama_stack_client/types/vector_db_list_response.py
index 39161431..d53a3c95 100644
--- a/src/llama_stack_client/types/vector_db_list_response.py
+++ b/src/llama_stack_client/types/vector_db_list_response.py
@@ -21,5 +21,7 @@ class VectorDBListResponseItem(BaseModel):
provider_resource_id: Optional[str] = None
+ vector_db_name: Optional[str] = None
+
VectorDBListResponse: TypeAlias = List[VectorDBListResponseItem]
diff --git a/src/llama_stack_client/types/vector_db_register_params.py b/src/llama_stack_client/types/vector_db_register_params.py
index 734659a6..f7e3e7c7 100644
--- a/src/llama_stack_client/types/vector_db_register_params.py
+++ b/src/llama_stack_client/types/vector_db_register_params.py
@@ -22,3 +22,6 @@ class VectorDBRegisterParams(TypedDict, total=False):
provider_vector_db_id: str
"""The identifier of the vector database in the provider."""
+
+ vector_db_name: str
+ """The name of the vector database."""
diff --git a/src/llama_stack_client/types/vector_db_register_response.py b/src/llama_stack_client/types/vector_db_register_response.py
index 9c7a3166..b9224a23 100644
--- a/src/llama_stack_client/types/vector_db_register_response.py
+++ b/src/llama_stack_client/types/vector_db_register_response.py
@@ -20,3 +20,5 @@ class VectorDBRegisterResponse(BaseModel):
type: Literal["vector_db"]
provider_resource_id: Optional[str] = None
+
+ vector_db_name: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_retrieve_response.py b/src/llama_stack_client/types/vector_db_retrieve_response.py
index fb3597a5..4dd3a710 100644
--- a/src/llama_stack_client/types/vector_db_retrieve_response.py
+++ b/src/llama_stack_client/types/vector_db_retrieve_response.py
@@ -20,3 +20,5 @@ class VectorDBRetrieveResponse(BaseModel):
type: Literal["vector_db"]
provider_resource_id: Optional[str] = None
+
+ vector_db_name: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_store_create_params.py b/src/llama_stack_client/types/vector_store_create_params.py
index 18748f48..78a77a2c 100644
--- a/src/llama_stack_client/types/vector_store_create_params.py
+++ b/src/llama_stack_client/types/vector_store_create_params.py
@@ -38,6 +38,3 @@ class VectorStoreCreateParams(TypedDict, total=False):
provider_id: str
"""The ID of the provider to use for this vector store."""
-
- provider_vector_db_id: str
- """The provider-specific vector database ID."""
diff --git a/tests/api_resources/test_vector_dbs.py b/tests/api_resources/test_vector_dbs.py
index 68d6be89..1c4b855a 100644
--- a/tests/api_resources/test_vector_dbs.py
+++ b/tests/api_resources/test_vector_dbs.py
@@ -100,6 +100,7 @@ def test_method_register_with_all_params(self, client: LlamaStackClient) -> None
embedding_dimension=0,
provider_id="provider_id",
provider_vector_db_id="provider_vector_db_id",
+ vector_db_name="vector_db_name",
)
assert_matches_type(VectorDBRegisterResponse, vector_db, path=["response"])
@@ -252,6 +253,7 @@ async def test_method_register_with_all_params(self, async_client: AsyncLlamaSta
embedding_dimension=0,
provider_id="provider_id",
provider_vector_db_id="provider_vector_db_id",
+ vector_db_name="vector_db_name",
)
assert_matches_type(VectorDBRegisterResponse, vector_db, path=["response"])
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 84324ca4..1300f6af 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: LlamaStackClient) -> None:
file_ids=["string"],
metadata={"foo": True},
provider_id="provider_id",
- provider_vector_db_id="provider_vector_db_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@@ -309,7 +308,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncLlamaStack
file_ids=["string"],
metadata={"foo": True},
provider_id="provider_id",
- provider_vector_db_id="provider_vector_db_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
diff --git a/tests/api_resources/tool_runtime/test_rag_tool.py b/tests/api_resources/tool_runtime/test_rag_tool.py
index 17a64d8e..dab816ab 100644
--- a/tests/api_resources/tool_runtime/test_rag_tool.py
+++ b/tests/api_resources/tool_runtime/test_rag_tool.py
@@ -93,7 +93,7 @@ def test_method_query_with_all_params(self, client: LlamaStackClient) -> None:
"separator": "separator",
"type": "default",
},
- "mode": "mode",
+ "mode": "vector",
"ranker": {
"impact_factor": 0,
"type": "rrf",
@@ -210,7 +210,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncLlamaStackC
"separator": "separator",
"type": "default",
},
- "mode": "mode",
+ "mode": "vector",
"ranker": {
"impact_factor": 0,
"type": "rrf",
From 25c1e49f503e15649e0cdc18b0ac8dd00c2dff7e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 18:41:05 +0000
Subject: [PATCH 024/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
.../resources/vector_stores/vector_stores.py | 16 +-
.../types/chat/completion_create_params.py | 120 +--------
.../types/chat/completion_create_response.py | 128 +--------
.../types/chat/completion_list_response.py | 252 +-----------------
.../chat/completion_retrieve_response.py | 230 +---------------
...ost_training_preference_optimize_params.py | 8 +-
.../types/vector_store_create_params.py | 8 +-
tests/api_resources/test_post_training.py | 48 ++--
tests/api_resources/test_vector_stores.py | 28 +-
10 files changed, 64 insertions(+), 778 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f45e5f38..441c4f5e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-001fdbbf185bc9fc18521e55461f50dbd77b2f6bdf4b9565fe18a5ade77004dd.yml
-openapi_spec_hash: f410f7b9ebf460becbfc1427256f68e8
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
+openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/vector_stores/vector_stores.py b/src/llama_stack_client/resources/vector_stores/vector_stores.py
index 2e87ea8a..4b62604d 100644
--- a/src/llama_stack_client/resources/vector_stores/vector_stores.py
+++ b/src/llama_stack_client/resources/vector_stores/vector_stores.py
@@ -66,13 +66,13 @@ def with_streaming_response(self) -> VectorStoresResourceWithStreamingResponse:
def create(
self,
*,
- name: str,
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
embedding_dimension: int | NotGiven = NOT_GIVEN,
embedding_model: str | NotGiven = NOT_GIVEN,
expires_after: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
provider_id: 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.
@@ -85,8 +85,6 @@ def create(
Creates a vector store.
Args:
- name: A name for the vector store.
-
chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
strategy.
@@ -101,6 +99,8 @@ def create(
metadata: Set of 16 key-value pairs that can be attached to an object.
+ name: A name for the vector store.
+
provider_id: The ID of the provider to use for this vector store.
extra_headers: Send extra headers
@@ -115,13 +115,13 @@ def create(
"/v1/openai/v1/vector_stores",
body=maybe_transform(
{
- "name": name,
"chunking_strategy": chunking_strategy,
"embedding_dimension": embedding_dimension,
"embedding_model": embedding_model,
"expires_after": expires_after,
"file_ids": file_ids,
"metadata": metadata,
+ "name": name,
"provider_id": provider_id,
},
vector_store_create_params.VectorStoreCreateParams,
@@ -399,13 +399,13 @@ def with_streaming_response(self) -> AsyncVectorStoresResourceWithStreamingRespo
async def create(
self,
*,
- name: str,
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
embedding_dimension: int | NotGiven = NOT_GIVEN,
embedding_model: str | NotGiven = NOT_GIVEN,
expires_after: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
provider_id: 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.
@@ -418,8 +418,6 @@ async def create(
Creates a vector store.
Args:
- name: A name for the vector store.
-
chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
strategy.
@@ -434,6 +432,8 @@ async def create(
metadata: Set of 16 key-value pairs that can be attached to an object.
+ name: A name for the vector store.
+
provider_id: The ID of the provider to use for this vector store.
extra_headers: Send extra headers
@@ -448,13 +448,13 @@ async def create(
"/v1/openai/v1/vector_stores",
body=await async_maybe_transform(
{
- "name": name,
"chunking_strategy": chunking_strategy,
"embedding_dimension": embedding_dimension,
"embedding_model": embedding_model,
"expires_after": expires_after,
"file_ids": file_ids,
"metadata": metadata,
+ "name": name,
"provider_id": provider_id,
},
vector_store_create_params.VectorStoreCreateParams,
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index 2c9d26f7..3d448dcf 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -15,26 +15,14 @@
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAISystemMessageParam",
"MessageOpenAISystemMessageParamContentUnionMember1",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIAssistantMessageParam",
"MessageOpenAIAssistantMessageParamContentUnionMember1",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIAssistantMessageParamToolCall",
"MessageOpenAIAssistantMessageParamToolCallFunction",
"MessageOpenAIToolMessageParam",
"MessageOpenAIToolMessageParamContentUnionMember1",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIDeveloperMessageParam",
"MessageOpenAIDeveloperMessageParamContentUnionMember1",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ResponseFormat",
"ResponseFormatOpenAIResponseFormatText",
"ResponseFormatOpenAIResponseFormatJsonSchema",
@@ -156,38 +144,12 @@ class MessageOpenAIUserMessageParam(TypedDict, total=False):
"""(Optional) The name of the user message participant."""
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAISystemMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAISystemMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAISystemMessageParamContentUnionMember1]]]
"""The content of the "system prompt".
@@ -204,38 +166,12 @@ class MessageOpenAISystemMessageParam(TypedDict, total=False):
"""(Optional) The name of the system message participant."""
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAIAssistantMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIAssistantMessageParamToolCallFunction(TypedDict, total=False):
arguments: str
@@ -266,34 +202,12 @@ class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(TypedDict, total=False):
+class MessageOpenAIToolMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(TypedDict, total=False):
- image_url: Required[
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIToolMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAIToolMessageParamContentUnionMember1]]]
"""The response content from the tool"""
@@ -305,38 +219,12 @@ class MessageOpenAIToolMessageParam(TypedDict, total=False):
"""Unique identifier for the tool call this response is for"""
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAIDeveloperMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAIDeveloperMessageParamContentUnionMember1]]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index 5c8eb51c..3315982c 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -19,26 +19,14 @@
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCall",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceLogprobs",
"OpenAIChatCompletionChoiceLogprobsContent",
"OpenAIChatCompletionChoiceLogprobsContentTopLogprob",
@@ -91,39 +79,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -140,39 +101,12 @@ class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -205,39 +139,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -249,39 +156,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index d3b580a1..e6a3d319 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -18,26 +18,14 @@
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAISystemMessageParam",
"DataChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIAssistantMessageParam",
"DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIAssistantMessageParamToolCall",
"DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"DataChoiceMessageOpenAIToolMessageParam",
"DataChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIDeveloperMessageParam",
"DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceLogprobs",
"DataChoiceLogprobsContent",
"DataChoiceLogprobsContentTopLogprob",
@@ -51,26 +39,14 @@
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAISystemMessageParam",
"DataInputMessageOpenAISystemMessageParamContentUnionMember1",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIAssistantMessageParam",
"DataInputMessageOpenAIAssistantMessageParamContentUnionMember1",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIAssistantMessageParamToolCall",
"DataInputMessageOpenAIAssistantMessageParamToolCallFunction",
"DataInputMessageOpenAIToolMessageParam",
"DataInputMessageOpenAIToolMessageParamContentUnionMember1",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIDeveloperMessageParam",
"DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
]
@@ -116,37 +92,12 @@ class DataChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -163,41 +114,12 @@ class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -228,37 +150,12 @@ class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -270,41 +167,12 @@ class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
@@ -428,37 +296,12 @@ class DataInputMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -475,39 +318,12 @@ class DataInputMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -538,37 +354,12 @@ class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -580,39 +371,12 @@ class DataInputMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index 330c752d..bdfd48c3 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -17,26 +17,14 @@
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAISystemMessageParam",
"ChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIAssistantMessageParam",
"ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIAssistantMessageParamToolCall",
"ChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"ChoiceMessageOpenAIToolMessageParam",
"ChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIDeveloperMessageParam",
"ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceLogprobs",
"ChoiceLogprobsContent",
"ChoiceLogprobsContentTopLogprob",
@@ -50,26 +38,14 @@
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAISystemMessageParam",
"InputMessageOpenAISystemMessageParamContentUnionMember1",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIAssistantMessageParam",
"InputMessageOpenAIAssistantMessageParamContentUnionMember1",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIAssistantMessageParamToolCall",
"InputMessageOpenAIAssistantMessageParamToolCallFunction",
"InputMessageOpenAIToolMessageParam",
"InputMessageOpenAIToolMessageParamContentUnionMember1",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIDeveloperMessageParam",
"InputMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
]
@@ -113,35 +89,12 @@ class ChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -158,37 +111,12 @@ class ChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -219,35 +147,12 @@ class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -259,37 +164,12 @@ class ChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
@@ -409,35 +289,12 @@ class InputMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -454,37 +311,12 @@ class InputMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -515,33 +347,12 @@ class InputMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(BaseModel):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -553,37 +364,12 @@ class InputMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/post_training_preference_optimize_params.py b/src/llama_stack_client/types/post_training_preference_optimize_params.py
index f7d998eb..9d9f8c8c 100644
--- a/src/llama_stack_client/types/post_training_preference_optimize_params.py
+++ b/src/llama_stack_client/types/post_training_preference_optimize_params.py
@@ -36,13 +36,9 @@ class PostTrainingPreferenceOptimizeParams(TypedDict, total=False):
class AlgorithmConfig(TypedDict, total=False):
- epsilon: Required[float]
+ beta: Required[float]
- gamma: Required[float]
-
- reward_clip: Required[float]
-
- reward_scale: Required[float]
+ loss_type: Required[Literal["sigmoid", "hinge", "ipo", "kto_pair"]]
class TrainingConfigDataConfig(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/vector_store_create_params.py b/src/llama_stack_client/types/vector_store_create_params.py
index 78a77a2c..dc6ea47e 100644
--- a/src/llama_stack_client/types/vector_store_create_params.py
+++ b/src/llama_stack_client/types/vector_store_create_params.py
@@ -3,15 +3,12 @@
from __future__ import annotations
from typing import Dict, List, Union, Iterable
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
__all__ = ["VectorStoreCreateParams"]
class VectorStoreCreateParams(TypedDict, total=False):
- name: Required[str]
- """A name for the vector store."""
-
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
"""The chunking strategy used to chunk the file(s).
@@ -36,5 +33,8 @@ class VectorStoreCreateParams(TypedDict, total=False):
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
"""Set of 16 key-value pairs that can be attached to an object."""
+ name: str
+ """A name for the vector store."""
+
provider_id: str
"""The ID of the provider to use for this vector store."""
diff --git a/tests/api_resources/test_post_training.py b/tests/api_resources/test_post_training.py
index 5e7430fb..899a53ca 100644
--- a/tests/api_resources/test_post_training.py
+++ b/tests/api_resources/test_post_training.py
@@ -23,10 +23,8 @@ class TestPostTraining:
def test_method_preference_optimize(self, client: LlamaStackClient) -> None:
post_training = client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -44,10 +42,8 @@ def test_method_preference_optimize(self, client: LlamaStackClient) -> None:
def test_method_preference_optimize_with_all_params(self, client: LlamaStackClient) -> None:
post_training = client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -88,10 +84,8 @@ def test_method_preference_optimize_with_all_params(self, client: LlamaStackClie
def test_raw_response_preference_optimize(self, client: LlamaStackClient) -> None:
response = client.post_training.with_raw_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -113,10 +107,8 @@ def test_raw_response_preference_optimize(self, client: LlamaStackClient) -> Non
def test_streaming_response_preference_optimize(self, client: LlamaStackClient) -> None:
with client.post_training.with_streaming_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -247,10 +239,8 @@ class TestAsyncPostTraining:
async def test_method_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
post_training = await async_client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -268,10 +258,8 @@ async def test_method_preference_optimize(self, async_client: AsyncLlamaStackCli
async def test_method_preference_optimize_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
post_training = await async_client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -312,10 +300,8 @@ async def test_method_preference_optimize_with_all_params(self, async_client: As
async def test_raw_response_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
response = await async_client.post_training.with_raw_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -337,10 +323,8 @@ async def test_raw_response_preference_optimize(self, async_client: AsyncLlamaSt
async def test_streaming_response_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
async with async_client.post_training.with_streaming_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 1300f6af..0547061a 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -24,30 +24,26 @@ class TestVectorStores:
@parametrize
def test_method_create(self, client: LlamaStackClient) -> None:
- vector_store = client.vector_stores.create(
- name="name",
- )
+ vector_store = client.vector_stores.create()
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: LlamaStackClient) -> None:
vector_store = client.vector_stores.create(
- name="name",
chunking_strategy={"foo": True},
embedding_dimension=0,
embedding_model="embedding_model",
expires_after={"foo": True},
file_ids=["string"],
metadata={"foo": True},
+ name="name",
provider_id="provider_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_raw_response_create(self, client: LlamaStackClient) -> None:
- response = client.vector_stores.with_raw_response.create(
- name="name",
- )
+ response = client.vector_stores.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -56,9 +52,7 @@ def test_raw_response_create(self, client: LlamaStackClient) -> None:
@parametrize
def test_streaming_response_create(self, client: LlamaStackClient) -> None:
- with client.vector_stores.with_streaming_response.create(
- name="name",
- ) as response:
+ with client.vector_stores.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -292,30 +286,26 @@ class TestAsyncVectorStores:
@parametrize
async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
- vector_store = await async_client.vector_stores.create(
- name="name",
- )
+ vector_store = await async_client.vector_stores.create()
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
vector_store = await async_client.vector_stores.create(
- name="name",
chunking_strategy={"foo": True},
embedding_dimension=0,
embedding_model="embedding_model",
expires_after={"foo": True},
file_ids=["string"],
metadata={"foo": True},
+ name="name",
provider_id="provider_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.vector_stores.with_raw_response.create(
- name="name",
- )
+ response = await async_client.vector_stores.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -324,9 +314,7 @@ async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) ->
@parametrize
async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.vector_stores.with_streaming_response.create(
- name="name",
- ) as response:
+ async with async_client.vector_stores.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From 59b933ca39e08b9a36669995b3b5424231df84f5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:18:10 +0000
Subject: [PATCH 025/102] chore: update SDK settings
---
.stats.yml | 2 +-
README.md | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 441c4f5e..2a9a40ba 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
-config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
+config_hash: 4205e80455db5fa2a7b414372d28dac1
diff --git a/README.md b/README.md
index 1ccdb98b..cb5c6237 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,6 @@ You can find more example apps with client SDKs to talk with the Llama Stack ser
pip install llama-stack-client
```
-> [!NOTE]
-> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install llama_stack_client`
-
## Usage
The full API of this library can be found in [api.md](api.md). You may find basic client examples in our [llama-stack-apps](https://github.com/meta-llama/llama-stack-apps/tree/main) repo.
From aef5dee81270b6372479fbeb2257d42f487dfcf3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 026/102] chore(internal): version bump
From c32029b26c4e10bba8378cbb61d6b2d7e6c3d10d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 027/102] chore(internal): version bump
From 16f2953d3292c3787e28f5178d1d149d6c808258 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 028/102] chore(internal): version bump
From 02c9953a78c22d447d5a93b901a2684cce25ee3d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 029/102] chore(internal): version bump
From 3f0a4b9ba82bd9db5ae9f854a2a775781eb75fd0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 030/102] chore(ci): only run for pushes and fork pull requests
From 13cfa4aa1f12b7369f1bc13c3dff8d4cea46a3f6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:38:54 +0000
Subject: [PATCH 031/102] feat(api): update via SDK Studio
---
.stats.yml | 6 +++---
api.md | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 2a9a40ba..7472e88b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
-openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
-config_hash: 4205e80455db5fa2a7b414372d28dac1
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ea01b3ebf9eea9d623d73a0dbf712698436d216fdcb09f3c6cb2aa7334615103.yml
+openapi_spec_hash: a4f54e9909e5f99acf14d9735974b834
+config_hash: ffbd7388f1c8a5151f2630ae154056ee
diff --git a/api.md b/api.md
index c7a7686b..9b9f0e0c 100644
--- a/api.md
+++ b/api.md
@@ -458,7 +458,7 @@ Methods:
Types:
```python
-from llama_stack_client.types import RunShieldResponse
+from llama_stack_client.types import OpenAPIModerationsResponse, RunShieldResponse
```
Methods:
From 3aeb5bac5cd7c0f79890384409cb07206a270e7c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:39:28 +0000
Subject: [PATCH 032/102] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 7472e88b..07e0a87f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ea01b3ebf9eea9d623d73a0dbf712698436d216fdcb09f3c6cb2aa7334615103.yml
-openapi_spec_hash: a4f54e9909e5f99acf14d9735974b834
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
+openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
config_hash: ffbd7388f1c8a5151f2630ae154056ee
From 489b54d7acfee41874e2fa253578d3e95f6b111a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:40:12 +0000
Subject: [PATCH 033/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
api.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 07e0a87f..156cc112 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: ffbd7388f1c8a5151f2630ae154056ee
+config_hash: 0394c2b14022becb0352c36afcdfbafe
diff --git a/api.md b/api.md
index 9b9f0e0c..e84d0366 100644
--- a/api.md
+++ b/api.md
@@ -458,7 +458,7 @@ Methods:
Types:
```python
-from llama_stack_client.types import OpenAPIModerationsResponse, RunShieldResponse
+from llama_stack_client.types import OpenAIModerationsResponse, RunShieldResponse
```
Methods:
From e97f870b037685af1e65d8d895a063ab2381dc81 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:43:05 +0000
Subject: [PATCH 034/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
api.md | 1 +
src/llama_stack_client/resources/safety.py | 105 +++++++++++++++++-
src/llama_stack_client/types/__init__.py | 2 +
.../types/openai_moderations_response.py | 33 ++++++
.../types/safety_openai_moderations_params.py | 20 ++++
tests/api_resources/test_safety.py | 83 +++++++++++++-
7 files changed, 243 insertions(+), 5 deletions(-)
create mode 100644 src/llama_stack_client/types/openai_moderations_response.py
create mode 100644 src/llama_stack_client/types/safety_openai_moderations_params.py
diff --git a/.stats.yml b/.stats.yml
index 156cc112..a680bc5c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 105
+configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: 0394c2b14022becb0352c36afcdfbafe
+config_hash: b0cd3ed9be70b0310bc685a4014eb0a5
diff --git a/api.md b/api.md
index e84d0366..f9618fae 100644
--- a/api.md
+++ b/api.md
@@ -463,6 +463,7 @@ from llama_stack_client.types import OpenAIModerationsResponse, RunShieldRespons
Methods:
+- client.safety.openai_moderations(\*\*params) -> OpenAIModerationsResponse
- client.safety.run_shield(\*\*params) -> RunShieldResponse
# Shields
diff --git a/src/llama_stack_client/resources/safety.py b/src/llama_stack_client/resources/safety.py
index 813a1f67..64a5135c 100644
--- a/src/llama_stack_client/resources/safety.py
+++ b/src/llama_stack_client/resources/safety.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from typing import Dict, Union, Iterable
+from typing import Dict, List, Union, Iterable
import httpx
-from ..types import safety_run_shield_params
+from ..types import safety_run_shield_params, safety_openai_moderations_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -20,6 +20,7 @@
from .._base_client import make_request_options
from ..types.run_shield_response import RunShieldResponse
from ..types.shared_params.message import Message
+from ..types.openai_moderations_response import OpenAIModerationsResponse
__all__ = ["SafetyResource", "AsyncSafetyResource"]
@@ -44,6 +45,50 @@ def with_streaming_response(self) -> SafetyResourceWithStreamingResponse:
"""
return SafetyResourceWithStreamingResponse(self)
+ def openai_moderations(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> OpenAIModerationsResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/v1/openai/v1/moderations",
+ body=maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenAIModerationsResponse,
+ )
+
def run_shield(
self,
*,
@@ -112,6 +157,50 @@ def with_streaming_response(self) -> AsyncSafetyResourceWithStreamingResponse:
"""
return AsyncSafetyResourceWithStreamingResponse(self)
+ async def openai_moderations(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> OpenAIModerationsResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/v1/openai/v1/moderations",
+ body=await async_maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenAIModerationsResponse,
+ )
+
async def run_shield(
self,
*,
@@ -164,6 +253,9 @@ class SafetyResourceWithRawResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = to_raw_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = to_raw_response_wrapper(
safety.run_shield,
)
@@ -173,6 +265,9 @@ class AsyncSafetyResourceWithRawResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = async_to_raw_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = async_to_raw_response_wrapper(
safety.run_shield,
)
@@ -182,6 +277,9 @@ class SafetyResourceWithStreamingResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = to_streamed_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = to_streamed_response_wrapper(
safety.run_shield,
)
@@ -191,6 +289,9 @@ class AsyncSafetyResourceWithStreamingResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = async_to_streamed_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = async_to_streamed_response_wrapper(
safety.run_shield,
)
diff --git a/src/llama_stack_client/types/__init__.py b/src/llama_stack_client/types/__init__.py
index cfb77868..f595ee76 100644
--- a/src/llama_stack_client/types/__init__.py
+++ b/src/llama_stack_client/types/__init__.py
@@ -133,6 +133,7 @@
from .inference_completion_params import InferenceCompletionParams as InferenceCompletionParams
from .inference_embeddings_params import InferenceEmbeddingsParams as InferenceEmbeddingsParams
from .list_vector_stores_response import ListVectorStoresResponse as ListVectorStoresResponse
+from .openai_moderations_response import OpenAIModerationsResponse as OpenAIModerationsResponse
from .telemetry_get_span_response import TelemetryGetSpanResponse as TelemetryGetSpanResponse
from .vector_db_register_response import VectorDBRegisterResponse as VectorDBRegisterResponse
from .vector_db_retrieve_response import VectorDBRetrieveResponse as VectorDBRetrieveResponse
@@ -151,6 +152,7 @@
from .tool_runtime_invoke_tool_params import ToolRuntimeInvokeToolParams as ToolRuntimeInvokeToolParams
from .inference_chat_completion_params import InferenceChatCompletionParams as InferenceChatCompletionParams
from .list_post_training_jobs_response import ListPostTrainingJobsResponse as ListPostTrainingJobsResponse
+from .safety_openai_moderations_params import SafetyOpenAIModerationsParams as SafetyOpenAIModerationsParams
from .scoring_function_register_params import ScoringFunctionRegisterParams as ScoringFunctionRegisterParams
from .telemetry_get_span_tree_response import TelemetryGetSpanTreeResponse as TelemetryGetSpanTreeResponse
from .tool_runtime_list_tools_response import ToolRuntimeListToolsResponse as ToolRuntimeListToolsResponse
diff --git a/src/llama_stack_client/types/openai_moderations_response.py b/src/llama_stack_client/types/openai_moderations_response.py
new file mode 100644
index 00000000..45eb0d12
--- /dev/null
+++ b/src/llama_stack_client/types/openai_moderations_response.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List
+
+from .._models import BaseModel
+
+__all__ = ["OpenAIModerationsResponse", "Result"]
+
+
+class Result(BaseModel):
+ categories: Dict[str, bool]
+ """A list of the categories, and whether they are flagged or not."""
+
+ category_applied_input_types: Dict[str, List[str]]
+
+ category_messages: Dict[str, str]
+
+ category_scores: Dict[str, float]
+ """A list of the categories along with their scores as predicted by model."""
+
+ flagged: bool
+ """Whether any of the below categories are flagged."""
+
+
+class OpenAIModerationsResponse(BaseModel):
+ id: str
+ """The unique identifier for the moderation request."""
+
+ model: str
+ """The model used to generate the moderation results."""
+
+ results: List[Result]
+ """A list of moderation objects"""
diff --git a/src/llama_stack_client/types/safety_openai_moderations_params.py b/src/llama_stack_client/types/safety_openai_moderations_params.py
new file mode 100644
index 00000000..219c0c74
--- /dev/null
+++ b/src/llama_stack_client/types/safety_openai_moderations_params.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from typing_extensions import Required, TypedDict
+
+__all__ = ["SafetyOpenAIModerationsParams"]
+
+
+class SafetyOpenAIModerationsParams(TypedDict, total=False):
+ input: Required[Union[str, List[str]]]
+ """Input (or inputs) to classify.
+
+ Can be a single string, an array of strings, or an array of multi-modal input
+ objects similar to other models.
+ """
+
+ model: str
+ """The content moderation model you would like to use."""
diff --git a/tests/api_resources/test_safety.py b/tests/api_resources/test_safety.py
index 257dfd76..a2a691fe 100644
--- a/tests/api_resources/test_safety.py
+++ b/tests/api_resources/test_safety.py
@@ -9,7 +9,10 @@
from tests.utils import assert_matches_type
from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
-from llama_stack_client.types import RunShieldResponse
+from llama_stack_client.types import (
+ RunShieldResponse,
+ OpenAIModerationsResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -17,6 +20,45 @@
class TestSafety:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @parametrize
+ def test_method_openai_moderations(self, client: LlamaStackClient) -> None:
+ safety = client.safety.openai_moderations(
+ input="string",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_method_openai_moderations_with_all_params(self, client: LlamaStackClient) -> None:
+ safety = client.safety.openai_moderations(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_raw_response_openai_moderations(self, client: LlamaStackClient) -> None:
+ response = client.safety.with_raw_response.openai_moderations(
+ input="string",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ safety = response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_streaming_response_openai_moderations(self, client: LlamaStackClient) -> None:
+ with client.safety.with_streaming_response.openai_moderations(
+ input="string",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ safety = response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
def test_method_run_shield(self, client: LlamaStackClient) -> None:
safety = client.safety.run_shield(
@@ -75,6 +117,45 @@ class TestAsyncSafety:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @parametrize
+ async def test_method_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.openai_moderations(
+ input="string",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_method_openai_moderations_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.openai_moderations(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_raw_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ response = await async_client.safety.with_raw_response.openai_moderations(
+ input="string",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ safety = await response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ async with async_client.safety.with_streaming_response.openai_moderations(
+ input="string",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ safety = await response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
async def test_method_run_shield(self, async_client: AsyncLlamaStackClient) -> None:
safety = await async_client.safety.run_shield(
From 6114dbf530354a56539a16a49a7c314bf643fca7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 035/102] chore(internal): version bump
From 9746774316aed9a04b5ee161452df14e88f3e62c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 036/102] chore(internal): version bump
From ce98414b294a451ac67b9fcee045f28ecce7b408 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 037/102] chore(internal): version bump
From d59862a1bca2d31bf0f6cd0138bf2a1d804aad9d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 038/102] chore(internal): version bump
From 8b37cd35c06ba045c25be9f6777b854bd9d9dbf8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 039/102] chore(ci): only run for pushes and fork pull requests
From 74f7eda7bf4a5d024bdeaf36a0f228d610134530 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 040/102] chore(internal): version bump
From 96768dc3db60936a960a9a46b9597df292a9e85e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 041/102] chore(internal): version bump
From e6ae920385cf6a92f1f0623428a61e0325521e67 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 042/102] chore(internal): version bump
From 4132af981fe9d59864c6f2d23258c893200355c1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 043/102] chore(internal): version bump
From 4da7f495eb06d0cb386deeef3825c4876c64cbe2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 044/102] chore(ci): only run for pushes and fork pull requests
From 6c73da7c97a558468296f1e8d6da5ba7ae9ea1c4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 31 Jul 2025 04:29:05 +0000
Subject: [PATCH 045/102] feat(client): support file upload requests
---
src/llama_stack_client/_base_client.py | 5 ++++-
src/llama_stack_client/_files.py | 8 ++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/llama_stack_client/_base_client.py b/src/llama_stack_client/_base_client.py
index 4224d36a..b5e326e9 100644
--- a/src/llama_stack_client/_base_client.py
+++ b/src/llama_stack_client/_base_client.py
@@ -532,7 +532,10 @@ def _build_request(
is_body_allowed = options.method.lower() != "get"
if is_body_allowed:
- kwargs["json"] = json_data if is_given(json_data) else None
+ if isinstance(json_data, bytes):
+ kwargs["content"] = json_data
+ else:
+ kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
diff --git a/src/llama_stack_client/_files.py b/src/llama_stack_client/_files.py
index 45f57c0a..035a1144 100644
--- a/src/llama_stack_client/_files.py
+++ b/src/llama_stack_client/_files.py
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], _read_file_content(file[1]), *file[2:])
+ return (file[0], read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-def _read_file_content(file: FileContent) -> HttpxFileContent:
+def read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return pathlib.Path(file).read_bytes()
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], await _async_read_file_content(file[1]), *file[2:])
+ return (file[0], await async_read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
+async def async_read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return await anyio.Path(file).read_bytes()
From b6fa2b194bc4d66adcc40b5cc07404c45a211cd3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 31 Jul 2025 19:38:33 +0000
Subject: [PATCH 046/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
pyproject.toml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index a680bc5c..0e117056 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: b0cd3ed9be70b0310bc685a4014eb0a5
+config_hash: b105ed4704c2998287916138c03d211a
diff --git a/pyproject.toml b/pyproject.toml
index 245181b1..1a66e324 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "llama_stack_client"
version = "0.2.16"
description = "The official Python library for the llama-stack-client API"
dynamic = ["readme"]
-license = "Apache-2.0"
+license = "MIT"
authors = [{ name = "Meta Llama", email = "llama-oss@meta.com" }]
dependencies = [
"httpx>=0.23.0, <1",
@@ -34,7 +34,7 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries :: Python Modules",
- "License :: OSI Approved :: Apache Software License"
+ "License :: OSI Approved :: MIT License"
]
[dependency-groups]
From 748e6db5002f1ec2c8880414b803d1cfc3ff95ea Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 1 Aug 2025 17:53:59 +0000
Subject: [PATCH 047/102] feat(api): update via SDK Studio
---
.stats.yml | 6 +-
api.md | 4 +-
src/llama_stack_client/resources/safety.py | 40 ++++++-------
src/llama_stack_client/types/__init__.py | 4 +-
.../types/chat/completion_create_params.py | 17 ++++++
.../types/chat/completion_create_response.py | 17 ++++++
.../types/chat/completion_list_response.py | 34 +++++++++++
.../chat/completion_retrieve_response.py | 34 +++++++++++
...rations_response.py => create_response.py} | 25 ++++----
...ions_params.py => safety_create_params.py} | 6 +-
tests/api_resources/test_safety.py | 59 ++++++++-----------
11 files changed, 170 insertions(+), 76 deletions(-)
rename src/llama_stack_client/types/{openai_moderations_response.py => create_response.py} (53%)
rename src/llama_stack_client/types/{safety_openai_moderations_params.py => safety_create_params.py} (79%)
diff --git a/.stats.yml b/.stats.yml
index 0e117056..8a2e9b6f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
-openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: b105ed4704c2998287916138c03d211a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-fe0ae8a478adcaa69c96b9ee501073818e499700ce2ec66dd7f6eaf4c3fcf69c.yml
+openapi_spec_hash: 418d4a00c4676bbb2973b64a93484965
+config_hash: e6c3e48e220b264936ee6df8b996ab12
diff --git a/api.md b/api.md
index f9618fae..01dd2924 100644
--- a/api.md
+++ b/api.md
@@ -458,12 +458,12 @@ Methods:
Types:
```python
-from llama_stack_client.types import OpenAIModerationsResponse, RunShieldResponse
+from llama_stack_client.types import CreateResponse, RunShieldResponse
```
Methods:
-- client.safety.openai_moderations(\*\*params) -> OpenAIModerationsResponse
+- client.safety.create(\*\*params) -> CreateResponse
- client.safety.run_shield(\*\*params) -> RunShieldResponse
# Shields
diff --git a/src/llama_stack_client/resources/safety.py b/src/llama_stack_client/resources/safety.py
index 64a5135c..114f2b76 100644
--- a/src/llama_stack_client/resources/safety.py
+++ b/src/llama_stack_client/resources/safety.py
@@ -6,7 +6,7 @@
import httpx
-from ..types import safety_run_shield_params, safety_openai_moderations_params
+from ..types import safety_create_params, safety_run_shield_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -18,9 +18,9 @@
async_to_streamed_response_wrapper,
)
from .._base_client import make_request_options
+from ..types.create_response import CreateResponse
from ..types.run_shield_response import RunShieldResponse
from ..types.shared_params.message import Message
-from ..types.openai_moderations_response import OpenAIModerationsResponse
__all__ = ["SafetyResource", "AsyncSafetyResource"]
@@ -45,18 +45,18 @@ def with_streaming_response(self) -> SafetyResourceWithStreamingResponse:
"""
return SafetyResourceWithStreamingResponse(self)
- def openai_moderations(
+ def create(
self,
*,
input: Union[str, List[str]],
- model: str | NotGiven = NOT_GIVEN,
+ model: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OpenAIModerationsResponse:
+ ) -> CreateResponse:
"""
Classifies if text and/or image inputs are potentially harmful.
@@ -81,12 +81,12 @@ def openai_moderations(
"input": input,
"model": model,
},
- safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ safety_create_params.SafetyCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=OpenAIModerationsResponse,
+ cast_to=CreateResponse,
)
def run_shield(
@@ -157,18 +157,18 @@ def with_streaming_response(self) -> AsyncSafetyResourceWithStreamingResponse:
"""
return AsyncSafetyResourceWithStreamingResponse(self)
- async def openai_moderations(
+ async def create(
self,
*,
input: Union[str, List[str]],
- model: str | NotGiven = NOT_GIVEN,
+ model: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OpenAIModerationsResponse:
+ ) -> CreateResponse:
"""
Classifies if text and/or image inputs are potentially harmful.
@@ -193,12 +193,12 @@ async def openai_moderations(
"input": input,
"model": model,
},
- safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ safety_create_params.SafetyCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=OpenAIModerationsResponse,
+ cast_to=CreateResponse,
)
async def run_shield(
@@ -253,8 +253,8 @@ class SafetyResourceWithRawResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.openai_moderations = to_raw_response_wrapper(
- safety.openai_moderations,
+ self.create = to_raw_response_wrapper(
+ safety.create,
)
self.run_shield = to_raw_response_wrapper(
safety.run_shield,
@@ -265,8 +265,8 @@ class AsyncSafetyResourceWithRawResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.openai_moderations = async_to_raw_response_wrapper(
- safety.openai_moderations,
+ self.create = async_to_raw_response_wrapper(
+ safety.create,
)
self.run_shield = async_to_raw_response_wrapper(
safety.run_shield,
@@ -277,8 +277,8 @@ class SafetyResourceWithStreamingResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.openai_moderations = to_streamed_response_wrapper(
- safety.openai_moderations,
+ self.create = to_streamed_response_wrapper(
+ safety.create,
)
self.run_shield = to_streamed_response_wrapper(
safety.run_shield,
@@ -289,8 +289,8 @@ class AsyncSafetyResourceWithStreamingResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.openai_moderations = async_to_streamed_response_wrapper(
- safety.openai_moderations,
+ self.create = async_to_streamed_response_wrapper(
+ safety.create,
)
self.run_shield = async_to_streamed_response_wrapper(
safety.run_shield,
diff --git a/src/llama_stack_client/types/__init__.py b/src/llama_stack_client/types/__init__.py
index f595ee76..1146a4e2 100644
--- a/src/llama_stack_client/types/__init__.py
+++ b/src/llama_stack_client/types/__init__.py
@@ -47,6 +47,7 @@
from .tool_response import ToolResponse as ToolResponse
from .inference_step import InferenceStep as InferenceStep
from .tool_def_param import ToolDefParam as ToolDefParam
+from .create_response import CreateResponse as CreateResponse
from .response_object import ResponseObject as ResponseObject
from .token_log_probs import TokenLogProbs as TokenLogProbs
from .file_list_params import FileListParams as FileListParams
@@ -77,6 +78,7 @@
from .list_routes_response import ListRoutesResponse as ListRoutesResponse
from .query_spans_response import QuerySpansResponse as QuerySpansResponse
from .response_list_params import ResponseListParams as ResponseListParams
+from .safety_create_params import SafetyCreateParams as SafetyCreateParams
from .scoring_score_params import ScoringScoreParams as ScoringScoreParams
from .shield_list_response import ShieldListResponse as ShieldListResponse
from .agent_create_response import AgentCreateResponse as AgentCreateResponse
@@ -133,7 +135,6 @@
from .inference_completion_params import InferenceCompletionParams as InferenceCompletionParams
from .inference_embeddings_params import InferenceEmbeddingsParams as InferenceEmbeddingsParams
from .list_vector_stores_response import ListVectorStoresResponse as ListVectorStoresResponse
-from .openai_moderations_response import OpenAIModerationsResponse as OpenAIModerationsResponse
from .telemetry_get_span_response import TelemetryGetSpanResponse as TelemetryGetSpanResponse
from .vector_db_register_response import VectorDBRegisterResponse as VectorDBRegisterResponse
from .vector_db_retrieve_response import VectorDBRetrieveResponse as VectorDBRetrieveResponse
@@ -152,7 +153,6 @@
from .tool_runtime_invoke_tool_params import ToolRuntimeInvokeToolParams as ToolRuntimeInvokeToolParams
from .inference_chat_completion_params import InferenceChatCompletionParams as InferenceChatCompletionParams
from .list_post_training_jobs_response import ListPostTrainingJobsResponse as ListPostTrainingJobsResponse
-from .safety_openai_moderations_params import SafetyOpenAIModerationsParams as SafetyOpenAIModerationsParams
from .scoring_function_register_params import ScoringFunctionRegisterParams as ScoringFunctionRegisterParams
from .telemetry_get_span_tree_response import TelemetryGetSpanTreeResponse as TelemetryGetSpanTreeResponse
from .tool_runtime_list_tools_response import ToolRuntimeListToolsResponse as ToolRuntimeListToolsResponse
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index 3d448dcf..a487783e 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -13,6 +13,8 @@
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"MessageOpenAISystemMessageParam",
"MessageOpenAISystemMessageParamContentUnionMember1",
"MessageOpenAIAssistantMessageParam",
@@ -127,9 +129,24 @@ class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionConten
type: Required[Literal["image_url"]]
+class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(TypedDict, total=False):
+ file_data: str
+
+ file_id: str
+
+ filename: str
+
+
+class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(TypedDict, total=False):
+ file: Required[MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile]
+
+ type: Required[Literal["file"]]
+
+
MessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Union[
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
]
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index 3315982c..d22cd188 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -17,6 +17,8 @@
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam",
@@ -59,10 +61,25 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1
type: Literal["image_url"]
+class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index e6a3d319..f9f6c335 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -16,6 +16,8 @@
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"DataChoiceMessageOpenAISystemMessageParam",
"DataChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"DataChoiceMessageOpenAIAssistantMessageParam",
@@ -37,6 +39,8 @@
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"DataInputMessageOpenAISystemMessageParam",
"DataInputMessageOpenAISystemMessageParamContentUnionMember1",
"DataInputMessageOpenAIAssistantMessageParam",
@@ -72,10 +76,25 @@ class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatComple
type: Literal["image_url"]
+class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
@@ -276,10 +295,25 @@ class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatComplet
type: Literal["image_url"]
+class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
DataInputMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index bdfd48c3..eb13bb97 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -15,6 +15,8 @@
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"ChoiceMessageOpenAISystemMessageParam",
"ChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"ChoiceMessageOpenAIAssistantMessageParam",
@@ -36,6 +38,8 @@
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"InputMessageOpenAISystemMessageParam",
"InputMessageOpenAISystemMessageParamContentUnionMember1",
"InputMessageOpenAIAssistantMessageParam",
@@ -69,10 +73,25 @@ class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletion
type: Literal["image_url"]
+class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
ChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
@@ -269,10 +288,25 @@ class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionC
type: Literal["image_url"]
+class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
InputMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/openai_moderations_response.py b/src/llama_stack_client/types/create_response.py
similarity index 53%
rename from src/llama_stack_client/types/openai_moderations_response.py
rename to src/llama_stack_client/types/create_response.py
index 45eb0d12..fbb519f0 100644
--- a/src/llama_stack_client/types/openai_moderations_response.py
+++ b/src/llama_stack_client/types/create_response.py
@@ -1,28 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List
+from typing import Dict, List, Union, Optional
from .._models import BaseModel
-__all__ = ["OpenAIModerationsResponse", "Result"]
+__all__ = ["CreateResponse", "Result"]
class Result(BaseModel):
- categories: Dict[str, bool]
- """A list of the categories, and whether they are flagged or not."""
+ flagged: bool
+ """Whether any of the below categories are flagged."""
- category_applied_input_types: Dict[str, List[str]]
+ metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
- category_messages: Dict[str, str]
+ categories: Optional[Dict[str, bool]] = None
+ """A list of the categories, and whether they are flagged or not."""
- category_scores: Dict[str, float]
+ category_applied_input_types: Optional[Dict[str, List[str]]] = None
+ """
+ A list of the categories along with the input type(s) that the score applies to.
+ """
+
+ category_scores: Optional[Dict[str, float]] = None
"""A list of the categories along with their scores as predicted by model."""
- flagged: bool
- """Whether any of the below categories are flagged."""
+ user_message: Optional[str] = None
-class OpenAIModerationsResponse(BaseModel):
+class CreateResponse(BaseModel):
id: str
"""The unique identifier for the moderation request."""
diff --git a/src/llama_stack_client/types/safety_openai_moderations_params.py b/src/llama_stack_client/types/safety_create_params.py
similarity index 79%
rename from src/llama_stack_client/types/safety_openai_moderations_params.py
rename to src/llama_stack_client/types/safety_create_params.py
index 219c0c74..76d7e8c9 100644
--- a/src/llama_stack_client/types/safety_openai_moderations_params.py
+++ b/src/llama_stack_client/types/safety_create_params.py
@@ -5,10 +5,10 @@
from typing import List, Union
from typing_extensions import Required, TypedDict
-__all__ = ["SafetyOpenAIModerationsParams"]
+__all__ = ["SafetyCreateParams"]
-class SafetyOpenAIModerationsParams(TypedDict, total=False):
+class SafetyCreateParams(TypedDict, total=False):
input: Required[Union[str, List[str]]]
"""Input (or inputs) to classify.
@@ -16,5 +16,5 @@ class SafetyOpenAIModerationsParams(TypedDict, total=False):
objects similar to other models.
"""
- model: str
+ model: Required[str]
"""The content moderation model you would like to use."""
diff --git a/tests/api_resources/test_safety.py b/tests/api_resources/test_safety.py
index a2a691fe..94fe0110 100644
--- a/tests/api_resources/test_safety.py
+++ b/tests/api_resources/test_safety.py
@@ -9,10 +9,7 @@
from tests.utils import assert_matches_type
from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
-from llama_stack_client.types import (
- RunShieldResponse,
- OpenAIModerationsResponse,
-)
+from llama_stack_client.types import CreateResponse, RunShieldResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -21,41 +18,36 @@ class TestSafety:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@parametrize
- def test_method_openai_moderations(self, client: LlamaStackClient) -> None:
- safety = client.safety.openai_moderations(
- input="string",
- )
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
-
- @parametrize
- def test_method_openai_moderations_with_all_params(self, client: LlamaStackClient) -> None:
- safety = client.safety.openai_moderations(
+ def test_method_create(self, client: LlamaStackClient) -> None:
+ safety = client.safety.create(
input="string",
model="model",
)
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- def test_raw_response_openai_moderations(self, client: LlamaStackClient) -> None:
- response = client.safety.with_raw_response.openai_moderations(
+ def test_raw_response_create(self, client: LlamaStackClient) -> None:
+ response = client.safety.with_raw_response.create(
input="string",
+ model="model",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- def test_streaming_response_openai_moderations(self, client: LlamaStackClient) -> None:
- with client.safety.with_streaming_response.openai_moderations(
+ def test_streaming_response_create(self, client: LlamaStackClient) -> None:
+ with client.safety.with_streaming_response.create(
input="string",
+ model="model",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -118,41 +110,36 @@ class TestAsyncSafety:
)
@parametrize
- async def test_method_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- safety = await async_client.safety.openai_moderations(
- input="string",
- )
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
-
- @parametrize
- async def test_method_openai_moderations_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
- safety = await async_client.safety.openai_moderations(
+ async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.create(
input="string",
model="model",
)
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- async def test_raw_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.safety.with_raw_response.openai_moderations(
+ async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ response = await async_client.safety.with_raw_response.create(
input="string",
+ model="model",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = await response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- async def test_streaming_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.safety.with_streaming_response.openai_moderations(
+ async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ async with async_client.safety.with_streaming_response.create(
input="string",
+ model="model",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = await response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
assert cast(Any, response.is_closed) is True
From 80a296977917382fa42b0def0c6bf1a66be45780 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 1 Aug 2025 18:00:19 +0000
Subject: [PATCH 048/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
src/llama_stack_client/resources/inspect.py | 4 +-
.../resources/responses/responses.py | 12 ++
src/llama_stack_client/resources/routes.py | 4 +-
.../resources/synthetic_data_generation.py | 18 ++-
.../resources/tool_runtime/rag_tool.py | 32 +++-
.../resources/vector_stores/files.py | 28 ++++
.../types/agent_create_response.py | 1 +
.../types/agent_retrieve_response.py | 4 +-
.../agent_turn_response_stream_chunk.py | 1 +
.../types/agents/session.py | 4 +
.../types/agents/session_create_response.py | 1 +
.../types/agents/step_retrieve_response.py | 2 +-
src/llama_stack_client/types/agents/turn.py | 11 +-
.../types/agents/turn_create_params.py | 2 +
.../types/agents/turn_response_event.py | 1 +
.../agents/turn_response_event_payload.py | 24 ++-
.../types/algorithm_config_param.py | 11 ++
src/llama_stack_client/types/benchmark.py | 4 +
.../types/chat/completion_create_params.py | 31 ++++
.../types/chat/completion_create_response.py | 23 +++
.../types/chat/completion_list_response.py | 51 ++++++
.../chat/completion_retrieve_response.py | 46 ++++++
.../types/chat_completion_chunk.py | 6 +
.../chat_completion_response_stream_chunk.py | 4 +
.../types/completion_response.py | 4 +
.../types/dataset_list_response.py | 6 +-
.../types/dataset_register_response.py | 6 +-
.../types/dataset_retrieve_response.py | 6 +-
src/llama_stack_client/types/event_param.py | 26 ++++
src/llama_stack_client/types/health_info.py | 1 +
...nference_batch_chat_completion_response.py | 1 +
src/llama_stack_client/types/job.py | 2 +
.../types/list_datasets_response.py | 1 +
.../types/list_files_response.py | 3 +
.../types/list_providers_response.py | 1 +
.../types/list_routes_response.py | 1 +
.../types/list_tool_groups_response.py | 1 +
.../types/list_tools_response.py | 1 +
.../types/list_vector_dbs_response.py | 1 +
.../types/list_vector_stores_response.py | 5 +
src/llama_stack_client/types/model.py | 6 +
.../post_training/job_artifacts_response.py | 12 ++
.../post_training/job_status_response.py | 17 ++
...ost_training_preference_optimize_params.py | 28 ++++
...st_training_supervised_fine_tune_params.py | 26 ++++
src/llama_stack_client/types/provider_info.py | 5 +
.../types/query_chunks_response.py | 2 +
.../types/query_condition_param.py | 3 +
.../types/query_spans_response.py | 1 +
.../types/response_create_params.py | 54 ++++++-
.../types/response_list_response.py | 94 ++++++++++-
.../types/response_object.py | 60 ++++++-
.../types/response_object_stream.py | 146 ++++++++++++++++--
.../responses/input_item_list_response.py | 30 ++++
src/llama_stack_client/types/route_info.py | 3 +
.../types/run_shield_response.py | 1 +
src/llama_stack_client/types/scoring_fn.py | 2 +
.../types/scoring_fn_params.py | 10 ++
.../types/scoring_fn_params_param.py | 10 ++
.../types/scoring_score_batch_response.py | 2 +
.../types/shared/batch_completion.py | 1 +
.../types/shared/chat_completion_response.py | 4 +
.../types/shared/content_delta.py | 7 +
.../types/shared/document.py | 2 +
.../types/shared/interleaved_content.py | 1 +
.../types/shared/interleaved_content_item.py | 1 +
.../types/shared/param_type.py | 10 ++
.../types/shared/query_config.py | 3 +-
.../types/shared/query_generator_config.py | 5 +
.../types/shared/query_result.py | 3 +-
.../types/shared/safety_violation.py | 6 +
.../types/shared/sampling_params.py | 6 +
.../types/shared_params/document.py | 2 +
.../shared_params/interleaved_content.py | 1 +
.../shared_params/interleaved_content_item.py | 1 +
.../types/shared_params/query_config.py | 3 +-
.../shared_params/query_generator_config.py | 5 +
.../types/shared_params/sampling_params.py | 6 +
src/llama_stack_client/types/shield.py | 2 +
.../types/span_with_status.py | 8 +
...nthetic_data_generation_generate_params.py | 8 +-
.../synthetic_data_generation_response.py | 5 +
.../types/telemetry_get_span_response.py | 7 +
.../types/telemetry_query_spans_response.py | 7 +
src/llama_stack_client/types/tool.py | 10 ++
src/llama_stack_client/types/tool_def.py | 9 ++
.../types/tool_def_param.py | 9 ++
src/llama_stack_client/types/tool_group.py | 4 +
.../types/tool_invocation_result.py | 5 +-
src/llama_stack_client/types/tool_response.py | 5 +-
.../types/tool_response_param.py | 5 +-
.../tool_runtime/rag_tool_insert_params.py | 3 +
.../tool_runtime/rag_tool_query_params.py | 5 +-
.../types/tool_runtime_list_tools_params.py | 1 +
.../types/toolgroup_register_params.py | 1 +
src/llama_stack_client/types/trace.py | 4 +
.../types/vector_db_list_response.py | 3 +
.../types/vector_db_register_response.py | 3 +
.../types/vector_db_retrieve_response.py | 3 +
src/llama_stack_client/types/vector_store.py | 16 ++
.../types/vector_store_delete_response.py | 3 +
.../types/vector_store_search_params.py | 2 +
.../types/vector_store_search_response.py | 12 ++
.../vector_stores/file_content_response.py | 6 +
.../types/vector_stores/file_create_params.py | 5 +
.../vector_stores/file_delete_response.py | 3 +
.../types/vector_stores/file_list_params.py | 19 +++
.../types/vector_stores/file_list_response.py | 5 +
.../types/vector_stores/vector_store_file.py | 16 ++
src/llama_stack_client/types/version_info.py | 1 +
111 files changed, 1114 insertions(+), 55 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 8a2e9b6f..611c42e2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-fe0ae8a478adcaa69c96b9ee501073818e499700ce2ec66dd7f6eaf4c3fcf69c.yml
-openapi_spec_hash: 418d4a00c4676bbb2973b64a93484965
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bb6596edeb9aa753145023f1950a340bc1701d5339b3fe7ea5d949fe6518f2c9.yml
+openapi_spec_hash: 2602f83d69df2cbde50321d06fa9ac9b
config_hash: e6c3e48e220b264936ee6df8b996ab12
diff --git a/src/llama_stack_client/resources/inspect.py b/src/llama_stack_client/resources/inspect.py
index eb028c16..bd67ae96 100644
--- a/src/llama_stack_client/resources/inspect.py
+++ b/src/llama_stack_client/resources/inspect.py
@@ -50,7 +50,7 @@ def health(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> HealthInfo:
- """Get the health of the service."""
+ """Get the current health status of the service."""
return self._get(
"/v1/health",
options=make_request_options(
@@ -109,7 +109,7 @@ async def health(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> HealthInfo:
- """Get the health of the service."""
+ """Get the current health status of the service."""
return await self._get(
"/v1/health",
options=make_request_options(
diff --git a/src/llama_stack_client/resources/responses/responses.py b/src/llama_stack_client/resources/responses/responses.py
index fa05f7ed..f958f556 100644
--- a/src/llama_stack_client/resources/responses/responses.py
+++ b/src/llama_stack_client/resources/responses/responses.py
@@ -92,6 +92,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -135,6 +137,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -178,6 +182,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -381,6 +387,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -424,6 +432,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -467,6 +477,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/llama_stack_client/resources/routes.py b/src/llama_stack_client/resources/routes.py
index a95b5e06..7d544c0e 100644
--- a/src/llama_stack_client/resources/routes.py
+++ b/src/llama_stack_client/resources/routes.py
@@ -52,7 +52,7 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteListResponse:
- """List all routes."""
+ """List all available API routes with their methods and implementing providers."""
return self._get(
"/v1/inspect/routes",
options=make_request_options(
@@ -96,7 +96,7 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteListResponse:
- """List all routes."""
+ """List all available API routes with their methods and implementing providers."""
return await self._get(
"/v1/inspect/routes",
options=make_request_options(
diff --git a/src/llama_stack_client/resources/synthetic_data_generation.py b/src/llama_stack_client/resources/synthetic_data_generation.py
index 6e4e5a08..0843eafe 100644
--- a/src/llama_stack_client/resources/synthetic_data_generation.py
+++ b/src/llama_stack_client/resources/synthetic_data_generation.py
@@ -59,8 +59,15 @@ def generate(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyntheticDataGenerationResponse:
"""
+ Generate synthetic data based on input dialogs and apply filtering.
+
Args:
- filtering_function: The type of filtering function.
+ dialogs: List of conversation messages to use as input for synthetic data generation
+
+ filtering_function: Type of filtering to apply to generated synthetic data samples
+
+ model: (Optional) The identifier of the model to use. The model must be registered with
+ Llama Stack and available via the /models endpoint
extra_headers: Send extra headers
@@ -121,8 +128,15 @@ async def generate(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyntheticDataGenerationResponse:
"""
+ Generate synthetic data based on input dialogs and apply filtering.
+
Args:
- filtering_function: The type of filtering function.
+ dialogs: List of conversation messages to use as input for synthetic data generation
+
+ filtering_function: Type of filtering to apply to generated synthetic data samples
+
+ model: (Optional) The identifier of the model to use. The model must be registered with
+ Llama Stack and available via the /models endpoint
extra_headers: Send extra headers
diff --git a/src/llama_stack_client/resources/tool_runtime/rag_tool.py b/src/llama_stack_client/resources/tool_runtime/rag_tool.py
index 65ef0463..3ff25968 100644
--- a/src/llama_stack_client/resources/tool_runtime/rag_tool.py
+++ b/src/llama_stack_client/resources/tool_runtime/rag_tool.py
@@ -60,9 +60,15 @@ def insert(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
- Index documents so they can be used by the RAG system
+ Index documents so they can be used by the RAG system.
Args:
+ chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing
+
+ documents: List of documents to index in the RAG system
+
+ vector_db_id: ID of the vector database to store the document embeddings
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -102,12 +108,14 @@ def query(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> QueryResult:
"""
- Query the RAG system for context; typically invoked by the agent
+ Query the RAG system for context; typically invoked by the agent.
Args:
- content: A image content item
+ content: The query content to search for in the indexed documents
+
+ vector_db_ids: List of vector database IDs to search within
- query_config: Configuration for the RAG query generation.
+ query_config: (Optional) Configuration parameters for the query operation
extra_headers: Send extra headers
@@ -168,9 +176,15 @@ async def insert(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
- Index documents so they can be used by the RAG system
+ Index documents so they can be used by the RAG system.
Args:
+ chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing
+
+ documents: List of documents to index in the RAG system
+
+ vector_db_id: ID of the vector database to store the document embeddings
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -210,12 +224,14 @@ async def query(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> QueryResult:
"""
- Query the RAG system for context; typically invoked by the agent
+ Query the RAG system for context; typically invoked by the agent.
Args:
- content: A image content item
+ content: The query content to search for in the indexed documents
+
+ vector_db_ids: List of vector database IDs to search within
- query_config: Configuration for the RAG query generation.
+ query_config: (Optional) Configuration parameters for the query operation
extra_headers: Send extra headers
diff --git a/src/llama_stack_client/resources/vector_stores/files.py b/src/llama_stack_client/resources/vector_stores/files.py
index 4ea92a1e..34757751 100644
--- a/src/llama_stack_client/resources/vector_stores/files.py
+++ b/src/llama_stack_client/resources/vector_stores/files.py
@@ -193,6 +193,20 @@ def list(
List files in a vector store.
Args:
+ after: (Optional) A cursor for use in pagination. `after` is an object ID that defines
+ your place in the list.
+
+ before: (Optional) A cursor for use in pagination. `before` is an object ID that defines
+ your place in the list.
+
+ filter: (Optional) Filter by file status to only return files with the specified status.
+
+ limit: (Optional) A limit on the number of objects to be returned. Limit can range
+ between 1 and 100, and the default is 20.
+
+ order: (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for
+ ascending order and `desc` for descending order.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -463,6 +477,20 @@ async def list(
List files in a vector store.
Args:
+ after: (Optional) A cursor for use in pagination. `after` is an object ID that defines
+ your place in the list.
+
+ before: (Optional) A cursor for use in pagination. `before` is an object ID that defines
+ your place in the list.
+
+ filter: (Optional) Filter by file status to only return files with the specified status.
+
+ limit: (Optional) A limit on the number of objects to be returned. Limit can range
+ between 1 and 100, and the default is 20.
+
+ order: (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for
+ ascending order and `desc` for descending order.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/llama_stack_client/types/agent_create_response.py b/src/llama_stack_client/types/agent_create_response.py
index 93651cb6..24fe864e 100644
--- a/src/llama_stack_client/types/agent_create_response.py
+++ b/src/llama_stack_client/types/agent_create_response.py
@@ -7,3 +7,4 @@
class AgentCreateResponse(BaseModel):
agent_id: str
+ """Unique identifier for the created agent"""
diff --git a/src/llama_stack_client/types/agent_retrieve_response.py b/src/llama_stack_client/types/agent_retrieve_response.py
index 132821cb..1671a9fc 100644
--- a/src/llama_stack_client/types/agent_retrieve_response.py
+++ b/src/llama_stack_client/types/agent_retrieve_response.py
@@ -10,8 +10,10 @@
class AgentRetrieveResponse(BaseModel):
agent_config: AgentConfig
- """Configuration for an agent."""
+ """Configuration settings for the agent"""
agent_id: str
+ """Unique identifier for the agent"""
created_at: datetime
+ """Timestamp when the agent was created"""
diff --git a/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py b/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
index c488ba81..1ce1b8a7 100644
--- a/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
+++ b/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
@@ -8,3 +8,4 @@
class AgentTurnResponseStreamChunk(BaseModel):
event: TurnResponseEvent
+ """Individual event in the agent turn response stream"""
diff --git a/src/llama_stack_client/types/agents/session.py b/src/llama_stack_client/types/agents/session.py
index 707c4cbf..1d3d697e 100644
--- a/src/llama_stack_client/types/agents/session.py
+++ b/src/llama_stack_client/types/agents/session.py
@@ -11,9 +11,13 @@
class Session(BaseModel):
session_id: str
+ """Unique identifier for the conversation session"""
session_name: str
+ """Human-readable name for the session"""
started_at: datetime
+ """Timestamp when the session was created"""
turns: List[Turn]
+ """List of all turns that have occurred in this session"""
diff --git a/src/llama_stack_client/types/agents/session_create_response.py b/src/llama_stack_client/types/agents/session_create_response.py
index abf18665..e7fe2a06 100644
--- a/src/llama_stack_client/types/agents/session_create_response.py
+++ b/src/llama_stack_client/types/agents/session_create_response.py
@@ -7,3 +7,4 @@
class SessionCreateResponse(BaseModel):
session_id: str
+ """Unique identifier for the created session"""
diff --git a/src/llama_stack_client/types/agents/step_retrieve_response.py b/src/llama_stack_client/types/agents/step_retrieve_response.py
index fcf2044b..10fc13d2 100644
--- a/src/llama_stack_client/types/agents/step_retrieve_response.py
+++ b/src/llama_stack_client/types/agents/step_retrieve_response.py
@@ -20,4 +20,4 @@
class StepRetrieveResponse(BaseModel):
step: Step
- """An inference step in an agent turn."""
+ """The complete step data and execution details"""
diff --git a/src/llama_stack_client/types/agents/turn.py b/src/llama_stack_client/types/agents/turn.py
index aa8eeefe..386d7f78 100644
--- a/src/llama_stack_client/types/agents/turn.py
+++ b/src/llama_stack_client/types/agents/turn.py
@@ -38,6 +38,7 @@
class OutputAttachmentContentImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class OutputAttachmentContentImageContentItemImage(BaseModel):
@@ -69,6 +70,7 @@ class OutputAttachmentContentTextContentItem(BaseModel):
class OutputAttachmentContentURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
OutputAttachmentContent: TypeAlias = Union[
@@ -90,18 +92,25 @@ class OutputAttachment(BaseModel):
class Turn(BaseModel):
input_messages: List[InputMessage]
+ """List of messages that initiated this turn"""
output_message: CompletionMessage
- """A message containing the model's (assistant) response in a chat conversation."""
+ """The model's generated response containing content and metadata"""
session_id: str
+ """Unique identifier for the conversation session"""
started_at: datetime
+ """Timestamp when the turn began"""
steps: List[Step]
+ """Ordered list of processing steps executed during this turn"""
turn_id: str
+ """Unique identifier for the turn within a session"""
completed_at: Optional[datetime] = None
+ """(Optional) Timestamp when the turn finished, if completed"""
output_attachments: Optional[List[OutputAttachment]] = None
+ """(Optional) Files or media attached to the agent's response"""
diff --git a/src/llama_stack_client/types/agents/turn_create_params.py b/src/llama_stack_client/types/agents/turn_create_params.py
index 01e0f64b..fbb8de8e 100644
--- a/src/llama_stack_client/types/agents/turn_create_params.py
+++ b/src/llama_stack_client/types/agents/turn_create_params.py
@@ -54,6 +54,7 @@ class TurnCreateParamsBase(TypedDict, total=False):
class DocumentContentImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class DocumentContentImageContentItemImage(TypedDict, total=False):
@@ -85,6 +86,7 @@ class DocumentContentTextContentItem(TypedDict, total=False):
class DocumentContentURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
DocumentContent: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/agents/turn_response_event.py b/src/llama_stack_client/types/agents/turn_response_event.py
index c6a42d75..df213246 100644
--- a/src/llama_stack_client/types/agents/turn_response_event.py
+++ b/src/llama_stack_client/types/agents/turn_response_event.py
@@ -8,3 +8,4 @@
class TurnResponseEvent(BaseModel):
payload: TurnResponseEventPayload
+ """Event-specific payload containing event data"""
diff --git a/src/llama_stack_client/types/agents/turn_response_event_payload.py b/src/llama_stack_client/types/agents/turn_response_event_payload.py
index 345a7ec4..1844c61e 100644
--- a/src/llama_stack_client/types/agents/turn_response_event_payload.py
+++ b/src/llama_stack_client/types/agents/turn_response_event_payload.py
@@ -26,24 +26,30 @@
class AgentTurnResponseStepStartPayload(BaseModel):
event_type: Literal["step_start"]
+ """Type of event being reported"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata for the step"""
class AgentTurnResponseStepProgressPayload(BaseModel):
delta: ContentDelta
+ """Incremental content changes during step execution"""
event_type: Literal["step_progress"]
+ """Type of event being reported"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
AgentTurnResponseStepCompletePayloadStepDetails: TypeAlias = Annotated[
@@ -54,34 +60,40 @@ class AgentTurnResponseStepProgressPayload(BaseModel):
class AgentTurnResponseStepCompletePayload(BaseModel):
event_type: Literal["step_complete"]
+ """Type of event being reported"""
step_details: AgentTurnResponseStepCompletePayloadStepDetails
- """An inference step in an agent turn."""
+ """Complete details of the executed step"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
class AgentTurnResponseTurnStartPayload(BaseModel):
event_type: Literal["turn_start"]
+ """Type of event being reported"""
turn_id: str
+ """Unique identifier for the turn within a session"""
class AgentTurnResponseTurnCompletePayload(BaseModel):
event_type: Literal["turn_complete"]
+ """Type of event being reported"""
turn: Turn
- """A single turn in an interaction with an Agentic System."""
+ """Complete turn data including all steps and results"""
class AgentTurnResponseTurnAwaitingInputPayload(BaseModel):
event_type: Literal["turn_awaiting_input"]
+ """Type of event being reported"""
turn: Turn
- """A single turn in an interaction with an Agentic System."""
+ """Turn data when waiting for external tool responses"""
TurnResponseEventPayload: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/algorithm_config_param.py b/src/llama_stack_client/types/algorithm_config_param.py
index 3f3c0cac..f2856526 100644
--- a/src/llama_stack_client/types/algorithm_config_param.py
+++ b/src/llama_stack_client/types/algorithm_config_param.py
@@ -10,28 +10,39 @@
class LoraFinetuningConfig(TypedDict, total=False):
alpha: Required[int]
+ """LoRA scaling parameter that controls adaptation strength"""
apply_lora_to_mlp: Required[bool]
+ """Whether to apply LoRA to MLP layers"""
apply_lora_to_output: Required[bool]
+ """Whether to apply LoRA to output projection layers"""
lora_attn_modules: Required[List[str]]
+ """List of attention module names to apply LoRA to"""
rank: Required[int]
+ """Rank of the LoRA adaptation (lower rank = fewer parameters)"""
type: Required[Literal["LoRA"]]
+ """Algorithm type identifier, always "LoRA" """
quantize_base: bool
+ """(Optional) Whether to quantize the base model weights"""
use_dora: bool
+ """(Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)"""
class QatFinetuningConfig(TypedDict, total=False):
group_size: Required[int]
+ """Size of groups for grouped quantization"""
quantizer_name: Required[str]
+ """Name of the quantization algorithm to use"""
type: Required[Literal["QAT"]]
+ """Algorithm type identifier, always "QAT" """
AlgorithmConfigParam: TypeAlias = Union[LoraFinetuningConfig, QatFinetuningConfig]
diff --git a/src/llama_stack_client/types/benchmark.py b/src/llama_stack_client/types/benchmark.py
index e0b1ce9e..eb6dde75 100644
--- a/src/llama_stack_client/types/benchmark.py
+++ b/src/llama_stack_client/types/benchmark.py
@@ -10,15 +10,19 @@
class Benchmark(BaseModel):
dataset_id: str
+ """Identifier of the dataset to use for the benchmark evaluation"""
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Metadata for this evaluation task"""
provider_id: str
scoring_functions: List[str]
+ """List of scoring function identifiers to apply during evaluation"""
type: Literal["benchmark"]
+ """The resource type, always benchmark"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index a487783e..263c1c78 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -109,24 +109,33 @@ class CompletionCreateParamsBase(TypedDict, total=False):
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
TypedDict, total=False
):
url: Required[str]
+ """URL of the image to include in the message"""
detail: str
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(TypedDict, total=False):
image_url: Required[
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
]
+ """Image URL specification and processing details"""
type: Required[Literal["image_url"]]
+ """Must be "image_url" to identify this as image content"""
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(TypedDict, total=False):
@@ -163,8 +172,10 @@ class MessageOpenAIUserMessageParam(TypedDict, total=False):
class MessageOpenAISystemMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAISystemMessageParam(TypedDict, total=False):
@@ -185,24 +196,32 @@ class MessageOpenAISystemMessageParam(TypedDict, total=False):
class MessageOpenAIAssistantMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIAssistantMessageParamToolCallFunction(TypedDict, total=False):
arguments: str
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: str
+ """(Optional) Name of the function to call"""
class MessageOpenAIAssistantMessageParamToolCall(TypedDict, total=False):
type: Required[Literal["function"]]
+ """Must be "function" to identify this as a function call"""
id: str
+ """(Optional) Unique identifier for the tool call"""
function: MessageOpenAIAssistantMessageParamToolCallFunction
+ """(Optional) Function call details"""
index: int
+ """(Optional) Index of the tool call in the list"""
class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
@@ -221,8 +240,10 @@ class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
class MessageOpenAIToolMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIToolMessageParam(TypedDict, total=False):
@@ -238,8 +259,10 @@ class MessageOpenAIToolMessageParam(TypedDict, total=False):
class MessageOpenAIDeveloperMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
@@ -264,26 +287,34 @@ class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
class ResponseFormatOpenAIResponseFormatText(TypedDict, total=False):
type: Required[Literal["text"]]
+ """Must be "text" to indicate plain text response format"""
class ResponseFormatOpenAIResponseFormatJsonSchemaJsonSchema(TypedDict, total=False):
name: Required[str]
+ """Name of the schema"""
description: str
+ """(Optional) Description of the schema"""
schema: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) The JSON schema definition"""
strict: bool
+ """(Optional) Whether to enforce strict adherence to the schema"""
class ResponseFormatOpenAIResponseFormatJsonSchema(TypedDict, total=False):
json_schema: Required[ResponseFormatOpenAIResponseFormatJsonSchemaJsonSchema]
+ """The JSON schema specification for the response"""
type: Required[Literal["json_schema"]]
+ """Must be "json_schema" to indicate structured JSON response format"""
class ResponseFormatOpenAIResponseFormatJsonObject(TypedDict, total=False):
type: Required[Literal["json_object"]]
+ """Must be "json_object" to indicate generic JSON object response format"""
ResponseFormat: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index d22cd188..7c6b2299 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -41,24 +41,33 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1
BaseModel
):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
BaseModel
):
image_url: OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -98,8 +107,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -120,24 +131,32 @@ class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -158,8 +177,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -175,8 +196,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index f9f6c335..5f7731cc 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -56,24 +56,33 @@
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: (
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
)
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -113,8 +122,10 @@ class DataChoiceMessageOpenAIUserMessageParam(BaseModel):
class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -135,24 +146,32 @@ class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class DataChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -171,8 +190,10 @@ class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -188,8 +209,10 @@ class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -275,24 +298,33 @@ class DataChoice(BaseModel):
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: (
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
)
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -332,8 +364,10 @@ class DataInputMessageOpenAIUserMessageParam(BaseModel):
class DataInputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAISystemMessageParam(BaseModel):
@@ -354,24 +388,32 @@ class DataInputMessageOpenAISystemMessageParam(BaseModel):
class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class DataInputMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[DataInputMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
@@ -390,8 +432,10 @@ class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
class DataInputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIToolMessageParam(BaseModel):
@@ -407,8 +451,10 @@ class DataInputMessageOpenAIToolMessageParam(BaseModel):
class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -455,11 +501,16 @@ class Data(BaseModel):
class CompletionListResponse(BaseModel):
data: List[Data]
+ """List of chat completion objects with their input messages"""
first_id: str
+ """ID of the first completion in this list"""
has_more: bool
+ """Whether there are more completions available beyond this list"""
last_id: str
+ """ID of the last completion in this list"""
object: Literal["list"]
+ """Must be "list" to identify this as a list response"""
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index eb13bb97..74b60c35 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -55,22 +55,31 @@
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -110,8 +119,10 @@ class ChoiceMessageOpenAIUserMessageParam(BaseModel):
class ChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -132,24 +143,32 @@ class ChoiceMessageOpenAISystemMessageParam(BaseModel):
class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class ChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[ChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -168,8 +187,10 @@ class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class ChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -185,8 +206,10 @@ class ChoiceMessageOpenAIToolMessageParam(BaseModel):
class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -272,20 +295,29 @@ class Choice(BaseModel):
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(BaseModel):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -325,8 +357,10 @@ class InputMessageOpenAIUserMessageParam(BaseModel):
class InputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAISystemMessageParam(BaseModel):
@@ -347,24 +381,32 @@ class InputMessageOpenAISystemMessageParam(BaseModel):
class InputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class InputMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[InputMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class InputMessageOpenAIAssistantMessageParam(BaseModel):
@@ -383,8 +425,10 @@ class InputMessageOpenAIAssistantMessageParam(BaseModel):
class InputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIToolMessageParam(BaseModel):
@@ -400,8 +444,10 @@ class InputMessageOpenAIToolMessageParam(BaseModel):
class InputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIDeveloperMessageParam(BaseModel):
diff --git a/src/llama_stack_client/types/chat_completion_chunk.py b/src/llama_stack_client/types/chat_completion_chunk.py
index 7d74663a..788a34ed 100644
--- a/src/llama_stack_client/types/chat_completion_chunk.py
+++ b/src/llama_stack_client/types/chat_completion_chunk.py
@@ -21,18 +21,24 @@
class ChoiceDeltaToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class ChoiceDeltaToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[ChoiceDeltaToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class ChoiceDelta(BaseModel):
diff --git a/src/llama_stack_client/types/chat_completion_response_stream_chunk.py b/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
index 3c236fd4..2b94eb18 100644
--- a/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
+++ b/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
@@ -29,10 +29,13 @@ class Event(BaseModel):
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class ChatCompletionResponseStreamChunk(BaseModel):
@@ -40,3 +43,4 @@ class ChatCompletionResponseStreamChunk(BaseModel):
"""The event containing the new content"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/completion_response.py b/src/llama_stack_client/types/completion_response.py
index 78254b28..51772801 100644
--- a/src/llama_stack_client/types/completion_response.py
+++ b/src/llama_stack_client/types/completion_response.py
@@ -11,10 +11,13 @@
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class CompletionResponse(BaseModel):
@@ -28,3 +31,4 @@ class CompletionResponse(BaseModel):
"""Optional log probabilities for generated tokens"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/dataset_list_response.py b/src/llama_stack_client/types/dataset_list_response.py
index 42b27ab4..7080e589 100644
--- a/src/llama_stack_client/types/dataset_list_response.py
+++ b/src/llama_stack_client/types/dataset_list_response.py
@@ -47,16 +47,18 @@ class DatasetListResponseItem(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: DatasetListResponseItemSource
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/dataset_register_response.py b/src/llama_stack_client/types/dataset_register_response.py
index a79367bb..8da590b8 100644
--- a/src/llama_stack_client/types/dataset_register_response.py
+++ b/src/llama_stack_client/types/dataset_register_response.py
@@ -38,15 +38,17 @@ class DatasetRegisterResponse(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: Source
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/dataset_retrieve_response.py b/src/llama_stack_client/types/dataset_retrieve_response.py
index ab96c387..6cda0a42 100644
--- a/src/llama_stack_client/types/dataset_retrieve_response.py
+++ b/src/llama_stack_client/types/dataset_retrieve_response.py
@@ -38,15 +38,17 @@ class DatasetRetrieveResponse(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: Source
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/event_param.py b/src/llama_stack_client/types/event_param.py
index 500e4a24..b26f2916 100644
--- a/src/llama_stack_client/types/event_param.py
+++ b/src/llama_stack_client/types/event_param.py
@@ -21,50 +21,70 @@
class UnstructuredLogEvent(TypedDict, total=False):
message: Required[str]
+ """The log message text"""
severity: Required[Literal["verbose", "debug", "info", "warn", "error", "critical"]]
+ """The severity level of the log message"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["unstructured_log"]]
+ """Event type identifier set to UNSTRUCTURED_LOG"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
class MetricEvent(TypedDict, total=False):
metric: Required[str]
+ """The name of the metric being measured"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["metric"]]
+ """Event type identifier set to METRIC"""
unit: Required[str]
+ """The unit of measurement for the metric value"""
value: Required[float]
+ """The numeric value of the metric measurement"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
class StructuredLogEventPayloadSpanStartPayload(TypedDict, total=False):
name: Required[str]
+ """Human-readable name describing the operation this span represents"""
type: Required[Literal["span_start"]]
+ """Payload type identifier set to SPAN_START"""
parent_span_id: str
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
class StructuredLogEventPayloadSpanEndPayload(TypedDict, total=False):
status: Required[Literal["ok", "error"]]
+ """The final status of the span indicating success or failure"""
type: Required[Literal["span_end"]]
+ """Payload type identifier set to SPAN_END"""
StructuredLogEventPayload: TypeAlias = Union[
@@ -74,16 +94,22 @@ class StructuredLogEventPayloadSpanEndPayload(TypedDict, total=False):
class StructuredLogEvent(TypedDict, total=False):
payload: Required[StructuredLogEventPayload]
+ """The structured payload data for the log event"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["structured_log"]]
+ """Event type identifier set to STRUCTURED_LOG"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
EventParam: TypeAlias = Union[UnstructuredLogEvent, MetricEvent, StructuredLogEvent]
diff --git a/src/llama_stack_client/types/health_info.py b/src/llama_stack_client/types/health_info.py
index 3441ddd1..86410ed0 100644
--- a/src/llama_stack_client/types/health_info.py
+++ b/src/llama_stack_client/types/health_info.py
@@ -9,3 +9,4 @@
class HealthInfo(BaseModel):
status: Literal["OK", "Error", "Not Implemented"]
+ """Current health status of the service"""
diff --git a/src/llama_stack_client/types/inference_batch_chat_completion_response.py b/src/llama_stack_client/types/inference_batch_chat_completion_response.py
index 84d6c425..ed24908d 100644
--- a/src/llama_stack_client/types/inference_batch_chat_completion_response.py
+++ b/src/llama_stack_client/types/inference_batch_chat_completion_response.py
@@ -10,3 +10,4 @@
class InferenceBatchChatCompletionResponse(BaseModel):
batch: List[ChatCompletionResponse]
+ """List of chat completion responses, one for each conversation in the batch"""
diff --git a/src/llama_stack_client/types/job.py b/src/llama_stack_client/types/job.py
index 4953b3bf..9635de38 100644
--- a/src/llama_stack_client/types/job.py
+++ b/src/llama_stack_client/types/job.py
@@ -9,5 +9,7 @@
class Job(BaseModel):
job_id: str
+ """Unique identifier for the job"""
status: Literal["completed", "in_progress", "failed", "scheduled", "cancelled"]
+ """Current execution status of the job"""
diff --git a/src/llama_stack_client/types/list_datasets_response.py b/src/llama_stack_client/types/list_datasets_response.py
index 5a897f78..21c4b72a 100644
--- a/src/llama_stack_client/types/list_datasets_response.py
+++ b/src/llama_stack_client/types/list_datasets_response.py
@@ -8,3 +8,4 @@
class ListDatasetsResponse(BaseModel):
data: DatasetListResponse
+ """List of datasets"""
diff --git a/src/llama_stack_client/types/list_files_response.py b/src/llama_stack_client/types/list_files_response.py
index cbb7d514..fb42f298 100644
--- a/src/llama_stack_client/types/list_files_response.py
+++ b/src/llama_stack_client/types/list_files_response.py
@@ -14,10 +14,13 @@ class ListFilesResponse(BaseModel):
"""List of file objects"""
first_id: str
+ """ID of the first file in the list for pagination"""
has_more: bool
+ """Whether there are more files available beyond this page"""
last_id: str
+ """ID of the last file in the list for pagination"""
object: Literal["list"]
"""The object type, which is always "list" """
diff --git a/src/llama_stack_client/types/list_providers_response.py b/src/llama_stack_client/types/list_providers_response.py
index 4904c0b1..c75b6880 100644
--- a/src/llama_stack_client/types/list_providers_response.py
+++ b/src/llama_stack_client/types/list_providers_response.py
@@ -8,3 +8,4 @@
class ListProvidersResponse(BaseModel):
data: ProviderListResponse
+ """List of provider information objects"""
diff --git a/src/llama_stack_client/types/list_routes_response.py b/src/llama_stack_client/types/list_routes_response.py
index 59e8392b..d038fe6d 100644
--- a/src/llama_stack_client/types/list_routes_response.py
+++ b/src/llama_stack_client/types/list_routes_response.py
@@ -8,3 +8,4 @@
class ListRoutesResponse(BaseModel):
data: RouteListResponse
+ """List of available route information objects"""
diff --git a/src/llama_stack_client/types/list_tool_groups_response.py b/src/llama_stack_client/types/list_tool_groups_response.py
index 6433b164..94c5c145 100644
--- a/src/llama_stack_client/types/list_tool_groups_response.py
+++ b/src/llama_stack_client/types/list_tool_groups_response.py
@@ -8,3 +8,4 @@
class ListToolGroupsResponse(BaseModel):
data: ToolgroupListResponse
+ """List of tool groups"""
diff --git a/src/llama_stack_client/types/list_tools_response.py b/src/llama_stack_client/types/list_tools_response.py
index c9b4ec6b..47f040b5 100644
--- a/src/llama_stack_client/types/list_tools_response.py
+++ b/src/llama_stack_client/types/list_tools_response.py
@@ -8,3 +8,4 @@
class ListToolsResponse(BaseModel):
data: ToolListResponse
+ """List of tools"""
diff --git a/src/llama_stack_client/types/list_vector_dbs_response.py b/src/llama_stack_client/types/list_vector_dbs_response.py
index fede6c42..5ff7d5e5 100644
--- a/src/llama_stack_client/types/list_vector_dbs_response.py
+++ b/src/llama_stack_client/types/list_vector_dbs_response.py
@@ -8,3 +8,4 @@
class ListVectorDBsResponse(BaseModel):
data: VectorDBListResponse
+ """List of vector databases"""
diff --git a/src/llama_stack_client/types/list_vector_stores_response.py b/src/llama_stack_client/types/list_vector_stores_response.py
index c79fd895..d4960217 100644
--- a/src/llama_stack_client/types/list_vector_stores_response.py
+++ b/src/llama_stack_client/types/list_vector_stores_response.py
@@ -10,11 +10,16 @@
class ListVectorStoresResponse(BaseModel):
data: List[VectorStore]
+ """List of vector store objects"""
has_more: bool
+ """Whether there are more vector stores available beyond this page"""
object: str
+ """Object type identifier, always "list" """
first_id: Optional[str] = None
+ """(Optional) ID of the first vector store in the list for pagination"""
last_id: Optional[str] = None
+ """(Optional) ID of the last vector store in the list for pagination"""
diff --git a/src/llama_stack_client/types/model.py b/src/llama_stack_client/types/model.py
index dea24d53..5651667d 100644
--- a/src/llama_stack_client/types/model.py
+++ b/src/llama_stack_client/types/model.py
@@ -12,13 +12,19 @@
class Model(BaseModel):
identifier: str
+ """Unique identifier for this resource in llama stack"""
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Any additional metadata for this model"""
api_model_type: Literal["llm", "embedding"] = FieldInfo(alias="model_type")
+ """The type of model (LLM or embedding model)"""
provider_id: str
+ """ID of the provider that owns this resource"""
type: Literal["model"]
+ """The resource type, always 'model' for model resources"""
provider_resource_id: Optional[str] = None
+ """Unique identifier for this resource in the provider"""
diff --git a/src/llama_stack_client/types/post_training/job_artifacts_response.py b/src/llama_stack_client/types/post_training/job_artifacts_response.py
index a5646e34..42784aee 100644
--- a/src/llama_stack_client/types/post_training/job_artifacts_response.py
+++ b/src/llama_stack_client/types/post_training/job_artifacts_response.py
@@ -10,29 +10,41 @@
class CheckpointTrainingMetrics(BaseModel):
epoch: int
+ """Training epoch number"""
perplexity: float
+ """Perplexity metric indicating model confidence"""
train_loss: float
+ """Loss value on the training dataset"""
validation_loss: float
+ """Loss value on the validation dataset"""
class Checkpoint(BaseModel):
created_at: datetime
+ """Timestamp when the checkpoint was created"""
epoch: int
+ """Training epoch when the checkpoint was saved"""
identifier: str
+ """Unique identifier for the checkpoint"""
path: str
+ """File system path where the checkpoint is stored"""
post_training_job_id: str
+ """Identifier of the training job that created this checkpoint"""
training_metrics: Optional[CheckpointTrainingMetrics] = None
+ """(Optional) Training metrics associated with this checkpoint"""
class JobArtifactsResponse(BaseModel):
checkpoints: List[Checkpoint]
+ """List of model checkpoints created during training"""
job_uuid: str
+ """Unique identifier for the training job"""
diff --git a/src/llama_stack_client/types/post_training/job_status_response.py b/src/llama_stack_client/types/post_training/job_status_response.py
index e830b10d..94379579 100644
--- a/src/llama_stack_client/types/post_training/job_status_response.py
+++ b/src/llama_stack_client/types/post_training/job_status_response.py
@@ -11,39 +11,56 @@
class CheckpointTrainingMetrics(BaseModel):
epoch: int
+ """Training epoch number"""
perplexity: float
+ """Perplexity metric indicating model confidence"""
train_loss: float
+ """Loss value on the training dataset"""
validation_loss: float
+ """Loss value on the validation dataset"""
class Checkpoint(BaseModel):
created_at: datetime
+ """Timestamp when the checkpoint was created"""
epoch: int
+ """Training epoch when the checkpoint was saved"""
identifier: str
+ """Unique identifier for the checkpoint"""
path: str
+ """File system path where the checkpoint is stored"""
post_training_job_id: str
+ """Identifier of the training job that created this checkpoint"""
training_metrics: Optional[CheckpointTrainingMetrics] = None
+ """(Optional) Training metrics associated with this checkpoint"""
class JobStatusResponse(BaseModel):
checkpoints: List[Checkpoint]
+ """List of model checkpoints created during training"""
job_uuid: str
+ """Unique identifier for the training job"""
status: Literal["completed", "in_progress", "failed", "scheduled", "cancelled"]
+ """Current status of the training job"""
completed_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job finished, if completed"""
resources_allocated: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Information about computational resources allocated to the job"""
scheduled_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job was scheduled"""
started_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job execution began"""
diff --git a/src/llama_stack_client/types/post_training_preference_optimize_params.py b/src/llama_stack_client/types/post_training_preference_optimize_params.py
index 9d9f8c8c..2dcd294d 100644
--- a/src/llama_stack_client/types/post_training_preference_optimize_params.py
+++ b/src/llama_stack_client/types/post_training_preference_optimize_params.py
@@ -37,59 +37,87 @@ class PostTrainingPreferenceOptimizeParams(TypedDict, total=False):
class AlgorithmConfig(TypedDict, total=False):
beta: Required[float]
+ """Temperature parameter for the DPO loss"""
loss_type: Required[Literal["sigmoid", "hinge", "ipo", "kto_pair"]]
+ """The type of loss function to use for DPO"""
class TrainingConfigDataConfig(TypedDict, total=False):
batch_size: Required[int]
+ """Number of samples per training batch"""
data_format: Required[Literal["instruct", "dialog"]]
+ """Format of the dataset (instruct or dialog)"""
dataset_id: Required[str]
+ """Unique identifier for the training dataset"""
shuffle: Required[bool]
+ """Whether to shuffle the dataset during training"""
packed: bool
+ """
+ (Optional) Whether to pack multiple samples into a single sequence for
+ efficiency
+ """
train_on_input: bool
+ """(Optional) Whether to compute loss on input tokens as well as output tokens"""
validation_dataset_id: str
+ """(Optional) Unique identifier for the validation dataset"""
class TrainingConfigEfficiencyConfig(TypedDict, total=False):
enable_activation_checkpointing: bool
+ """(Optional) Whether to use activation checkpointing to reduce memory usage"""
enable_activation_offloading: bool
+ """(Optional) Whether to offload activations to CPU to save GPU memory"""
fsdp_cpu_offload: bool
+ """(Optional) Whether to offload FSDP parameters to CPU"""
memory_efficient_fsdp_wrap: bool
+ """(Optional) Whether to use memory-efficient FSDP wrapping"""
class TrainingConfigOptimizerConfig(TypedDict, total=False):
lr: Required[float]
+ """Learning rate for the optimizer"""
num_warmup_steps: Required[int]
+ """Number of steps for learning rate warmup"""
optimizer_type: Required[Literal["adam", "adamw", "sgd"]]
+ """Type of optimizer to use (adam, adamw, or sgd)"""
weight_decay: Required[float]
+ """Weight decay coefficient for regularization"""
class TrainingConfig(TypedDict, total=False):
gradient_accumulation_steps: Required[int]
+ """Number of steps to accumulate gradients before updating"""
max_steps_per_epoch: Required[int]
+ """Maximum number of steps to run per epoch"""
n_epochs: Required[int]
+ """Number of training epochs to run"""
data_config: TrainingConfigDataConfig
+ """(Optional) Configuration for data loading and formatting"""
dtype: str
+ """(Optional) Data type for model parameters (bf16, fp16, fp32)"""
efficiency_config: TrainingConfigEfficiencyConfig
+ """(Optional) Configuration for memory and compute optimizations"""
max_validation_steps: int
+ """(Optional) Maximum number of validation steps per epoch"""
optimizer_config: TrainingConfigOptimizerConfig
+ """(Optional) Configuration for the optimization algorithm"""
diff --git a/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py b/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
index 596ec18b..c23796f0 100644
--- a/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
+++ b/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
@@ -41,53 +41,79 @@ class PostTrainingSupervisedFineTuneParams(TypedDict, total=False):
class TrainingConfigDataConfig(TypedDict, total=False):
batch_size: Required[int]
+ """Number of samples per training batch"""
data_format: Required[Literal["instruct", "dialog"]]
+ """Format of the dataset (instruct or dialog)"""
dataset_id: Required[str]
+ """Unique identifier for the training dataset"""
shuffle: Required[bool]
+ """Whether to shuffle the dataset during training"""
packed: bool
+ """
+ (Optional) Whether to pack multiple samples into a single sequence for
+ efficiency
+ """
train_on_input: bool
+ """(Optional) Whether to compute loss on input tokens as well as output tokens"""
validation_dataset_id: str
+ """(Optional) Unique identifier for the validation dataset"""
class TrainingConfigEfficiencyConfig(TypedDict, total=False):
enable_activation_checkpointing: bool
+ """(Optional) Whether to use activation checkpointing to reduce memory usage"""
enable_activation_offloading: bool
+ """(Optional) Whether to offload activations to CPU to save GPU memory"""
fsdp_cpu_offload: bool
+ """(Optional) Whether to offload FSDP parameters to CPU"""
memory_efficient_fsdp_wrap: bool
+ """(Optional) Whether to use memory-efficient FSDP wrapping"""
class TrainingConfigOptimizerConfig(TypedDict, total=False):
lr: Required[float]
+ """Learning rate for the optimizer"""
num_warmup_steps: Required[int]
+ """Number of steps for learning rate warmup"""
optimizer_type: Required[Literal["adam", "adamw", "sgd"]]
+ """Type of optimizer to use (adam, adamw, or sgd)"""
weight_decay: Required[float]
+ """Weight decay coefficient for regularization"""
class TrainingConfig(TypedDict, total=False):
gradient_accumulation_steps: Required[int]
+ """Number of steps to accumulate gradients before updating"""
max_steps_per_epoch: Required[int]
+ """Maximum number of steps to run per epoch"""
n_epochs: Required[int]
+ """Number of training epochs to run"""
data_config: TrainingConfigDataConfig
+ """(Optional) Configuration for data loading and formatting"""
dtype: str
+ """(Optional) Data type for model parameters (bf16, fp16, fp32)"""
efficiency_config: TrainingConfigEfficiencyConfig
+ """(Optional) Configuration for memory and compute optimizations"""
max_validation_steps: int
+ """(Optional) Maximum number of validation steps per epoch"""
optimizer_config: TrainingConfigOptimizerConfig
+ """(Optional) Configuration for the optimization algorithm"""
diff --git a/src/llama_stack_client/types/provider_info.py b/src/llama_stack_client/types/provider_info.py
index c9c748cc..6b8a1ec6 100644
--- a/src/llama_stack_client/types/provider_info.py
+++ b/src/llama_stack_client/types/provider_info.py
@@ -9,11 +9,16 @@
class ProviderInfo(BaseModel):
api: str
+ """The API name this provider implements"""
config: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Configuration parameters for the provider"""
health: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Current health status of the provider"""
provider_id: str
+ """Unique identifier for the provider"""
provider_type: str
+ """The type of provider implementation"""
diff --git a/src/llama_stack_client/types/query_chunks_response.py b/src/llama_stack_client/types/query_chunks_response.py
index 97c1927c..6a06b3f2 100644
--- a/src/llama_stack_client/types/query_chunks_response.py
+++ b/src/llama_stack_client/types/query_chunks_response.py
@@ -76,5 +76,7 @@ class Chunk(BaseModel):
class QueryChunksResponse(BaseModel):
chunks: List[Chunk]
+ """List of content chunks returned from the query"""
scores: List[float]
+ """Relevance scores corresponding to each returned chunk"""
diff --git a/src/llama_stack_client/types/query_condition_param.py b/src/llama_stack_client/types/query_condition_param.py
index 37c48093..59def1b4 100644
--- a/src/llama_stack_client/types/query_condition_param.py
+++ b/src/llama_stack_client/types/query_condition_param.py
@@ -10,7 +10,10 @@
class QueryConditionParam(TypedDict, total=False):
key: Required[str]
+ """The attribute key to filter on"""
op: Required[Literal["eq", "ne", "gt", "lt"]]
+ """The comparison operator to apply"""
value: Required[Union[bool, float, str, Iterable[object], object, None]]
+ """The value to compare against"""
diff --git a/src/llama_stack_client/types/query_spans_response.py b/src/llama_stack_client/types/query_spans_response.py
index 488a4331..a20c9b92 100644
--- a/src/llama_stack_client/types/query_spans_response.py
+++ b/src/llama_stack_client/types/query_spans_response.py
@@ -8,3 +8,4 @@
class QuerySpansResponse(BaseModel):
data: TelemetryQuerySpansResponse
+ """List of spans matching the query criteria"""
diff --git a/src/llama_stack_client/types/response_create_params.py b/src/llama_stack_client/types/response_create_params.py
index 471d8b21..74857714 100644
--- a/src/llama_stack_client/types/response_create_params.py
+++ b/src/llama_stack_client/types/response_create_params.py
@@ -62,42 +62,57 @@ class ResponseCreateParamsBase(TypedDict, total=False):
temperature: float
text: Text
+ """Text response configuration for OpenAI responses."""
tools: Iterable[Tool]
class InputUnionMember1OpenAIResponseOutputMessageWebSearchToolCall(TypedDict, total=False):
id: Required[str]
+ """Unique identifier for this tool call"""
status: Required[str]
+ """Current status of the web search operation"""
type: Required[Literal["web_search_call"]]
+ """Tool call type identifier, always "web_search_call" """
class InputUnionMember1OpenAIResponseOutputMessageFileSearchToolCall(TypedDict, total=False):
id: Required[str]
+ """Unique identifier for this tool call"""
queries: Required[List[str]]
+ """List of search queries executed"""
status: Required[str]
+ """Current status of the file search operation"""
type: Required[Literal["file_search_call"]]
+ """Tool call type identifier, always "file_search_call" """
results: Iterable[Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
+ """(Optional) Search results returned by the file search operation"""
class InputUnionMember1OpenAIResponseOutputMessageFunctionToolCall(TypedDict, total=False):
arguments: Required[str]
+ """JSON string containing the function arguments"""
call_id: Required[str]
+ """Unique identifier for the function call"""
name: Required[str]
+ """Name of the function being called"""
type: Required[Literal["function_call"]]
+ """Tool call type identifier, always "function_call" """
id: str
+ """(Optional) Additional identifier for the tool call"""
status: str
+ """(Optional) Current status of the function call execution"""
class InputUnionMember1OpenAIResponseInputFunctionToolCallOutput(TypedDict, total=False):
@@ -116,18 +131,23 @@ class InputUnionMember1OpenAIResponseMessageContentUnionMember1OpenAIResponseInp
TypedDict, total=False
):
text: Required[str]
+ """The text content of the input message"""
type: Required[Literal["input_text"]]
+ """Content type identifier, always "input_text" """
class InputUnionMember1OpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
TypedDict, total=False
):
detail: Required[Literal["low", "high", "auto"]]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Required[Literal["input_image"]]
+ """Content type identifier, always "input_image" """
image_url: str
+ """(Optional) URL of the image content"""
InputUnionMember1OpenAIResponseMessageContentUnionMember1: TypeAlias = Union[
@@ -140,26 +160,35 @@ class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIR
TypedDict, total=False
):
file_id: Required[str]
+ """Unique identifier of the referenced file"""
filename: Required[str]
+ """Name of the referenced file"""
index: Required[int]
+ """Position index of the citation within the content"""
type: Required[Literal["file_citation"]]
+ """Annotation type identifier, always "file_citation" """
class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
TypedDict, total=False
):
end_index: Required[int]
+ """End position of the citation span in the content"""
start_index: Required[int]
+ """Start position of the citation span in the content"""
title: Required[str]
+ """Title of the referenced web resource"""
type: Required[Literal["url_citation"]]
+ """Annotation type identifier, always "url_citation" """
url: Required[str]
+ """URL of the referenced web resource"""
class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -256,49 +285,65 @@ class TextFormat(TypedDict, total=False):
class Text(TypedDict, total=False):
format: TextFormat
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class ToolOpenAIResponseInputToolWebSearch(TypedDict, total=False):
type: Required[Literal["web_search", "web_search_preview", "web_search_preview_2025_03_11"]]
+ """Web search tool type variant to use"""
search_context_size: str
+ """(Optional) Size of search context, must be "low", "medium", or "high" """
class ToolOpenAIResponseInputToolFileSearchRankingOptions(TypedDict, total=False):
ranker: str
+ """(Optional) Name of the ranking algorithm to use"""
score_threshold: float
+ """(Optional) Minimum relevance score threshold for results"""
class ToolOpenAIResponseInputToolFileSearch(TypedDict, total=False):
type: Required[Literal["file_search"]]
+ """Tool type identifier, always "file_search" """
vector_store_ids: Required[List[str]]
+ """List of vector store identifiers to search within"""
filters: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional filters to apply to the search"""
max_num_results: int
+ """(Optional) Maximum number of search results to return (1-50)"""
ranking_options: ToolOpenAIResponseInputToolFileSearchRankingOptions
+ """(Optional) Options for ranking and scoring search results"""
class ToolOpenAIResponseInputToolFunction(TypedDict, total=False):
name: Required[str]
+ """Name of the function that can be called"""
type: Required[Literal["function"]]
+ """Tool type identifier, always "function" """
description: str
+ """(Optional) Description of what the function does"""
parameters: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) JSON schema defining the function's parameters"""
strict: bool
+ """(Optional) Whether to enforce strict parameter validation"""
class ToolOpenAIResponseInputToolMcpRequireApprovalApprovalFilter(TypedDict, total=False):
always: List[str]
+ """(Optional) List of tool names that always require approval"""
never: List[str]
+ """(Optional) List of tool names that never require approval"""
ToolOpenAIResponseInputToolMcpRequireApproval: TypeAlias = Union[
@@ -308,6 +353,7 @@ class ToolOpenAIResponseInputToolMcpRequireApprovalApprovalFilter(TypedDict, tot
class ToolOpenAIResponseInputToolMcpAllowedToolsAllowedToolsFilter(TypedDict, total=False):
tool_names: List[str]
+ """(Optional) List of specific tool names that are allowed"""
ToolOpenAIResponseInputToolMcpAllowedTools: TypeAlias = Union[
@@ -317,16 +363,22 @@ class ToolOpenAIResponseInputToolMcpAllowedToolsAllowedToolsFilter(TypedDict, to
class ToolOpenAIResponseInputToolMcp(TypedDict, total=False):
require_approval: Required[ToolOpenAIResponseInputToolMcpRequireApproval]
+ """Approval requirement for tool calls ("always", "never", or filter)"""
server_label: Required[str]
+ """Label to identify this MCP server"""
server_url: Required[str]
+ """URL endpoint of the MCP server"""
type: Required[Literal["mcp"]]
+ """Tool type identifier, always "mcp" """
allowed_tools: ToolOpenAIResponseInputToolMcpAllowedTools
+ """(Optional) Restriction on which tools can be used from this server"""
headers: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) HTTP headers to include when connecting to the server"""
Tool: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/response_list_response.py b/src/llama_stack_client/types/response_list_response.py
index d46213ef..996fb00a 100644
--- a/src/llama_stack_client/types/response_list_response.py
+++ b/src/llama_stack_client/types/response_list_response.py
@@ -51,36 +51,50 @@
class DataInputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataInputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataInputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataInputOpenAIResponseInputFunctionToolCallOutput(BaseModel):
@@ -97,16 +111,21 @@ class DataInputOpenAIResponseInputFunctionToolCallOutput(BaseModel):
class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataInputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -120,24 +139,33 @@ class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessag
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -210,16 +238,21 @@ class DataInputOpenAIResponseMessage(BaseModel):
class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataOutputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -233,24 +266,33 @@ class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessa
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -314,70 +356,98 @@ class DataOutputOpenAIResponseMessage(BaseModel):
class DataOutputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataOutputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataOutputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataOutputOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class DataOutputOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class DataOutputOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[DataOutputOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
DataOutput: TypeAlias = Annotated[
@@ -420,54 +490,76 @@ class DataTextFormat(BaseModel):
class DataText(BaseModel):
format: Optional[DataTextFormat] = None
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class DataError(BaseModel):
code: str
+ """Error code identifying the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class Data(BaseModel):
id: str
+ """Unique identifier for this response"""
created_at: int
+ """Unix timestamp when the response was created"""
input: List[DataInput]
+ """List of input items that led to this response"""
model: str
+ """Model identifier used for generation"""
object: Literal["response"]
+ """Object type identifier, always "response" """
output: List[DataOutput]
+ """List of generated output items (messages, tool calls, etc.)"""
parallel_tool_calls: bool
+ """Whether tool calls can be executed in parallel"""
status: str
+ """Current status of the response generation"""
text: DataText
+ """Text formatting configuration for the response"""
error: Optional[DataError] = None
+ """(Optional) Error details if the response generation failed"""
previous_response_id: Optional[str] = None
+ """(Optional) ID of the previous response in a conversation"""
temperature: Optional[float] = None
+ """(Optional) Sampling temperature used for generation"""
top_p: Optional[float] = None
+ """(Optional) Nucleus sampling parameter used for generation"""
truncation: Optional[str] = None
+ """(Optional) Truncation strategy applied to the response"""
user: Optional[str] = None
+ """(Optional) User identifier associated with the request"""
class ResponseListResponse(BaseModel):
data: List[Data]
+ """List of response objects with their input context"""
first_id: str
+ """Identifier of the first item in this page"""
has_more: bool
+ """Whether there are more results available beyond this page"""
last_id: str
+ """Identifier of the last item in this page"""
object: Literal["list"]
+ """Object type identifier, always "list" """
diff --git a/src/llama_stack_client/types/response_object.py b/src/llama_stack_client/types/response_object.py
index e4b313d3..e1c88a16 100644
--- a/src/llama_stack_client/types/response_object.py
+++ b/src/llama_stack_client/types/response_object.py
@@ -35,16 +35,21 @@
class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OutputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -58,24 +63,33 @@ class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageCo
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(BaseModel):
@@ -135,70 +149,98 @@ class OutputOpenAIResponseMessage(BaseModel):
class OutputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OutputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OutputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OutputOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OutputOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OutputOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OutputOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
Output: TypeAlias = Annotated[
@@ -241,13 +283,15 @@ class TextFormat(BaseModel):
class Text(BaseModel):
format: Optional[TextFormat] = None
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class Error(BaseModel):
code: str
+ """Error code identifying the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class ResponseObject(BaseModel):
@@ -262,29 +306,43 @@ def output_text(self) -> str:
return "".join(texts)
id: str
+ """Unique identifier for this response"""
created_at: int
+ """Unix timestamp when the response was created"""
model: str
+ """Model identifier used for generation"""
object: Literal["response"]
+ """Object type identifier, always "response" """
output: List[Output]
+ """List of generated output items (messages, tool calls, etc.)"""
parallel_tool_calls: bool
+ """Whether tool calls can be executed in parallel"""
status: str
+ """Current status of the response generation"""
text: Text
+ """Text formatting configuration for the response"""
error: Optional[Error] = None
+ """(Optional) Error details if the response generation failed"""
previous_response_id: Optional[str] = None
+ """(Optional) ID of the previous response in a conversation"""
temperature: Optional[float] = None
+ """(Optional) Sampling temperature used for generation"""
top_p: Optional[float] = None
+ """(Optional) Nucleus sampling parameter used for generation"""
truncation: Optional[str] = None
+ """(Optional) Truncation strategy applied to the response"""
user: Optional[str] = None
+ """(Optional) User identifier associated with the request"""
diff --git a/src/llama_stack_client/types/response_object_stream.py b/src/llama_stack_client/types/response_object_stream.py
index 311ad6bd..aa787093 100644
--- a/src/llama_stack_client/types/response_object_stream.py
+++ b/src/llama_stack_client/types/response_object_stream.py
@@ -67,26 +67,33 @@
class OpenAIResponseObjectStreamResponseCreated(BaseModel):
response: ResponseObject
+ """The newly created response object"""
type: Literal["response.created"]
+ """Event type identifier, always "response.created" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(
BaseModel
):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
BaseModel
):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -102,26 +109,35 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessage
BaseModel
):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
BaseModel
):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -189,70 +205,98 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessage
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
OpenAIResponseObjectStreamResponseOutputItemAddedItem: TypeAlias = Annotated[
@@ -270,37 +314,42 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputM
class OpenAIResponseObjectStreamResponseOutputItemAdded(BaseModel):
item: OpenAIResponseObjectStreamResponseOutputItemAddedItem
- """Corresponds to the various Message types in the Responses API.
-
- They are all under one type because the Responses API gives them all the same
- "type" value, and there is no way to tell them apart in certain scenarios.
- """
+ """The output item that was added (message, tool call, etc.)"""
output_index: int
+ """Index position of this item in the output list"""
response_id: str
+ """Unique identifier of the response containing this output"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_item.added"]
+ """Event type identifier, always "response.output_item.added" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(
BaseModel
):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
BaseModel
):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -316,26 +365,35 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageC
BaseModel
):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
BaseModel
):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -403,70 +461,98 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessage(
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
OpenAIResponseObjectStreamResponseOutputItemDoneItem: TypeAlias = Annotated[
@@ -484,81 +570,107 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMe
class OpenAIResponseObjectStreamResponseOutputItemDone(BaseModel):
item: OpenAIResponseObjectStreamResponseOutputItemDoneItem
- """Corresponds to the various Message types in the Responses API.
-
- They are all under one type because the Responses API gives them all the same
- "type" value, and there is no way to tell them apart in certain scenarios.
- """
+ """The completed output item (message, tool call, etc.)"""
output_index: int
+ """Index position of this item in the output list"""
response_id: str
+ """Unique identifier of the response containing this output"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_item.done"]
+ """Event type identifier, always "response.output_item.done" """
class OpenAIResponseObjectStreamResponseOutputTextDelta(BaseModel):
content_index: int
+ """Index position within the text content"""
delta: str
+ """Incremental text content being added"""
item_id: str
+ """Unique identifier of the output item being updated"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_text.delta"]
+ """Event type identifier, always "response.output_text.delta" """
class OpenAIResponseObjectStreamResponseOutputTextDone(BaseModel):
content_index: int
+ """Index position within the text content"""
item_id: str
+ """Unique identifier of the completed output item"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
text: str
+ """Final complete text content of the output item"""
type: Literal["response.output_text.done"]
+ """Event type identifier, always "response.output_text.done" """
class OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta(BaseModel):
delta: str
+ """Incremental function call arguments being added"""
item_id: str
+ """Unique identifier of the function call being updated"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.function_call_arguments.delta"]
+ """Event type identifier, always "response.function_call_arguments.delta" """
class OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone(BaseModel):
arguments: str
+ """Final complete arguments JSON string for the function call"""
item_id: str
+ """Unique identifier of the completed function call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.function_call_arguments.done"]
+ """Event type identifier, always "response.function_call_arguments.done" """
class OpenAIResponseObjectStreamResponseWebSearchCallInProgress(BaseModel):
item_id: str
+ """Unique identifier of the web search call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.web_search_call.in_progress"]
+ """Event type identifier, always "response.web_search_call.in_progress" """
class OpenAIResponseObjectStreamResponseWebSearchCallSearching(BaseModel):
@@ -573,12 +685,16 @@ class OpenAIResponseObjectStreamResponseWebSearchCallSearching(BaseModel):
class OpenAIResponseObjectStreamResponseWebSearchCallCompleted(BaseModel):
item_id: str
+ """Unique identifier of the completed web search call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.web_search_call.completed"]
+ """Event type identifier, always "response.web_search_call.completed" """
class OpenAIResponseObjectStreamResponseMcpListToolsInProgress(BaseModel):
@@ -625,30 +741,40 @@ class OpenAIResponseObjectStreamResponseMcpCallArgumentsDone(BaseModel):
class OpenAIResponseObjectStreamResponseMcpCallInProgress(BaseModel):
item_id: str
+ """Unique identifier of the MCP call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.in_progress"]
+ """Event type identifier, always "response.mcp_call.in_progress" """
class OpenAIResponseObjectStreamResponseMcpCallFailed(BaseModel):
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.failed"]
+ """Event type identifier, always "response.mcp_call.failed" """
class OpenAIResponseObjectStreamResponseMcpCallCompleted(BaseModel):
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.completed"]
+ """Event type identifier, always "response.mcp_call.completed" """
class OpenAIResponseObjectStreamResponseCompleted(BaseModel):
response: ResponseObject
+ """The completed response object"""
type: Literal["response.completed"]
+ """Event type identifier, always "response.completed" """
ResponseObjectStream: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/responses/input_item_list_response.py b/src/llama_stack_client/types/responses/input_item_list_response.py
index aadcd9f2..abb09e98 100644
--- a/src/llama_stack_client/types/responses/input_item_list_response.py
+++ b/src/llama_stack_client/types/responses/input_item_list_response.py
@@ -28,36 +28,50 @@
class DataOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataOpenAIResponseInputFunctionToolCallOutput(BaseModel):
@@ -74,16 +88,21 @@ class DataOpenAIResponseInputFunctionToolCallOutput(BaseModel):
class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -97,24 +116,33 @@ class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageCont
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(BaseModel):
@@ -183,5 +211,7 @@ class DataOpenAIResponseMessage(BaseModel):
class InputItemListResponse(BaseModel):
data: List[Data]
+ """List of input items"""
object: Literal["list"]
+ """Object type identifier, always "list" """
diff --git a/src/llama_stack_client/types/route_info.py b/src/llama_stack_client/types/route_info.py
index 3d8880f1..671361b9 100644
--- a/src/llama_stack_client/types/route_info.py
+++ b/src/llama_stack_client/types/route_info.py
@@ -9,7 +9,10 @@
class RouteInfo(BaseModel):
method: str
+ """HTTP method for the route"""
provider_types: List[str]
+ """List of provider types that implement this route"""
route: str
+ """The API endpoint path"""
diff --git a/src/llama_stack_client/types/run_shield_response.py b/src/llama_stack_client/types/run_shield_response.py
index 1dbdf5a0..ba7bac0b 100644
--- a/src/llama_stack_client/types/run_shield_response.py
+++ b/src/llama_stack_client/types/run_shield_response.py
@@ -10,3 +10,4 @@
class RunShieldResponse(BaseModel):
violation: Optional[SafetyViolation] = None
+ """(Optional) Safety violation detected by the shield, if any"""
diff --git a/src/llama_stack_client/types/scoring_fn.py b/src/llama_stack_client/types/scoring_fn.py
index 3569cb44..8c558f2a 100644
--- a/src/llama_stack_client/types/scoring_fn.py
+++ b/src/llama_stack_client/types/scoring_fn.py
@@ -20,9 +20,11 @@ class ScoringFn(BaseModel):
return_type: ReturnType
type: Literal["scoring_function"]
+ """The resource type, always scoring_function"""
description: Optional[str] = None
params: Optional[ScoringFnParams] = None
+ """Parameters for LLM-as-judge scoring function configuration."""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/scoring_fn_params.py b/src/llama_stack_client/types/scoring_fn_params.py
index a46b46f5..937fd886 100644
--- a/src/llama_stack_client/types/scoring_fn_params.py
+++ b/src/llama_stack_client/types/scoring_fn_params.py
@@ -11,28 +11,38 @@
class LlmAsJudgeScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
judge_model: str
+ """Identifier of the LLM model to use as a judge for scoring"""
judge_score_regexes: List[str]
+ """Regexes to extract the answer from generated response"""
type: Literal["llm_as_judge"]
+ """The type of scoring function parameters, always llm_as_judge"""
prompt_template: Optional[str] = None
+ """(Optional) Custom prompt template for the judge model"""
class RegexParserScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
parsing_regexes: List[str]
+ """Regex to extract the answer from generated response"""
type: Literal["regex_parser"]
+ """The type of scoring function parameters, always regex_parser"""
class BasicScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
type: Literal["basic"]
+ """The type of scoring function parameters, always basic"""
ScoringFnParams: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/scoring_fn_params_param.py b/src/llama_stack_client/types/scoring_fn_params_param.py
index b404bc89..9753ddeb 100644
--- a/src/llama_stack_client/types/scoring_fn_params_param.py
+++ b/src/llama_stack_client/types/scoring_fn_params_param.py
@@ -12,32 +12,42 @@ class LlmAsJudgeScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
judge_model: Required[str]
+ """Identifier of the LLM model to use as a judge for scoring"""
judge_score_regexes: Required[List[str]]
+ """Regexes to extract the answer from generated response"""
type: Required[Literal["llm_as_judge"]]
+ """The type of scoring function parameters, always llm_as_judge"""
prompt_template: str
+ """(Optional) Custom prompt template for the judge model"""
class RegexParserScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
parsing_regexes: Required[List[str]]
+ """Regex to extract the answer from generated response"""
type: Required[Literal["regex_parser"]]
+ """The type of scoring function parameters, always regex_parser"""
class BasicScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
type: Required[Literal["basic"]]
+ """The type of scoring function parameters, always basic"""
ScoringFnParamsParam: TypeAlias = Union[LlmAsJudgeScoringFnParams, RegexParserScoringFnParams, BasicScoringFnParams]
diff --git a/src/llama_stack_client/types/scoring_score_batch_response.py b/src/llama_stack_client/types/scoring_score_batch_response.py
index da124b1e..7f5f7e24 100644
--- a/src/llama_stack_client/types/scoring_score_batch_response.py
+++ b/src/llama_stack_client/types/scoring_score_batch_response.py
@@ -10,5 +10,7 @@
class ScoringScoreBatchResponse(BaseModel):
results: Dict[str, ScoringResult]
+ """A map of scoring function name to ScoringResult"""
dataset_id: Optional[str] = None
+ """(Optional) The identifier of the dataset that was scored"""
diff --git a/src/llama_stack_client/types/shared/batch_completion.py b/src/llama_stack_client/types/shared/batch_completion.py
index 547884d1..43a0a735 100644
--- a/src/llama_stack_client/types/shared/batch_completion.py
+++ b/src/llama_stack_client/types/shared/batch_completion.py
@@ -10,3 +10,4 @@
class BatchCompletion(BaseModel):
batch: List[CompletionResponse]
+ """List of completion responses, one for each input in the batch"""
diff --git a/src/llama_stack_client/types/shared/chat_completion_response.py b/src/llama_stack_client/types/shared/chat_completion_response.py
index 20dd1ecc..3ff6e0bc 100644
--- a/src/llama_stack_client/types/shared/chat_completion_response.py
+++ b/src/llama_stack_client/types/shared/chat_completion_response.py
@@ -11,10 +11,13 @@
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class ChatCompletionResponse(BaseModel):
@@ -25,3 +28,4 @@ class ChatCompletionResponse(BaseModel):
"""Optional log probabilities for generated tokens"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/shared/content_delta.py b/src/llama_stack_client/types/shared/content_delta.py
index ae036ad8..e5936990 100644
--- a/src/llama_stack_client/types/shared/content_delta.py
+++ b/src/llama_stack_client/types/shared/content_delta.py
@@ -12,22 +12,29 @@
class TextDelta(BaseModel):
text: str
+ """The incremental text content"""
type: Literal["text"]
+ """Discriminator type of the delta. Always "text" """
class ImageDelta(BaseModel):
image: str
+ """The incremental image data as bytes"""
type: Literal["image"]
+ """Discriminator type of the delta. Always "image" """
class ToolCallDelta(BaseModel):
parse_status: Literal["started", "in_progress", "failed", "succeeded"]
+ """Current parsing status of the tool call"""
tool_call: ToolCallOrString
+ """Either an in-progress tool call string or the final parsed tool call"""
type: Literal["tool_call"]
+ """Discriminator type of the delta. Always "tool_call" """
ContentDelta: TypeAlias = Annotated[Union[TextDelta, ImageDelta, ToolCallDelta], PropertyInfo(discriminator="type")]
diff --git a/src/llama_stack_client/types/shared/document.py b/src/llama_stack_client/types/shared/document.py
index 67704232..492e6abd 100644
--- a/src/llama_stack_client/types/shared/document.py
+++ b/src/llama_stack_client/types/shared/document.py
@@ -19,6 +19,7 @@
class ContentImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ContentImageContentItemImage(BaseModel):
@@ -50,6 +51,7 @@ class ContentTextContentItem(BaseModel):
class ContentURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
Content: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/shared/interleaved_content.py b/src/llama_stack_client/types/shared/interleaved_content.py
index dc496150..852e487e 100644
--- a/src/llama_stack_client/types/shared/interleaved_content.py
+++ b/src/llama_stack_client/types/shared/interleaved_content.py
@@ -17,6 +17,7 @@
class ImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ImageContentItemImage(BaseModel):
diff --git a/src/llama_stack_client/types/shared/interleaved_content_item.py b/src/llama_stack_client/types/shared/interleaved_content_item.py
index 8a3238b8..cb034712 100644
--- a/src/llama_stack_client/types/shared/interleaved_content_item.py
+++ b/src/llama_stack_client/types/shared/interleaved_content_item.py
@@ -17,6 +17,7 @@
class ImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ImageContentItemImage(BaseModel):
diff --git a/src/llama_stack_client/types/shared/param_type.py b/src/llama_stack_client/types/shared/param_type.py
index 2fed6df2..199b0fd7 100644
--- a/src/llama_stack_client/types/shared/param_type.py
+++ b/src/llama_stack_client/types/shared/param_type.py
@@ -23,42 +23,52 @@
class StringType(BaseModel):
type: Literal["string"]
+ """Discriminator type. Always "string" """
class NumberType(BaseModel):
type: Literal["number"]
+ """Discriminator type. Always "number" """
class BooleanType(BaseModel):
type: Literal["boolean"]
+ """Discriminator type. Always "boolean" """
class ArrayType(BaseModel):
type: Literal["array"]
+ """Discriminator type. Always "array" """
class ObjectType(BaseModel):
type: Literal["object"]
+ """Discriminator type. Always "object" """
class JsonType(BaseModel):
type: Literal["json"]
+ """Discriminator type. Always "json" """
class UnionType(BaseModel):
type: Literal["union"]
+ """Discriminator type. Always "union" """
class ChatCompletionInputType(BaseModel):
type: Literal["chat_completion_input"]
+ """Discriminator type. Always "chat_completion_input" """
class CompletionInputType(BaseModel):
type: Literal["completion_input"]
+ """Discriminator type. Always "completion_input" """
class AgentTurnInputType(BaseModel):
type: Literal["agent_turn_input"]
+ """Discriminator type. Always "agent_turn_input" """
ParamType: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared/query_config.py b/src/llama_stack_client/types/shared/query_config.py
index 5c1e1806..389514c7 100644
--- a/src/llama_stack_client/types/shared/query_config.py
+++ b/src/llama_stack_client/types/shared/query_config.py
@@ -14,8 +14,7 @@ class RankerRrfRanker(BaseModel):
impact_factor: float
"""The impact factor for RRF scoring.
- Higher values give more weight to higher-ranked results. Must be greater than 0.
- Default of 60 is from the original RRF paper (Cormack et al., 2009).
+ Higher values give more weight to higher-ranked results. Must be greater than 0
"""
type: Literal["rrf"]
diff --git a/src/llama_stack_client/types/shared/query_generator_config.py b/src/llama_stack_client/types/shared/query_generator_config.py
index 559fca7d..624fc190 100644
--- a/src/llama_stack_client/types/shared/query_generator_config.py
+++ b/src/llama_stack_client/types/shared/query_generator_config.py
@@ -11,16 +11,21 @@
class DefaultRagQueryGeneratorConfig(BaseModel):
separator: str
+ """String separator used to join query terms"""
type: Literal["default"]
+ """Type of query generator, always 'default'"""
class LlmragQueryGeneratorConfig(BaseModel):
model: str
+ """Name of the language model to use for query generation"""
template: str
+ """Template string for formatting the query generation prompt"""
type: Literal["llm"]
+ """Type of query generator, always 'llm'"""
QueryGeneratorConfig: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared/query_result.py b/src/llama_stack_client/types/shared/query_result.py
index c0a1d44c..c623c6d6 100644
--- a/src/llama_stack_client/types/shared/query_result.py
+++ b/src/llama_stack_client/types/shared/query_result.py
@@ -10,6 +10,7 @@
class QueryResult(BaseModel):
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata about the query result"""
content: Optional[InterleavedContent] = None
- """A image content item"""
+ """(Optional) The retrieved content from the query"""
diff --git a/src/llama_stack_client/types/shared/safety_violation.py b/src/llama_stack_client/types/shared/safety_violation.py
index e3c94312..bea7ca93 100644
--- a/src/llama_stack_client/types/shared/safety_violation.py
+++ b/src/llama_stack_client/types/shared/safety_violation.py
@@ -10,7 +10,13 @@
class SafetyViolation(BaseModel):
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """
+ Additional metadata including specific violation codes for debugging and
+ telemetry
+ """
violation_level: Literal["info", "warn", "error"]
+ """Severity level of the violation"""
user_message: Optional[str] = None
+ """(Optional) Message to convey to the user about the violation"""
diff --git a/src/llama_stack_client/types/shared/sampling_params.py b/src/llama_stack_client/types/shared/sampling_params.py
index 7ce2211e..6823aee7 100644
--- a/src/llama_stack_client/types/shared/sampling_params.py
+++ b/src/llama_stack_client/types/shared/sampling_params.py
@@ -17,20 +17,26 @@
class StrategyGreedySamplingStrategy(BaseModel):
type: Literal["greedy"]
+ """Must be "greedy" to identify this sampling strategy"""
class StrategyTopPSamplingStrategy(BaseModel):
type: Literal["top_p"]
+ """Must be "top_p" to identify this sampling strategy"""
temperature: Optional[float] = None
+ """Controls randomness in sampling. Higher values increase randomness"""
top_p: Optional[float] = None
+ """Cumulative probability threshold for nucleus sampling. Defaults to 0.95"""
class StrategyTopKSamplingStrategy(BaseModel):
top_k: int
+ """Number of top tokens to consider for sampling. Must be at least 1"""
type: Literal["top_k"]
+ """Must be "top_k" to identify this sampling strategy"""
Strategy: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared_params/document.py b/src/llama_stack_client/types/shared_params/document.py
index 78564cfa..db9cd51d 100644
--- a/src/llama_stack_client/types/shared_params/document.py
+++ b/src/llama_stack_client/types/shared_params/document.py
@@ -20,6 +20,7 @@
class ContentImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ContentImageContentItemImage(TypedDict, total=False):
@@ -51,6 +52,7 @@ class ContentTextContentItem(TypedDict, total=False):
class ContentURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
Content: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/shared_params/interleaved_content.py b/src/llama_stack_client/types/shared_params/interleaved_content.py
index 5d045a20..5ea3953a 100644
--- a/src/llama_stack_client/types/shared_params/interleaved_content.py
+++ b/src/llama_stack_client/types/shared_params/interleaved_content.py
@@ -18,6 +18,7 @@
class ImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ImageContentItemImage(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/shared_params/interleaved_content_item.py b/src/llama_stack_client/types/shared_params/interleaved_content_item.py
index b5c0bcc1..ed3daa32 100644
--- a/src/llama_stack_client/types/shared_params/interleaved_content_item.py
+++ b/src/llama_stack_client/types/shared_params/interleaved_content_item.py
@@ -16,6 +16,7 @@
class ImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ImageContentItemImage(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/shared_params/query_config.py b/src/llama_stack_client/types/shared_params/query_config.py
index 9da3da08..d008c48c 100644
--- a/src/llama_stack_client/types/shared_params/query_config.py
+++ b/src/llama_stack_client/types/shared_params/query_config.py
@@ -14,8 +14,7 @@ class RankerRrfRanker(TypedDict, total=False):
impact_factor: Required[float]
"""The impact factor for RRF scoring.
- Higher values give more weight to higher-ranked results. Must be greater than 0.
- Default of 60 is from the original RRF paper (Cormack et al., 2009).
+ Higher values give more weight to higher-ranked results. Must be greater than 0
"""
type: Required[Literal["rrf"]]
diff --git a/src/llama_stack_client/types/shared_params/query_generator_config.py b/src/llama_stack_client/types/shared_params/query_generator_config.py
index db135e80..8c589bf9 100644
--- a/src/llama_stack_client/types/shared_params/query_generator_config.py
+++ b/src/llama_stack_client/types/shared_params/query_generator_config.py
@@ -10,16 +10,21 @@
class DefaultRagQueryGeneratorConfig(TypedDict, total=False):
separator: Required[str]
+ """String separator used to join query terms"""
type: Required[Literal["default"]]
+ """Type of query generator, always 'default'"""
class LlmragQueryGeneratorConfig(TypedDict, total=False):
model: Required[str]
+ """Name of the language model to use for query generation"""
template: Required[str]
+ """Template string for formatting the query generation prompt"""
type: Required[Literal["llm"]]
+ """Type of query generator, always 'llm'"""
QueryGeneratorConfig: TypeAlias = Union[DefaultRagQueryGeneratorConfig, LlmragQueryGeneratorConfig]
diff --git a/src/llama_stack_client/types/shared_params/sampling_params.py b/src/llama_stack_client/types/shared_params/sampling_params.py
index 158db1c5..55f05e8b 100644
--- a/src/llama_stack_client/types/shared_params/sampling_params.py
+++ b/src/llama_stack_client/types/shared_params/sampling_params.py
@@ -16,20 +16,26 @@
class StrategyGreedySamplingStrategy(TypedDict, total=False):
type: Required[Literal["greedy"]]
+ """Must be "greedy" to identify this sampling strategy"""
class StrategyTopPSamplingStrategy(TypedDict, total=False):
type: Required[Literal["top_p"]]
+ """Must be "top_p" to identify this sampling strategy"""
temperature: float
+ """Controls randomness in sampling. Higher values increase randomness"""
top_p: float
+ """Cumulative probability threshold for nucleus sampling. Defaults to 0.95"""
class StrategyTopKSamplingStrategy(TypedDict, total=False):
top_k: Required[int]
+ """Number of top tokens to consider for sampling. Must be at least 1"""
type: Required[Literal["top_k"]]
+ """Must be "top_k" to identify this sampling strategy"""
Strategy: TypeAlias = Union[StrategyGreedySamplingStrategy, StrategyTopPSamplingStrategy, StrategyTopKSamplingStrategy]
diff --git a/src/llama_stack_client/types/shield.py b/src/llama_stack_client/types/shield.py
index ff5f01f1..dd48dfae 100644
--- a/src/llama_stack_client/types/shield.py
+++ b/src/llama_stack_client/types/shield.py
@@ -14,7 +14,9 @@ class Shield(BaseModel):
provider_id: str
type: Literal["shield"]
+ """The resource type, always shield"""
params: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Configuration parameters for the shield"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/span_with_status.py b/src/llama_stack_client/types/span_with_status.py
index f93f4ff5..04d124bd 100644
--- a/src/llama_stack_client/types/span_with_status.py
+++ b/src/llama_stack_client/types/span_with_status.py
@@ -11,17 +11,25 @@
class SpanWithStatus(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
status: Optional[Literal["ok", "error"]] = None
+ """(Optional) The current status of the span"""
diff --git a/src/llama_stack_client/types/synthetic_data_generation_generate_params.py b/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
index abf51059..5f55a97c 100644
--- a/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
+++ b/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
@@ -12,8 +12,14 @@
class SyntheticDataGenerationGenerateParams(TypedDict, total=False):
dialogs: Required[Iterable[Message]]
+ """List of conversation messages to use as input for synthetic data generation"""
filtering_function: Required[Literal["none", "random", "top_k", "top_p", "top_k_top_p", "sigmoid"]]
- """The type of filtering function."""
+ """Type of filtering to apply to generated synthetic data samples"""
model: str
+ """(Optional) The identifier of the model to use.
+
+ The model must be registered with Llama Stack and available via the /models
+ endpoint
+ """
diff --git a/src/llama_stack_client/types/synthetic_data_generation_response.py b/src/llama_stack_client/types/synthetic_data_generation_response.py
index a2ee11e6..cfb20f08 100644
--- a/src/llama_stack_client/types/synthetic_data_generation_response.py
+++ b/src/llama_stack_client/types/synthetic_data_generation_response.py
@@ -9,5 +9,10 @@
class SyntheticDataGenerationResponse(BaseModel):
synthetic_data: List[Dict[str, Union[bool, float, str, List[object], object, None]]]
+ """List of generated synthetic data samples that passed the filtering criteria"""
statistics: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """
+ (Optional) Statistical information about the generation process and filtering
+ results
+ """
diff --git a/src/llama_stack_client/types/telemetry_get_span_response.py b/src/llama_stack_client/types/telemetry_get_span_response.py
index 9e50ed0d..6826d4d0 100644
--- a/src/llama_stack_client/types/telemetry_get_span_response.py
+++ b/src/llama_stack_client/types/telemetry_get_span_response.py
@@ -10,15 +10,22 @@
class TelemetryGetSpanResponse(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
diff --git a/src/llama_stack_client/types/telemetry_query_spans_response.py b/src/llama_stack_client/types/telemetry_query_spans_response.py
index c630efeb..49eaeb38 100644
--- a/src/llama_stack_client/types/telemetry_query_spans_response.py
+++ b/src/llama_stack_client/types/telemetry_query_spans_response.py
@@ -11,18 +11,25 @@
class TelemetryQuerySpansResponseItem(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
TelemetryQuerySpansResponse: TypeAlias = List[TelemetryQuerySpansResponseItem]
diff --git a/src/llama_stack_client/types/tool.py b/src/llama_stack_client/types/tool.py
index 6beb8764..c6994268 100644
--- a/src/llama_stack_client/types/tool.py
+++ b/src/llama_stack_client/types/tool.py
@@ -10,29 +10,39 @@
class Parameter(BaseModel):
description: str
+ """Human-readable description of what the parameter does"""
name: str
+ """Name of the parameter"""
parameter_type: str
+ """Type of the parameter (e.g., string, integer)"""
required: bool
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, List[object], object, None] = None
+ """(Optional) Default value for the parameter if not provided"""
class Tool(BaseModel):
description: str
+ """Human-readable description of what the tool does"""
identifier: str
parameters: List[Parameter]
+ """List of parameters this tool accepts"""
provider_id: str
toolgroup_id: str
+ """ID of the tool group this tool belongs to"""
type: Literal["tool"]
+ """Type of resource, always 'tool'"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/tool_def.py b/src/llama_stack_client/types/tool_def.py
index d96c5c5d..c82a9b8a 100644
--- a/src/llama_stack_client/types/tool_def.py
+++ b/src/llama_stack_client/types/tool_def.py
@@ -9,21 +9,30 @@
class Parameter(BaseModel):
description: str
+ """Human-readable description of what the parameter does"""
name: str
+ """Name of the parameter"""
parameter_type: str
+ """Type of the parameter (e.g., string, integer)"""
required: bool
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, List[object], object, None] = None
+ """(Optional) Default value for the parameter if not provided"""
class ToolDef(BaseModel):
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Human-readable description of what the tool does"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool"""
parameters: Optional[List[Parameter]] = None
+ """(Optional) List of parameters this tool accepts"""
diff --git a/src/llama_stack_client/types/tool_def_param.py b/src/llama_stack_client/types/tool_def_param.py
index 42d27fbd..93ad8285 100644
--- a/src/llama_stack_client/types/tool_def_param.py
+++ b/src/llama_stack_client/types/tool_def_param.py
@@ -10,21 +10,30 @@
class Parameter(TypedDict, total=False):
description: Required[str]
+ """Human-readable description of what the parameter does"""
name: Required[str]
+ """Name of the parameter"""
parameter_type: Required[str]
+ """Type of the parameter (e.g., string, integer)"""
required: Required[bool]
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, Iterable[object], object, None]
+ """(Optional) Default value for the parameter if not provided"""
class ToolDefParam(TypedDict, total=False):
name: Required[str]
+ """Name of the tool"""
description: str
+ """(Optional) Human-readable description of what the tool does"""
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional metadata about the tool"""
parameters: Iterable[Parameter]
+ """(Optional) List of parameters this tool accepts"""
diff --git a/src/llama_stack_client/types/tool_group.py b/src/llama_stack_client/types/tool_group.py
index 3389395a..52fca005 100644
--- a/src/llama_stack_client/types/tool_group.py
+++ b/src/llama_stack_client/types/tool_group.py
@@ -10,6 +10,7 @@
class McpEndpoint(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ToolGroup(BaseModel):
@@ -18,9 +19,12 @@ class ToolGroup(BaseModel):
provider_id: str
type: Literal["tool_group"]
+ """Type of resource, always 'tool_group'"""
args: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional arguments for the tool group"""
mcp_endpoint: Optional[McpEndpoint] = None
+ """(Optional) Model Context Protocol endpoint for remote tools"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/tool_invocation_result.py b/src/llama_stack_client/types/tool_invocation_result.py
index 01f7db28..4262a85b 100644
--- a/src/llama_stack_client/types/tool_invocation_result.py
+++ b/src/llama_stack_client/types/tool_invocation_result.py
@@ -10,10 +10,13 @@
class ToolInvocationResult(BaseModel):
content: Optional[InterleavedContent] = None
- """A image content item"""
+ """(Optional) The output content from the tool execution"""
error_code: Optional[int] = None
+ """(Optional) Numeric error code if the tool execution failed"""
error_message: Optional[str] = None
+ """(Optional) Error message if the tool execution failed"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool execution"""
diff --git a/src/llama_stack_client/types/tool_response.py b/src/llama_stack_client/types/tool_response.py
index f984f30a..7750494e 100644
--- a/src/llama_stack_client/types/tool_response.py
+++ b/src/llama_stack_client/types/tool_response.py
@@ -11,10 +11,13 @@
class ToolResponse(BaseModel):
call_id: str
+ """Unique identifier for the tool call this response is for"""
content: InterleavedContent
- """A image content item"""
+ """The response content from the tool"""
tool_name: Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]
+ """Name of the tool that was invoked"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool response"""
diff --git a/src/llama_stack_client/types/tool_response_param.py b/src/llama_stack_client/types/tool_response_param.py
index 8ac14862..386658f9 100644
--- a/src/llama_stack_client/types/tool_response_param.py
+++ b/src/llama_stack_client/types/tool_response_param.py
@@ -12,10 +12,13 @@
class ToolResponseParam(TypedDict, total=False):
call_id: Required[str]
+ """Unique identifier for the tool call this response is for"""
content: Required[InterleavedContent]
- """A image content item"""
+ """The response content from the tool"""
tool_name: Required[Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]]
+ """Name of the tool that was invoked"""
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional metadata about the tool response"""
diff --git a/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py b/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
index bc52c481..614a969c 100644
--- a/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
+++ b/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
@@ -12,7 +12,10 @@
class RagToolInsertParams(TypedDict, total=False):
chunk_size_in_tokens: Required[int]
+ """(Optional) Size in tokens for document chunking during indexing"""
documents: Required[Iterable[Document]]
+ """List of documents to index in the RAG system"""
vector_db_id: Required[str]
+ """ID of the vector database to store the document embeddings"""
diff --git a/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py b/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
index 4599c693..a28faf2b 100644
--- a/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
+++ b/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
@@ -13,9 +13,10 @@
class RagToolQueryParams(TypedDict, total=False):
content: Required[InterleavedContent]
- """A image content item"""
+ """The query content to search for in the indexed documents"""
vector_db_ids: Required[List[str]]
+ """List of vector database IDs to search within"""
query_config: QueryConfig
- """Configuration for the RAG query generation."""
+ """(Optional) Configuration parameters for the query operation"""
diff --git a/src/llama_stack_client/types/tool_runtime_list_tools_params.py b/src/llama_stack_client/types/tool_runtime_list_tools_params.py
index 539e176d..d4933940 100644
--- a/src/llama_stack_client/types/tool_runtime_list_tools_params.py
+++ b/src/llama_stack_client/types/tool_runtime_list_tools_params.py
@@ -17,3 +17,4 @@ class ToolRuntimeListToolsParams(TypedDict, total=False):
class McpEndpoint(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
diff --git a/src/llama_stack_client/types/toolgroup_register_params.py b/src/llama_stack_client/types/toolgroup_register_params.py
index a50c14c4..2aa79960 100644
--- a/src/llama_stack_client/types/toolgroup_register_params.py
+++ b/src/llama_stack_client/types/toolgroup_register_params.py
@@ -24,3 +24,4 @@ class ToolgroupRegisterParams(TypedDict, total=False):
class McpEndpoint(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
diff --git a/src/llama_stack_client/types/trace.py b/src/llama_stack_client/types/trace.py
index 3683551c..0657d616 100644
--- a/src/llama_stack_client/types/trace.py
+++ b/src/llama_stack_client/types/trace.py
@@ -10,9 +10,13 @@
class Trace(BaseModel):
root_span_id: str
+ """Unique identifier for the root span that started this trace"""
start_time: datetime
+ """Timestamp when the trace began"""
trace_id: str
+ """Unique identifier for the trace"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the trace finished, if completed"""
diff --git a/src/llama_stack_client/types/vector_db_list_response.py b/src/llama_stack_client/types/vector_db_list_response.py
index d53a3c95..18034f52 100644
--- a/src/llama_stack_client/types/vector_db_list_response.py
+++ b/src/llama_stack_client/types/vector_db_list_response.py
@@ -10,14 +10,17 @@
class VectorDBListResponseItem(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_register_response.py b/src/llama_stack_client/types/vector_db_register_response.py
index b9224a23..cf48dd5a 100644
--- a/src/llama_stack_client/types/vector_db_register_response.py
+++ b/src/llama_stack_client/types/vector_db_register_response.py
@@ -10,14 +10,17 @@
class VectorDBRegisterResponse(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_retrieve_response.py b/src/llama_stack_client/types/vector_db_retrieve_response.py
index 4dd3a710..aa349d1c 100644
--- a/src/llama_stack_client/types/vector_db_retrieve_response.py
+++ b/src/llama_stack_client/types/vector_db_retrieve_response.py
@@ -10,14 +10,17 @@
class VectorDBRetrieveResponse(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_store.py b/src/llama_stack_client/types/vector_store.py
index 5dc4ad3a..cfcebd81 100644
--- a/src/llama_stack_client/types/vector_store.py
+++ b/src/llama_stack_client/types/vector_store.py
@@ -10,35 +10,51 @@
class FileCounts(BaseModel):
cancelled: int
+ """Number of files that had their processing cancelled"""
completed: int
+ """Number of files that have been successfully processed"""
failed: int
+ """Number of files that failed to process"""
in_progress: int
+ """Number of files currently being processed"""
total: int
+ """Total number of files in the vector store"""
class VectorStore(BaseModel):
id: str
+ """Unique identifier for the vector store"""
created_at: int
+ """Timestamp when the vector store was created"""
file_counts: FileCounts
+ """File processing status counts for the vector store"""
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Set of key-value pairs that can be attached to the vector store"""
object: str
+ """Object type identifier, always "vector_store" """
status: str
+ """Current status of the vector store"""
usage_bytes: int
+ """Storage space used by the vector store in bytes"""
expires_after: Optional[Dict[str, Union[bool, float, str, List[builtins.object], builtins.object, None]]] = None
+ """(Optional) Expiration policy for the vector store"""
expires_at: Optional[int] = None
+ """(Optional) Timestamp when the vector store will expire"""
last_active_at: Optional[int] = None
+ """(Optional) Timestamp of last activity on the vector store"""
name: Optional[str] = None
+ """(Optional) Name of the vector store"""
diff --git a/src/llama_stack_client/types/vector_store_delete_response.py b/src/llama_stack_client/types/vector_store_delete_response.py
index 945ada10..29637547 100644
--- a/src/llama_stack_client/types/vector_store_delete_response.py
+++ b/src/llama_stack_client/types/vector_store_delete_response.py
@@ -7,7 +7,10 @@
class VectorStoreDeleteResponse(BaseModel):
id: str
+ """Unique identifier of the deleted vector store"""
deleted: bool
+ """Whether the deletion operation was successful"""
object: str
+ """Object type identifier for the deletion response"""
diff --git a/src/llama_stack_client/types/vector_store_search_params.py b/src/llama_stack_client/types/vector_store_search_params.py
index fdb02ff7..5a429b79 100644
--- a/src/llama_stack_client/types/vector_store_search_params.py
+++ b/src/llama_stack_client/types/vector_store_search_params.py
@@ -30,5 +30,7 @@ class VectorStoreSearchParams(TypedDict, total=False):
class RankingOptions(TypedDict, total=False):
ranker: str
+ """(Optional) Name of the ranking algorithm to use"""
score_threshold: float
+ """(Optional) Minimum relevance score threshold for results"""
diff --git a/src/llama_stack_client/types/vector_store_search_response.py b/src/llama_stack_client/types/vector_store_search_response.py
index 7b596e03..2f9a1076 100644
--- a/src/llama_stack_client/types/vector_store_search_response.py
+++ b/src/llama_stack_client/types/vector_store_search_response.py
@@ -10,29 +10,41 @@
class DataContent(BaseModel):
text: str
+ """The actual text content"""
type: Literal["text"]
+ """Content type, currently only "text" is supported"""
class Data(BaseModel):
content: List[DataContent]
+ """List of content items matching the search query"""
file_id: str
+ """Unique identifier of the file containing the result"""
filename: str
+ """Name of the file containing the result"""
score: float
+ """Relevance score for this search result"""
attributes: Optional[Dict[str, Union[str, float, bool]]] = None
+ """(Optional) Key-value attributes associated with the file"""
class VectorStoreSearchResponse(BaseModel):
data: List[Data]
+ """List of search result objects"""
has_more: bool
+ """Whether there are more results available beyond this page"""
object: str
+ """Object type identifier for the search results page"""
search_query: str
+ """The original search query that was executed"""
next_page: Optional[str] = None
+ """(Optional) Token for retrieving the next page of results"""
diff --git a/src/llama_stack_client/types/vector_stores/file_content_response.py b/src/llama_stack_client/types/vector_stores/file_content_response.py
index 987160e4..035a34a8 100644
--- a/src/llama_stack_client/types/vector_stores/file_content_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_content_response.py
@@ -10,15 +10,21 @@
class Content(BaseModel):
text: str
+ """The actual text content"""
type: Literal["text"]
+ """Content type, currently only "text" is supported"""
class FileContentResponse(BaseModel):
attributes: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Key-value attributes associated with the file"""
content: List[Content]
+ """List of content items from the file"""
file_id: str
+ """Unique identifier for the file"""
filename: str
+ """Name of the file"""
diff --git a/src/llama_stack_client/types/vector_stores/file_create_params.py b/src/llama_stack_client/types/vector_stores/file_create_params.py
index 66fbf624..a75716b3 100644
--- a/src/llama_stack_client/types/vector_stores/file_create_params.py
+++ b/src/llama_stack_client/types/vector_stores/file_create_params.py
@@ -27,18 +27,23 @@ class FileCreateParams(TypedDict, total=False):
class ChunkingStrategyVectorStoreChunkingStrategyAuto(TypedDict, total=False):
type: Required[Literal["auto"]]
+ """Strategy type, always "auto" for automatic chunking"""
class ChunkingStrategyVectorStoreChunkingStrategyStaticStatic(TypedDict, total=False):
chunk_overlap_tokens: Required[int]
+ """Number of tokens to overlap between adjacent chunks"""
max_chunk_size_tokens: Required[int]
+ """Maximum number of tokens per chunk, must be between 100 and 4096"""
class ChunkingStrategyVectorStoreChunkingStrategyStatic(TypedDict, total=False):
static: Required[ChunkingStrategyVectorStoreChunkingStrategyStaticStatic]
+ """Configuration parameters for the static chunking strategy"""
type: Required[Literal["static"]]
+ """Strategy type, always "static" for static chunking"""
ChunkingStrategy: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/vector_stores/file_delete_response.py b/src/llama_stack_client/types/vector_stores/file_delete_response.py
index be90cec6..f24e1910 100644
--- a/src/llama_stack_client/types/vector_stores/file_delete_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_delete_response.py
@@ -7,7 +7,10 @@
class FileDeleteResponse(BaseModel):
id: str
+ """Unique identifier of the deleted file"""
deleted: bool
+ """Whether the deletion operation was successful"""
object: str
+ """Object type identifier for the deletion response"""
diff --git a/src/llama_stack_client/types/vector_stores/file_list_params.py b/src/llama_stack_client/types/vector_stores/file_list_params.py
index 3843cb3f..7174242d 100644
--- a/src/llama_stack_client/types/vector_stores/file_list_params.py
+++ b/src/llama_stack_client/types/vector_stores/file_list_params.py
@@ -9,11 +9,30 @@
class FileListParams(TypedDict, total=False):
after: str
+ """(Optional) A cursor for use in pagination.
+
+ `after` is an object ID that defines your place in the list.
+ """
before: str
+ """(Optional) A cursor for use in pagination.
+
+ `before` is an object ID that defines your place in the list.
+ """
filter: Literal["completed", "in_progress", "cancelled", "failed"]
+ """
+ (Optional) Filter by file status to only return files with the specified status.
+ """
limit: int
+ """(Optional) A limit on the number of objects to be returned.
+
+ Limit can range between 1 and 100, and the default is 20.
+ """
order: str
+ """(Optional) Sort order by the `created_at` timestamp of the objects.
+
+ `asc` for ascending order and `desc` for descending order.
+ """
diff --git a/src/llama_stack_client/types/vector_stores/file_list_response.py b/src/llama_stack_client/types/vector_stores/file_list_response.py
index d9f5f466..45ddc95f 100644
--- a/src/llama_stack_client/types/vector_stores/file_list_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_list_response.py
@@ -10,11 +10,16 @@
class FileListResponse(BaseModel):
data: List[VectorStoreFile]
+ """List of vector store file objects"""
has_more: bool
+ """Whether there are more files available beyond this page"""
object: str
+ """Object type identifier, always "list" """
first_id: Optional[str] = None
+ """(Optional) ID of the first file in the list for pagination"""
last_id: Optional[str] = None
+ """(Optional) ID of the last file in the list for pagination"""
diff --git a/src/llama_stack_client/types/vector_stores/vector_store_file.py b/src/llama_stack_client/types/vector_stores/vector_store_file.py
index 45ce03f8..243a00df 100644
--- a/src/llama_stack_client/types/vector_stores/vector_store_file.py
+++ b/src/llama_stack_client/types/vector_stores/vector_store_file.py
@@ -18,18 +18,23 @@
class ChunkingStrategyVectorStoreChunkingStrategyAuto(BaseModel):
type: Literal["auto"]
+ """Strategy type, always "auto" for automatic chunking"""
class ChunkingStrategyVectorStoreChunkingStrategyStaticStatic(BaseModel):
chunk_overlap_tokens: int
+ """Number of tokens to overlap between adjacent chunks"""
max_chunk_size_tokens: int
+ """Maximum number of tokens per chunk, must be between 100 and 4096"""
class ChunkingStrategyVectorStoreChunkingStrategyStatic(BaseModel):
static: ChunkingStrategyVectorStoreChunkingStrategyStaticStatic
+ """Configuration parameters for the static chunking strategy"""
type: Literal["static"]
+ """Strategy type, always "static" for static chunking"""
ChunkingStrategy: TypeAlias = Annotated[
@@ -40,25 +45,36 @@ class ChunkingStrategyVectorStoreChunkingStrategyStatic(BaseModel):
class LastError(BaseModel):
code: Literal["server_error", "rate_limit_exceeded"]
+ """Error code indicating the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class VectorStoreFile(BaseModel):
id: str
+ """Unique identifier for the file"""
attributes: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Key-value attributes associated with the file"""
chunking_strategy: ChunkingStrategy
+ """Strategy used for splitting the file into chunks"""
created_at: int
+ """Timestamp when the file was added to the vector store"""
object: str
+ """Object type identifier, always "vector_store.file" """
status: Literal["completed", "in_progress", "cancelled", "failed"]
+ """Current processing status of the file"""
usage_bytes: int
+ """Storage space used by this file in bytes"""
vector_store_id: str
+ """ID of the vector store containing this file"""
last_error: Optional[LastError] = None
+ """(Optional) Error information if file processing failed"""
diff --git a/src/llama_stack_client/types/version_info.py b/src/llama_stack_client/types/version_info.py
index 5fc5bbb4..001d05cb 100644
--- a/src/llama_stack_client/types/version_info.py
+++ b/src/llama_stack_client/types/version_info.py
@@ -7,3 +7,4 @@
class VersionInfo(BaseModel):
version: str
+ """Version number of the service"""
From 4c7c077719a2993d1fbf185b8e09b9b984b13921 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 4 Aug 2025 21:06:14 +0000
Subject: [PATCH 049/102] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 611c42e2..d713b52d 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bb6596edeb9aa753145023f1950a340bc1701d5339b3fe7ea5d949fe6518f2c9.yml
-openapi_spec_hash: 2602f83d69df2cbde50321d06fa9ac9b
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-569b5214f650a12131ef19db2720843271b9d8f3ac9dc0b4f2d641834459971c.yml
+openapi_spec_hash: 71aee95b81884d1e155a5b0d7672d0d1
config_hash: e6c3e48e220b264936ee6df8b996ab12
From 62901e7b3bb26956f28b2443508d59ab6bc926b4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 050/102] chore(internal): version bump
From 607c7bea3d8e24d12069fa8a496380319badd71c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 051/102] chore(internal): version bump
From 39155e53bff8e0255b5c62e7aa3e9b801c719f96 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 052/102] chore(internal): version bump
From 9a4320d7a4a81412a8657f23a9b8e3331770951a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 053/102] chore(internal): version bump
From 9d04993f6cc133f6ea6ca943d14a59e9b309938a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 054/102] chore(ci): only run for pushes and fork pull requests
From 3165cad3251782f4bfe529d9bdde1f18b5813fc0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 02:24:02 +0000
Subject: [PATCH 055/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
README.md | 3 +++
scripts/utils/upload-artifact.sh | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b3b5e583..45f2163e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.4"
+ ".": "0.2.13"
}
diff --git a/README.md b/README.md
index 23e32f01..bbd86e1c 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,9 @@ You can find more example apps with client SDKs to talk with the Llama Stack ser
pip install llama-stack-client
```
+> [!NOTE]
+> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install llama_stack_client`
+
## Usage
The full API of this library can be found in [api.md](api.md). You may find basic client examples in our [llama-stack-apps](https://github.com/meta-llama/llama-stack-apps/tree/main) repo.
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index f6c7413b..f9bfddee 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: pip install --pre 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
From d7c2ab87065aaade14a143113c90a0082ef35ee4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:07:38 +0000
Subject: [PATCH 056/102] fix(ci): correct conditional
---
.github/workflows/ci.yml | 82 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 .github/workflows/ci.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..181b5cc1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,82 @@
+name: CI
+on:
+ push:
+ branches-ignore:
+ - 'generated'
+ - 'codegen/**'
+ - 'integrated/**'
+ - 'stl-preview-head/**'
+ - 'stl-preview-base/**'
+ pull_request:
+ branches-ignore:
+ - 'stl-preview-head/**'
+ - 'stl-preview-base/**'
+
+jobs:
+ lint:
+ timeout-minutes: 10
+ name: lint
+ runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Install dependencies
+ run: rye sync --all-features
+
+ - name: Run lints
+ run: ./scripts/lint
+
+ upload:
+ if: github.repository == 'stainless-sdks/llama-stack-client-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
+ timeout-minutes: 10
+ name: upload
+ permissions:
+ contents: read
+ id-token: write
+ runs-on: depot-ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Get GitHub OIDC Token
+ id: github-oidc
+ uses: actions/github-script@v6
+ with:
+ script: core.setOutput('github_token', await core.getIDToken());
+
+ - name: Upload tarball
+ env:
+ URL: https://pkg.stainless.com/s
+ AUTH: ${{ steps.github-oidc.outputs.github_token }}
+ SHA: ${{ github.sha }}
+ run: ./scripts/utils/upload-artifact.sh
+
+ test:
+ timeout-minutes: 10
+ name: test
+ runs-on: ${{ github.repository == 'stainless-sdks/llama-stack-client-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Bootstrap
+ run: ./scripts/bootstrap
+
+ - name: Run tests
+ run: ./scripts/test
From 78271038dcd35ea78fc2addf0676c4cdbea07a0e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 2 Jul 2025 05:21:21 +0000
Subject: [PATCH 057/102] chore(ci): change upload type
---
.github/workflows/ci.yml | 18 ++++++++++++++++--
scripts/utils/upload-artifact.sh | 12 +++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 181b5cc1..ee914c4e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,10 +35,10 @@ jobs:
- name: Run lints
run: ./scripts/lint
- upload:
+ build:
if: github.repository == 'stainless-sdks/llama-stack-client-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
- name: upload
+ name: build
permissions:
contents: read
id-token: write
@@ -46,6 +46,20 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Install Rye
+ run: |
+ curl -sSf https://rye.astral.sh/get | bash
+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
+ env:
+ RYE_VERSION: '0.44.0'
+ RYE_INSTALL_OPTION: '--yes'
+
+ - name: Install dependencies
+ run: rye sync --all-features
+
+ - name: Run build
+ run: rye build
+
- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index f9bfddee..8593351a 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -exuo pipefail
-RESPONSE=$(curl -X POST "$URL" \
+FILENAME=$(basename dist/*.whl)
+
+RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \
-H "Authorization: Bearer $AUTH" \
-H "Content-Type: application/json")
@@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi
-UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
- -H "Content-Type: application/gzip" \
- --data-binary @- "$SIGNED_URL" 2>&1)
+UPLOAD_RESPONSE=$(curl -v -X PUT \
+ -H "Content-Type: binary/octet-stream" \
+ --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1)
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
- echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA'\033[0m"
+ echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/llama-stack-client-python/$SHA/$FILENAME'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
From 7cd543f782490fe6ed5a90474114c1ef084a8b34 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 8 Jul 2025 02:12:32 +0000
Subject: [PATCH 058/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
requirements-dev.lock | 2 +-
requirements.lock | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 45f2163e..9007059e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.13"
+ ".": "0.2.14"
}
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 869ac57f..1e9ccc5b 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -56,7 +56,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via llama-stack-client
# via respx
-httpx-aiohttp==0.1.6
+httpx-aiohttp==0.1.8
# via llama-stack-client
idna==3.4
# via anyio
diff --git a/requirements.lock b/requirements.lock
index ac621298..de13db42 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -43,7 +43,7 @@ httpcore==1.0.2
httpx==0.28.1
# via httpx-aiohttp
# via llama-stack-client
-httpx-aiohttp==0.1.6
+httpx-aiohttp==0.1.8
# via llama-stack-client
idna==3.4
# via anyio
From 4a7073f0e60aea8a2b7ec6d72b31fc9554234ef0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 9 Jul 2025 02:28:56 +0000
Subject: [PATCH 059/102] chore(internal): bump pinned h11 dep
---
requirements-dev.lock | 4 ++--
requirements.lock | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 1e9ccc5b..e1a5175a 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -48,9 +48,9 @@ filelock==3.12.4
frozenlist==1.6.2
# via aiohttp
# via aiosignal
-h11==0.14.0
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
diff --git a/requirements.lock b/requirements.lock
index de13db42..098354a7 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -36,9 +36,9 @@ exceptiongroup==1.2.2
frozenlist==1.6.2
# via aiohttp
# via aiosignal
-h11==0.14.0
+h11==0.16.0
# via httpcore
-httpcore==1.0.2
+httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
From 2afc17ba76b498f6f0c975111bfd9456090d10b5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 9 Jul 2025 02:47:48 +0000
Subject: [PATCH 060/102] chore(package): mark python 3.13 as supported
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index c25039a0..b6a16846 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -27,6 +27,7 @@ classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
From 9f95130b77729d2adcf906355ddef41d109999d0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 10 Jul 2025 02:44:02 +0000
Subject: [PATCH 061/102] fix(parsing): correctly handle nested discriminated
unions
---
src/llama_stack_client/_models.py | 13 +++++----
tests/test_models.py | 45 +++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index 4f214980..528d5680 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -2,9 +2,10 @@
import os
import inspect
-from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
+from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
from datetime import date, datetime
from typing_extensions import (
+ List,
Unpack,
Literal,
ClassVar,
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
if type_ is None:
raise RuntimeError(f"Unexpected field type is None for {key}")
- return construct_type(value=value, type_=type_)
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
def is_basemodel(type_: type) -> bool:
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
return cast(_T, construct_type(value=value, type_=type_))
-def construct_type(*, value: object, type_: object) -> object:
+def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
"""Loose coercion to the expected type with construction of nested values.
If the given value does not match the expected type then it is returned as-is.
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
- if is_annotated_type(type_):
- meta: tuple[Any, ...] = get_args(type_)[1:]
+ if metadata is not None:
+ meta: tuple[Any, ...] = tuple(metadata)
+ elif is_annotated_type(type_):
+ meta = get_args(type_)[1:]
type_ = extract_type_arg(type_, 0)
else:
meta = tuple()
diff --git a/tests/test_models.py b/tests/test_models.py
index a27dfa46..493215f0 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -889,3 +889,48 @@ class ModelB(BaseModel):
)
assert isinstance(m, ModelB)
+
+
+def test_nested_discriminated_union() -> None:
+ class InnerType1(BaseModel):
+ type: Literal["type_1"]
+
+ class InnerModel(BaseModel):
+ inner_value: str
+
+ class InnerType2(BaseModel):
+ type: Literal["type_2"]
+ some_inner_model: InnerModel
+
+ class Type1(BaseModel):
+ base_type: Literal["base_type_1"]
+ value: Annotated[
+ Union[
+ InnerType1,
+ InnerType2,
+ ],
+ PropertyInfo(discriminator="type"),
+ ]
+
+ class Type2(BaseModel):
+ base_type: Literal["base_type_2"]
+
+ T = Annotated[
+ Union[
+ Type1,
+ Type2,
+ ],
+ PropertyInfo(discriminator="base_type"),
+ ]
+
+ model = construct_type(
+ type_=T,
+ value={
+ "base_type": "base_type_1",
+ "value": {
+ "type": "type_2",
+ },
+ },
+ )
+ assert isinstance(model, Type1)
+ assert isinstance(model.value, InnerType2)
From ca89c7fb2e09ef52565f7de34068b3b4bbb575dc Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:01:47 +0000
Subject: [PATCH 062/102] chore(readme): fix version rendering on pypi
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index bbd86e1c..1ccdb98b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# Llama Stack Client Python API library
+
[](https://pypi.org/project/llama_stack_client/) [](https://pypi.org/project/llama-stack-client/)
[](https://discord.gg/llama-stack)
From d6a80a5c38305c63494a9f8498e47ba0c0031295 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:06:49 +0000
Subject: [PATCH 063/102] fix(client): don't send Content-Type header on GET
requests
---
pyproject.toml | 2 --
src/llama_stack_client/_base_client.py | 11 +++++++++--
tests/test_client.py | 4 ++--
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index b6a16846..30a44752 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,8 +53,6 @@ dev = [
Homepage = "https://github.com/llamastack/llama-stack-client-python"
Repository = "https://github.com/llamastack/llama-stack-client-python"
-
-
[build-system]
requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
diff --git a/src/llama_stack_client/_base_client.py b/src/llama_stack_client/_base_client.py
index a0bbc468..4224d36a 100644
--- a/src/llama_stack_client/_base_client.py
+++ b/src/llama_stack_client/_base_client.py
@@ -529,6 +529,15 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
+ is_body_allowed = options.method.lower() != "get"
+
+ if is_body_allowed:
+ kwargs["json"] = json_data if is_given(json_data) else None
+ kwargs["files"] = files
+ else:
+ headers.pop("Content-Type", None)
+ kwargs.pop("data", None)
+
# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
@@ -540,8 +549,6 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
- json=json_data if is_given(json_data) else None,
- files=files,
**kwargs,
)
diff --git a/tests/test_client.py b/tests/test_client.py
index bc42682c..14889fae 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -431,7 +431,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, client: LlamaStackClient) -> None:
request = client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
@@ -1245,7 +1245,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, async_client: AsyncLlamaStackClient) -> None:
request = async_client._build_request(
FinalRequestOptions.construct(
- method="get",
+ method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
From 64e9b91be04672866c869edb13de0a80b0ec74b3 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 15:36:56 +0000
Subject: [PATCH 064/102] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index fe4493c0..7a6a579a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: e1d37a77a6e8ca86fb6bccb4b0f172c9
+config_hash: d1c36a7d3bd810e6c309f861fa0263b1
From 4d4afec936a1e6b2f0bf96a5508fb54620c894e4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 16 Jul 2025 02:08:10 +0000
Subject: [PATCH 065/102] chore(internal): codegen related update
---
.release-please-manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 9007059e..faf409dd 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.14"
+ ".": "0.2.15"
}
From 8599d2512786ceb164e64e73eb48a512b3945651 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 16 Jul 2025 13:05:02 +0000
Subject: [PATCH 066/102] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 7a6a579a..71d6c6e2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: d1c36a7d3bd810e6c309f861fa0263b1
+config_hash: a2760f6aac3d1577995504a4d154a5a2
From a8a398fb7ca67117d3b7663354a406d1432fd8fb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 22 Jul 2025 02:08:15 +0000
Subject: [PATCH 067/102] fix(parsing): ignore empty metadata
---
src/llama_stack_client/_models.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index 528d5680..ffcbf67b 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -439,7 +439,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
type_ = type_.__value__ # type: ignore[unreachable]
# unwrap `Annotated[T, ...]` -> `T`
- if metadata is not None:
+ if metadata is not None and len(metadata) > 0:
meta: tuple[Any, ...] = tuple(metadata)
elif is_annotated_type(type_):
meta = get_args(type_)[1:]
From f981bdc927411cb3b69febd578d39299dac27670 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 23 Jul 2025 02:11:08 +0000
Subject: [PATCH 068/102] fix(parsing): parse extra field types
---
src/llama_stack_client/_models.py | 25 +++++++++++++++++++++++--
tests/test_models.py | 29 ++++++++++++++++++++++++++++-
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/src/llama_stack_client/_models.py b/src/llama_stack_client/_models.py
index ffcbf67b..b8387ce9 100644
--- a/src/llama_stack_client/_models.py
+++ b/src/llama_stack_client/_models.py
@@ -208,14 +208,18 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride]
else:
fields_values[name] = field_get_default(field)
+ extra_field_type = _get_extra_fields_type(__cls)
+
_extra = {}
for key, value in values.items():
if key not in model_fields:
+ parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
+
if PYDANTIC_V2:
- _extra[key] = value
+ _extra[key] = parsed
else:
_fields_set.add(key)
- fields_values[key] = value
+ fields_values[key] = parsed
object.__setattr__(m, "__dict__", fields_values)
@@ -370,6 +374,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
+def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
+ if not PYDANTIC_V2:
+ # TODO
+ return None
+
+ schema = cls.__pydantic_core_schema__
+ if schema["type"] == "model":
+ fields = schema["schema"]
+ if fields["type"] == "model-fields":
+ extras = fields.get("extras_schema")
+ if extras and "cls" in extras:
+ # mypy can't narrow the type
+ return extras["cls"] # type: ignore[no-any-return]
+
+ return None
+
+
def is_basemodel(type_: type) -> bool:
"""Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`"""
if is_union(type_):
diff --git a/tests/test_models.py b/tests/test_models.py
index 493215f0..c5135234 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -1,5 +1,5 @@
import json
-from typing import Any, Dict, List, Union, Optional, cast
+from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast
from datetime import datetime, timezone
from typing_extensions import Literal, Annotated, TypeAliasType
@@ -934,3 +934,30 @@ class Type2(BaseModel):
)
assert isinstance(model, Type1)
assert isinstance(model.value, InnerType2)
+
+
+@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now")
+def test_extra_properties() -> None:
+ class Item(BaseModel):
+ prop: int
+
+ class Model(BaseModel):
+ __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ other: str
+
+ if TYPE_CHECKING:
+
+ def __getattr__(self, attr: str) -> Item: ...
+
+ model = construct_type(
+ type_=Model,
+ value={
+ "a": {"prop": 1},
+ "other": "foo",
+ },
+ )
+ assert isinstance(model, Model)
+ assert model.a.prop == 1
+ assert isinstance(model.a, Item)
+ assert model.other == "foo"
From dd0ae96300ce6d2940063a7b33c0948d250bbc5e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 00:56:29 +0000
Subject: [PATCH 069/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
src/llama_stack_client/resources/inference.py | 91 +-
tests/api_resources/test_inference.py | 1032 +++++++++--------
3 files changed, 615 insertions(+), 510 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 71d6c6e2..eb0c1fdc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: a2760f6aac3d1577995504a4d154a5a2
+config_hash: da8da64a2803645fa2115ed0b2d44784
diff --git a/src/llama_stack_client/resources/inference.py b/src/llama_stack_client/resources/inference.py
index 84a8dd96..6a93f0f4 100644
--- a/src/llama_stack_client/resources/inference.py
+++ b/src/llama_stack_client/resources/inference.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import List, Union, Iterable
from typing_extensions import Literal, overload
@@ -183,6 +184,7 @@ def batch_completion(
cast_to=BatchCompletion,
)
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -251,6 +253,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -319,6 +322,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
def chat_completion(
self,
@@ -387,6 +391,7 @@ def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
def chat_completion(
self,
@@ -437,6 +442,7 @@ def chat_completion(
stream_cls=Stream[ChatCompletionResponseStreamChunk],
)
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -483,6 +489,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -529,6 +536,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
def completion(
self,
@@ -575,6 +583,7 @@ def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@required_args(["content", "model_id"], ["content", "model_id", "stream"])
def completion(
self,
@@ -617,6 +626,7 @@ def completion(
stream_cls=Stream[CompletionResponse],
)
+ @typing_extensions.deprecated("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.")
def embeddings(
self,
*,
@@ -821,6 +831,7 @@ async def batch_completion(
cast_to=BatchCompletion,
)
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -889,6 +900,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -957,6 +969,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@overload
async def chat_completion(
self,
@@ -1025,6 +1038,7 @@ async def chat_completion(
"""
...
+ @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
async def chat_completion(
self,
@@ -1075,6 +1089,7 @@ async def chat_completion(
stream_cls=AsyncStream[ChatCompletionResponseStreamChunk],
)
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1121,6 +1136,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1167,6 +1183,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@overload
async def completion(
self,
@@ -1213,6 +1230,7 @@ async def completion(
"""
...
+ @typing_extensions.deprecated("/v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.")
@required_args(["content", "model_id"], ["content", "model_id", "stream"])
async def completion(
self,
@@ -1255,6 +1273,7 @@ async def completion(
stream_cls=AsyncStream[CompletionResponse],
)
+ @typing_extensions.deprecated("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.")
async def embeddings(
self,
*,
@@ -1327,14 +1346,20 @@ def __init__(self, inference: InferenceResource) -> None:
self.batch_completion = to_raw_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = to_raw_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = to_raw_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = to_raw_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1348,14 +1373,20 @@ def __init__(self, inference: AsyncInferenceResource) -> None:
self.batch_completion = async_to_raw_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = async_to_raw_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = async_to_raw_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = async_to_raw_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1369,14 +1400,20 @@ def __init__(self, inference: InferenceResource) -> None:
self.batch_completion = to_streamed_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = to_streamed_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = to_streamed_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = to_streamed_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
@@ -1390,12 +1427,18 @@ def __init__(self, inference: AsyncInferenceResource) -> None:
self.batch_completion = async_to_streamed_response_wrapper(
inference.batch_completion,
)
- self.chat_completion = async_to_streamed_response_wrapper(
- inference.chat_completion,
+ self.chat_completion = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.chat_completion # pyright: ignore[reportDeprecated],
+ )
)
- self.completion = async_to_streamed_response_wrapper(
- inference.completion,
+ self.completion = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.completion # pyright: ignore[reportDeprecated],
+ )
)
- self.embeddings = async_to_streamed_response_wrapper(
- inference.embeddings,
+ self.embeddings = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ inference.embeddings # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/tests/api_resources/test_inference.py b/tests/api_resources/test_inference.py
index 21967c9a..d5ef46d1 100644
--- a/tests/api_resources/test_inference.py
+++ b/tests/api_resources/test_inference.py
@@ -16,6 +16,8 @@
)
from llama_stack_client.types.shared import BatchCompletion, ChatCompletionResponse
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -178,75 +180,80 @@ def test_streaming_response_batch_completion(self, client: LlamaStackClient) ->
@parametrize
def test_method_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
def test_method_chat_completion_with_all_params_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
def test_raw_response_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -255,96 +262,102 @@ def test_raw_response_chat_completion_overload_1(self, client: LlamaStackClient)
@parametrize
def test_streaming_response_chat_completion_overload_1(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(ChatCompletionResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(ChatCompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
+
inference_stream.response.close()
@parametrize
def test_method_chat_completion_with_all_params_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
inference_stream.response.close()
@parametrize
def test_raw_response_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = response.parse()
@@ -352,58 +365,64 @@ def test_raw_response_chat_completion_overload_2(self, client: LlamaStackClient)
@parametrize
def test_streaming_response_chat_completion_overload_2(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stream = response.parse()
- stream.close()
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_completion_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
def test_method_completion_with_all_params_overload_1(self, client: LlamaStackClient) -> None:
- inference = client.inference.completion(
- content="string",
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
def test_raw_response_completion_overload_1(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -412,54 +431,60 @@ def test_raw_response_completion_overload_1(self, client: LlamaStackClient) -> N
@parametrize
def test_streaming_response_completion_overload_1(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(CompletionResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(CompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_completion_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
+
inference_stream.response.close()
@parametrize
def test_method_completion_with_all_params_overload_2(self, client: LlamaStackClient) -> None:
- inference_stream = client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ )
+
inference_stream.response.close()
@parametrize
def test_raw_response_completion_overload_2(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = response.parse()
@@ -467,44 +492,50 @@ def test_raw_response_completion_overload_2(self, client: LlamaStackClient) -> N
@parametrize
def test_streaming_response_completion_overload_2(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stream = response.parse()
- stream.close()
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_embeddings(self, client: LlamaStackClient) -> None:
- inference = client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
def test_method_embeddings_with_all_params(self, client: LlamaStackClient) -> None:
- inference = client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- output_dimension=0,
- task_type="query",
- text_truncation="none",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ output_dimension=0,
+ task_type="query",
+ text_truncation="none",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
def test_raw_response_embeddings(self, client: LlamaStackClient) -> None:
- response = client.inference.with_raw_response.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.inference.with_raw_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -513,15 +544,16 @@ def test_raw_response_embeddings(self, client: LlamaStackClient) -> None:
@parametrize
def test_streaming_response_embeddings(self, client: LlamaStackClient) -> None:
- with client.inference.with_streaming_response.embeddings(
- contents=["string"],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.inference.with_streaming_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = response.parse()
- assert_matches_type(EmbeddingsResponse, inference, path=["response"])
+ inference = response.parse()
+ assert_matches_type(EmbeddingsResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -687,75 +719,80 @@ async def test_streaming_response_batch_completion(self, async_client: AsyncLlam
@parametrize
async def test_method_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
async def test_method_chat_completion_with_all_params_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
assert_matches_type(ChatCompletionResponse, inference, path=["response"])
@parametrize
async def test_raw_response_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -764,96 +801,102 @@ async def test_raw_response_chat_completion_overload_1(self, async_client: Async
@parametrize
async def test_streaming_response_chat_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = await response.parse()
- assert_matches_type(ChatCompletionResponse, inference, path=["response"])
+ inference = await response.parse()
+ assert_matches_type(ChatCompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_method_chat_completion_with_all_params_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- "context": "string",
- }
- ],
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- tool_choice="auto",
- tool_config={
- "system_message_behavior": "append",
- "tool_choice": "auto",
- "tool_prompt_format": "json",
- },
- tool_prompt_format="json",
- tools=[
- {
- "tool_name": "brave_search",
- "description": "description",
- "parameters": {
- "foo": {
- "param_type": "param_type",
- "default": True,
- "description": "description",
- "required": True,
- }
- },
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ "context": "string",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ tool_choice="auto",
+ tool_config={
+ "system_message_behavior": "append",
+ "tool_choice": "auto",
+ "tool_prompt_format": "json",
+ },
+ tool_prompt_format="json",
+ tools=[
+ {
+ "tool_name": "brave_search",
+ "description": "description",
+ "parameters": {
+ "foo": {
+ "param_type": "param_type",
+ "default": True,
+ "description": "description",
+ "required": True,
+ }
+ },
+ }
+ ],
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_raw_response_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = await response.parse()
@@ -861,58 +904,64 @@ async def test_raw_response_chat_completion_overload_2(self, async_client: Async
@parametrize
async def test_streaming_response_chat_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.chat_completion(
- messages=[
- {
- "content": "string",
- "role": "user",
- }
- ],
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.chat_completion(
+ messages=[
+ {
+ "content": "string",
+ "role": "user",
+ }
+ ],
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- stream = await response.parse()
- await stream.close()
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
async def test_method_completion_with_all_params_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- stream=False,
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ stream=False,
+ )
+
assert_matches_type(CompletionResponse, inference, path=["response"])
@parametrize
async def test_raw_response_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -921,54 +970,60 @@ async def test_raw_response_completion_overload_1(self, async_client: AsyncLlama
@parametrize
async def test_streaming_response_completion_overload_1(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- inference = await response.parse()
- assert_matches_type(CompletionResponse, inference, path=["response"])
+ inference = await response.parse()
+ assert_matches_type(CompletionResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_method_completion_with_all_params_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- inference_stream = await async_client.inference.completion(
- content="string",
- model_id="model_id",
- stream=True,
- logprobs={"top_k": 0},
- response_format={
- "json_schema": {"foo": True},
- "type": "json_schema",
- },
- sampling_params={
- "strategy": {"type": "greedy"},
- "max_tokens": 0,
- "repetition_penalty": 0,
- "stop": ["string"],
- },
- )
+ with pytest.warns(DeprecationWarning):
+ inference_stream = await async_client.inference.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ logprobs={"top_k": 0},
+ response_format={
+ "json_schema": {"foo": True},
+ "type": "json_schema",
+ },
+ sampling_params={
+ "strategy": {"type": "greedy"},
+ "max_tokens": 0,
+ "repetition_penalty": 0,
+ "stop": ["string"],
+ },
+ )
+
await inference_stream.response.aclose()
@parametrize
async def test_raw_response_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ )
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
stream = await response.parse()
@@ -976,44 +1031,50 @@ async def test_raw_response_completion_overload_2(self, async_client: AsyncLlama
@parametrize
async def test_streaming_response_completion_overload_2(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.completion(
- content="string",
- model_id="model_id",
- stream=True,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- stream = await response.parse()
- await stream.close()
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.completion(
+ content="string",
+ model_id="model_id",
+ stream=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
async def test_method_embeddings_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
- inference = await async_client.inference.embeddings(
- contents=["string"],
- model_id="model_id",
- output_dimension=0,
- task_type="query",
- text_truncation="none",
- )
+ with pytest.warns(DeprecationWarning):
+ inference = await async_client.inference.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ output_dimension=0,
+ task_type="query",
+ text_truncation="none",
+ )
+
assert_matches_type(EmbeddingsResponse, inference, path=["response"])
@parametrize
async def test_raw_response_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.inference.with_raw_response.embeddings(
- contents=["string"],
- model_id="model_id",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.inference.with_raw_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1022,14 +1083,15 @@ async def test_raw_response_embeddings(self, async_client: AsyncLlamaStackClient
@parametrize
async def test_streaming_response_embeddings(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.inference.with_streaming_response.embeddings(
- contents=["string"],
- model_id="model_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- inference = await response.parse()
- assert_matches_type(EmbeddingsResponse, inference, path=["response"])
+ with pytest.warns(DeprecationWarning):
+ async with async_client.inference.with_streaming_response.embeddings(
+ contents=["string"],
+ model_id="model_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ inference = await response.parse()
+ assert_matches_type(EmbeddingsResponse, inference, path=["response"])
assert cast(Any, response.is_closed) is True
From 3dbf2a4f205d7199cd4d92a7f3f6a2ee5723cb71 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 00:58:02 +0000
Subject: [PATCH 070/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
src/llama_stack_client/resources/inference.py | 32 ++++++++++++++-----
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index eb0c1fdc..96acf1e7 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
-config_hash: da8da64a2803645fa2115ed0b2d44784
+config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/inference.py b/src/llama_stack_client/resources/inference.py
index 6a93f0f4..7aec2dbd 100644
--- a/src/llama_stack_client/resources/inference.py
+++ b/src/llama_stack_client/resources/inference.py
@@ -184,7 +184,9 @@ def batch_completion(
cast_to=BatchCompletion,
)
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -253,7 +255,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -322,7 +326,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
def chat_completion(
self,
@@ -391,7 +397,9 @@ def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
def chat_completion(
self,
@@ -831,7 +839,9 @@ async def batch_completion(
cast_to=BatchCompletion,
)
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -900,7 +910,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -969,7 +981,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@overload
async def chat_completion(
self,
@@ -1038,7 +1052,9 @@ async def chat_completion(
"""
...
- @typing_extensions.deprecated("chat_completion is deprecated. Please use /v1/openai/v1/chat/completions.")
+ @typing_extensions.deprecated(
+ "/v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions."
+ )
@required_args(["messages", "model_id"], ["messages", "model_id", "stream"])
async def chat_completion(
self,
From 405febd7158db4c129c854293a735c8c71712bc5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 03:41:31 +0000
Subject: [PATCH 071/102] chore(project): add settings file for vscode
---
.gitignore | 1 -
.vscode/settings.json | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 .vscode/settings.json
diff --git a/.gitignore b/.gitignore
index 87797408..95ceb189 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
.prism.log
-.vscode
_dev
__pycache__
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..5b010307
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "python.analysis.importFormat": "relative",
+}
From 6d609e3b9e31477fd540dff8c0ecb24bc9d524d1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 18:38:36 +0000
Subject: [PATCH 072/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +--
.../resources/vector_dbs.py | 8 +++++
.../resources/vector_stores/vector_stores.py | 8 -----
.../post_training/job_artifacts_response.py | 31 +++++++++++++++++--
.../post_training/job_status_response.py | 28 +++++++++++++++--
.../types/shared/query_config.py | 2 +-
.../types/shared_params/query_config.py | 2 +-
.../types/vector_db_list_response.py | 2 ++
.../types/vector_db_register_params.py | 3 ++
.../types/vector_db_register_response.py | 2 ++
.../types/vector_db_retrieve_response.py | 2 ++
.../types/vector_store_create_params.py | 3 --
tests/api_resources/test_vector_dbs.py | 2 ++
tests/api_resources/test_vector_stores.py | 2 --
.../tool_runtime/test_rag_tool.py | 4 +--
15 files changed, 79 insertions(+), 24 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 96acf1e7..f45e5f38 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-df7a19394e9124c18ec4e888e2856d22b5ebfd6fe6fe6e929ff6cfadb2ae7e2a.yml
-openapi_spec_hash: 9428682672fdd7e2afee7af9ef849dc9
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-001fdbbf185bc9fc18521e55461f50dbd77b2f6bdf4b9565fe18a5ade77004dd.yml
+openapi_spec_hash: f410f7b9ebf460becbfc1427256f68e8
config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/vector_dbs.py b/src/llama_stack_client/resources/vector_dbs.py
index 3838c38e..ab62fa6a 100644
--- a/src/llama_stack_client/resources/vector_dbs.py
+++ b/src/llama_stack_client/resources/vector_dbs.py
@@ -110,6 +110,7 @@ def register(
embedding_dimension: int | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
provider_vector_db_id: str | NotGiven = NOT_GIVEN,
+ vector_db_name: 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,
@@ -131,6 +132,8 @@ def register(
provider_vector_db_id: The identifier of the vector database in the provider.
+ vector_db_name: The name of the vector database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -148,6 +151,7 @@ def register(
"embedding_dimension": embedding_dimension,
"provider_id": provider_id,
"provider_vector_db_id": provider_vector_db_id,
+ "vector_db_name": vector_db_name,
},
vector_db_register_params.VectorDBRegisterParams,
),
@@ -276,6 +280,7 @@ async def register(
embedding_dimension: int | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
provider_vector_db_id: str | NotGiven = NOT_GIVEN,
+ vector_db_name: 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,
@@ -297,6 +302,8 @@ async def register(
provider_vector_db_id: The identifier of the vector database in the provider.
+ vector_db_name: The name of the vector database.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -314,6 +321,7 @@ async def register(
"embedding_dimension": embedding_dimension,
"provider_id": provider_id,
"provider_vector_db_id": provider_vector_db_id,
+ "vector_db_name": vector_db_name,
},
vector_db_register_params.VectorDBRegisterParams,
),
diff --git a/src/llama_stack_client/resources/vector_stores/vector_stores.py b/src/llama_stack_client/resources/vector_stores/vector_stores.py
index 7985cee9..2e87ea8a 100644
--- a/src/llama_stack_client/resources/vector_stores/vector_stores.py
+++ b/src/llama_stack_client/resources/vector_stores/vector_stores.py
@@ -74,7 +74,6 @@ def create(
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
- provider_vector_db_id: 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,
@@ -104,8 +103,6 @@ def create(
provider_id: The ID of the provider to use for this vector store.
- provider_vector_db_id: The provider-specific vector database ID.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -126,7 +123,6 @@ def create(
"file_ids": file_ids,
"metadata": metadata,
"provider_id": provider_id,
- "provider_vector_db_id": provider_vector_db_id,
},
vector_store_create_params.VectorStoreCreateParams,
),
@@ -411,7 +407,6 @@ async def create(
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
provider_id: str | NotGiven = NOT_GIVEN,
- provider_vector_db_id: 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,
@@ -441,8 +436,6 @@ async def create(
provider_id: The ID of the provider to use for this vector store.
- provider_vector_db_id: The provider-specific vector database ID.
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -463,7 +456,6 @@ async def create(
"file_ids": file_ids,
"metadata": metadata,
"provider_id": provider_id,
- "provider_vector_db_id": provider_vector_db_id,
},
vector_store_create_params.VectorStoreCreateParams,
),
diff --git a/src/llama_stack_client/types/post_training/job_artifacts_response.py b/src/llama_stack_client/types/post_training/job_artifacts_response.py
index 0fb98c6c..a5646e34 100644
--- a/src/llama_stack_client/types/post_training/job_artifacts_response.py
+++ b/src/llama_stack_client/types/post_training/job_artifacts_response.py
@@ -1,13 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
+from datetime import datetime
from ..._models import BaseModel
-__all__ = ["JobArtifactsResponse"]
+__all__ = ["JobArtifactsResponse", "Checkpoint", "CheckpointTrainingMetrics"]
+
+
+class CheckpointTrainingMetrics(BaseModel):
+ epoch: int
+
+ perplexity: float
+
+ train_loss: float
+
+ validation_loss: float
+
+
+class Checkpoint(BaseModel):
+ created_at: datetime
+
+ epoch: int
+
+ identifier: str
+
+ path: str
+
+ post_training_job_id: str
+
+ training_metrics: Optional[CheckpointTrainingMetrics] = None
class JobArtifactsResponse(BaseModel):
- checkpoints: List[object]
+ checkpoints: List[Checkpoint]
job_uuid: str
diff --git a/src/llama_stack_client/types/post_training/job_status_response.py b/src/llama_stack_client/types/post_training/job_status_response.py
index 5ba60a6a..e830b10d 100644
--- a/src/llama_stack_client/types/post_training/job_status_response.py
+++ b/src/llama_stack_client/types/post_training/job_status_response.py
@@ -6,11 +6,35 @@
from ..._models import BaseModel
-__all__ = ["JobStatusResponse"]
+__all__ = ["JobStatusResponse", "Checkpoint", "CheckpointTrainingMetrics"]
+
+
+class CheckpointTrainingMetrics(BaseModel):
+ epoch: int
+
+ perplexity: float
+
+ train_loss: float
+
+ validation_loss: float
+
+
+class Checkpoint(BaseModel):
+ created_at: datetime
+
+ epoch: int
+
+ identifier: str
+
+ path: str
+
+ post_training_job_id: str
+
+ training_metrics: Optional[CheckpointTrainingMetrics] = None
class JobStatusResponse(BaseModel):
- checkpoints: List[object]
+ checkpoints: List[Checkpoint]
job_uuid: str
diff --git a/src/llama_stack_client/types/shared/query_config.py b/src/llama_stack_client/types/shared/query_config.py
index 3628efbf..5c1e1806 100644
--- a/src/llama_stack_client/types/shared/query_config.py
+++ b/src/llama_stack_client/types/shared/query_config.py
@@ -55,7 +55,7 @@ class QueryConfig(BaseModel):
query_generator_config: QueryGeneratorConfig
"""Configuration for the query generator."""
- mode: Optional[str] = None
+ mode: Optional[Literal["vector", "keyword", "hybrid"]] = None
"""Search mode for retrieval—either "vector", "keyword", or "hybrid".
Default "vector".
diff --git a/src/llama_stack_client/types/shared_params/query_config.py b/src/llama_stack_client/types/shared_params/query_config.py
index dd482ecf..9da3da08 100644
--- a/src/llama_stack_client/types/shared_params/query_config.py
+++ b/src/llama_stack_client/types/shared_params/query_config.py
@@ -55,7 +55,7 @@ class QueryConfig(TypedDict, total=False):
query_generator_config: Required[QueryGeneratorConfig]
"""Configuration for the query generator."""
- mode: str
+ mode: Literal["vector", "keyword", "hybrid"]
"""Search mode for retrieval—either "vector", "keyword", or "hybrid".
Default "vector".
diff --git a/src/llama_stack_client/types/vector_db_list_response.py b/src/llama_stack_client/types/vector_db_list_response.py
index 39161431..d53a3c95 100644
--- a/src/llama_stack_client/types/vector_db_list_response.py
+++ b/src/llama_stack_client/types/vector_db_list_response.py
@@ -21,5 +21,7 @@ class VectorDBListResponseItem(BaseModel):
provider_resource_id: Optional[str] = None
+ vector_db_name: Optional[str] = None
+
VectorDBListResponse: TypeAlias = List[VectorDBListResponseItem]
diff --git a/src/llama_stack_client/types/vector_db_register_params.py b/src/llama_stack_client/types/vector_db_register_params.py
index 734659a6..f7e3e7c7 100644
--- a/src/llama_stack_client/types/vector_db_register_params.py
+++ b/src/llama_stack_client/types/vector_db_register_params.py
@@ -22,3 +22,6 @@ class VectorDBRegisterParams(TypedDict, total=False):
provider_vector_db_id: str
"""The identifier of the vector database in the provider."""
+
+ vector_db_name: str
+ """The name of the vector database."""
diff --git a/src/llama_stack_client/types/vector_db_register_response.py b/src/llama_stack_client/types/vector_db_register_response.py
index 9c7a3166..b9224a23 100644
--- a/src/llama_stack_client/types/vector_db_register_response.py
+++ b/src/llama_stack_client/types/vector_db_register_response.py
@@ -20,3 +20,5 @@ class VectorDBRegisterResponse(BaseModel):
type: Literal["vector_db"]
provider_resource_id: Optional[str] = None
+
+ vector_db_name: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_retrieve_response.py b/src/llama_stack_client/types/vector_db_retrieve_response.py
index fb3597a5..4dd3a710 100644
--- a/src/llama_stack_client/types/vector_db_retrieve_response.py
+++ b/src/llama_stack_client/types/vector_db_retrieve_response.py
@@ -20,3 +20,5 @@ class VectorDBRetrieveResponse(BaseModel):
type: Literal["vector_db"]
provider_resource_id: Optional[str] = None
+
+ vector_db_name: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_store_create_params.py b/src/llama_stack_client/types/vector_store_create_params.py
index 18748f48..78a77a2c 100644
--- a/src/llama_stack_client/types/vector_store_create_params.py
+++ b/src/llama_stack_client/types/vector_store_create_params.py
@@ -38,6 +38,3 @@ class VectorStoreCreateParams(TypedDict, total=False):
provider_id: str
"""The ID of the provider to use for this vector store."""
-
- provider_vector_db_id: str
- """The provider-specific vector database ID."""
diff --git a/tests/api_resources/test_vector_dbs.py b/tests/api_resources/test_vector_dbs.py
index 68d6be89..1c4b855a 100644
--- a/tests/api_resources/test_vector_dbs.py
+++ b/tests/api_resources/test_vector_dbs.py
@@ -100,6 +100,7 @@ def test_method_register_with_all_params(self, client: LlamaStackClient) -> None
embedding_dimension=0,
provider_id="provider_id",
provider_vector_db_id="provider_vector_db_id",
+ vector_db_name="vector_db_name",
)
assert_matches_type(VectorDBRegisterResponse, vector_db, path=["response"])
@@ -252,6 +253,7 @@ async def test_method_register_with_all_params(self, async_client: AsyncLlamaSta
embedding_dimension=0,
provider_id="provider_id",
provider_vector_db_id="provider_vector_db_id",
+ vector_db_name="vector_db_name",
)
assert_matches_type(VectorDBRegisterResponse, vector_db, path=["response"])
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 84324ca4..1300f6af 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: LlamaStackClient) -> None:
file_ids=["string"],
metadata={"foo": True},
provider_id="provider_id",
- provider_vector_db_id="provider_vector_db_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@@ -309,7 +308,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncLlamaStack
file_ids=["string"],
metadata={"foo": True},
provider_id="provider_id",
- provider_vector_db_id="provider_vector_db_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
diff --git a/tests/api_resources/tool_runtime/test_rag_tool.py b/tests/api_resources/tool_runtime/test_rag_tool.py
index 17a64d8e..dab816ab 100644
--- a/tests/api_resources/tool_runtime/test_rag_tool.py
+++ b/tests/api_resources/tool_runtime/test_rag_tool.py
@@ -93,7 +93,7 @@ def test_method_query_with_all_params(self, client: LlamaStackClient) -> None:
"separator": "separator",
"type": "default",
},
- "mode": "mode",
+ "mode": "vector",
"ranker": {
"impact_factor": 0,
"type": "rrf",
@@ -210,7 +210,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncLlamaStackC
"separator": "separator",
"type": "default",
},
- "mode": "mode",
+ "mode": "vector",
"ranker": {
"impact_factor": 0,
"type": "rrf",
From 585f9ce929e0ac17775febb573fa109d9f3d07ac Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 18:41:05 +0000
Subject: [PATCH 073/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
.../resources/vector_stores/vector_stores.py | 16 +-
.../types/chat/completion_create_params.py | 120 +--------
.../types/chat/completion_create_response.py | 128 +--------
.../types/chat/completion_list_response.py | 252 +-----------------
.../chat/completion_retrieve_response.py | 230 +---------------
...ost_training_preference_optimize_params.py | 8 +-
.../types/vector_store_create_params.py | 8 +-
tests/api_resources/test_post_training.py | 48 ++--
tests/api_resources/test_vector_stores.py | 28 +-
10 files changed, 64 insertions(+), 778 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f45e5f38..441c4f5e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-001fdbbf185bc9fc18521e55461f50dbd77b2f6bdf4b9565fe18a5ade77004dd.yml
-openapi_spec_hash: f410f7b9ebf460becbfc1427256f68e8
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
+openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
diff --git a/src/llama_stack_client/resources/vector_stores/vector_stores.py b/src/llama_stack_client/resources/vector_stores/vector_stores.py
index 2e87ea8a..4b62604d 100644
--- a/src/llama_stack_client/resources/vector_stores/vector_stores.py
+++ b/src/llama_stack_client/resources/vector_stores/vector_stores.py
@@ -66,13 +66,13 @@ def with_streaming_response(self) -> VectorStoresResourceWithStreamingResponse:
def create(
self,
*,
- name: str,
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
embedding_dimension: int | NotGiven = NOT_GIVEN,
embedding_model: str | NotGiven = NOT_GIVEN,
expires_after: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
provider_id: 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.
@@ -85,8 +85,6 @@ def create(
Creates a vector store.
Args:
- name: A name for the vector store.
-
chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
strategy.
@@ -101,6 +99,8 @@ def create(
metadata: Set of 16 key-value pairs that can be attached to an object.
+ name: A name for the vector store.
+
provider_id: The ID of the provider to use for this vector store.
extra_headers: Send extra headers
@@ -115,13 +115,13 @@ def create(
"/v1/openai/v1/vector_stores",
body=maybe_transform(
{
- "name": name,
"chunking_strategy": chunking_strategy,
"embedding_dimension": embedding_dimension,
"embedding_model": embedding_model,
"expires_after": expires_after,
"file_ids": file_ids,
"metadata": metadata,
+ "name": name,
"provider_id": provider_id,
},
vector_store_create_params.VectorStoreCreateParams,
@@ -399,13 +399,13 @@ def with_streaming_response(self) -> AsyncVectorStoresResourceWithStreamingRespo
async def create(
self,
*,
- name: str,
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
embedding_dimension: int | NotGiven = NOT_GIVEN,
embedding_model: str | NotGiven = NOT_GIVEN,
expires_after: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
file_ids: List[str] | NotGiven = NOT_GIVEN,
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
+ name: str | NotGiven = NOT_GIVEN,
provider_id: 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.
@@ -418,8 +418,6 @@ async def create(
Creates a vector store.
Args:
- name: A name for the vector store.
-
chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
strategy.
@@ -434,6 +432,8 @@ async def create(
metadata: Set of 16 key-value pairs that can be attached to an object.
+ name: A name for the vector store.
+
provider_id: The ID of the provider to use for this vector store.
extra_headers: Send extra headers
@@ -448,13 +448,13 @@ async def create(
"/v1/openai/v1/vector_stores",
body=await async_maybe_transform(
{
- "name": name,
"chunking_strategy": chunking_strategy,
"embedding_dimension": embedding_dimension,
"embedding_model": embedding_model,
"expires_after": expires_after,
"file_ids": file_ids,
"metadata": metadata,
+ "name": name,
"provider_id": provider_id,
},
vector_store_create_params.VectorStoreCreateParams,
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index 2c9d26f7..3d448dcf 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -15,26 +15,14 @@
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAISystemMessageParam",
"MessageOpenAISystemMessageParamContentUnionMember1",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIAssistantMessageParam",
"MessageOpenAIAssistantMessageParamContentUnionMember1",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIAssistantMessageParamToolCall",
"MessageOpenAIAssistantMessageParamToolCallFunction",
"MessageOpenAIToolMessageParam",
"MessageOpenAIToolMessageParamContentUnionMember1",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"MessageOpenAIDeveloperMessageParam",
"MessageOpenAIDeveloperMessageParamContentUnionMember1",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ResponseFormat",
"ResponseFormatOpenAIResponseFormatText",
"ResponseFormatOpenAIResponseFormatJsonSchema",
@@ -156,38 +144,12 @@ class MessageOpenAIUserMessageParam(TypedDict, total=False):
"""(Optional) The name of the user message participant."""
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAISystemMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAISystemMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAISystemMessageParamContentUnionMember1]]]
"""The content of the "system prompt".
@@ -204,38 +166,12 @@ class MessageOpenAISystemMessageParam(TypedDict, total=False):
"""(Optional) The name of the system message participant."""
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAIAssistantMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIAssistantMessageParamToolCallFunction(TypedDict, total=False):
arguments: str
@@ -266,34 +202,12 @@ class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(TypedDict, total=False):
+class MessageOpenAIToolMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(TypedDict, total=False):
- image_url: Required[
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIToolMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAIToolMessageParamContentUnionMember1]]]
"""The response content from the tool"""
@@ -305,38 +219,12 @@ class MessageOpenAIToolMessageParam(TypedDict, total=False):
"""Unique identifier for the tool call this response is for"""
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- TypedDict, total=False
-):
+class MessageOpenAIDeveloperMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
type: Required[Literal["text"]]
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- TypedDict, total=False
-):
- url: Required[str]
-
- detail: str
-
-
-class MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- TypedDict, total=False
-):
- image_url: Required[
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- ]
-
- type: Required[Literal["image_url"]]
-
-
-MessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Union[
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- MessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
-]
-
-
class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
content: Required[Union[str, Iterable[MessageOpenAIDeveloperMessageParamContentUnionMember1]]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index 5c8eb51c..3315982c 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -19,26 +19,14 @@
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCall",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"OpenAIChatCompletionChoiceLogprobs",
"OpenAIChatCompletionChoiceLogprobsContent",
"OpenAIChatCompletionChoiceLogprobsContentTopLogprob",
@@ -91,39 +79,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -140,39 +101,12 @@ class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -205,39 +139,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -249,39 +156,12 @@ class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index d3b580a1..e6a3d319 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -18,26 +18,14 @@
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAISystemMessageParam",
"DataChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIAssistantMessageParam",
"DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIAssistantMessageParamToolCall",
"DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"DataChoiceMessageOpenAIToolMessageParam",
"DataChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceMessageOpenAIDeveloperMessageParam",
"DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataChoiceLogprobs",
"DataChoiceLogprobsContent",
"DataChoiceLogprobsContentTopLogprob",
@@ -51,26 +39,14 @@
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAISystemMessageParam",
"DataInputMessageOpenAISystemMessageParamContentUnionMember1",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIAssistantMessageParam",
"DataInputMessageOpenAIAssistantMessageParamContentUnionMember1",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIAssistantMessageParamToolCall",
"DataInputMessageOpenAIAssistantMessageParamToolCallFunction",
"DataInputMessageOpenAIToolMessageParam",
"DataInputMessageOpenAIToolMessageParamContentUnionMember1",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"DataInputMessageOpenAIDeveloperMessageParam",
"DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
]
@@ -116,37 +92,12 @@ class DataChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -163,41 +114,12 @@ class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -228,37 +150,12 @@ class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -270,41 +167,12 @@ class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(
- BaseModel
-):
+class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
@@ -428,37 +296,12 @@ class DataInputMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -475,39 +318,12 @@ class DataInputMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -538,37 +354,12 @@ class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -580,39 +371,12 @@ class DataInputMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
- BaseModel
-):
- image_url: (
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class DataInputMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index 330c752d..bdfd48c3 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -17,26 +17,14 @@
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAISystemMessageParam",
"ChoiceMessageOpenAISystemMessageParamContentUnionMember1",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIAssistantMessageParam",
"ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIAssistantMessageParamToolCall",
"ChoiceMessageOpenAIAssistantMessageParamToolCallFunction",
"ChoiceMessageOpenAIToolMessageParam",
"ChoiceMessageOpenAIToolMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceMessageOpenAIDeveloperMessageParam",
"ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"ChoiceLogprobs",
"ChoiceLogprobsContent",
"ChoiceLogprobsContentTopLogprob",
@@ -50,26 +38,14 @@
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAISystemMessageParam",
"InputMessageOpenAISystemMessageParamContentUnionMember1",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIAssistantMessageParam",
"InputMessageOpenAIAssistantMessageParamContentUnionMember1",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIAssistantMessageParamToolCall",
"InputMessageOpenAIAssistantMessageParamToolCallFunction",
"InputMessageOpenAIToolMessageParam",
"InputMessageOpenAIToolMessageParamContentUnionMember1",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
"InputMessageOpenAIDeveloperMessageParam",
"InputMessageOpenAIDeveloperMessageParamContentUnionMember1",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
- "InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
]
@@ -113,35 +89,12 @@ class ChoiceMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -158,37 +111,12 @@ class ChoiceMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -219,35 +147,12 @@ class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -259,37 +164,12 @@ class ChoiceMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class ChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
@@ -409,35 +289,12 @@ class InputMessageOpenAIUserMessageParam(BaseModel):
"""(Optional) The name of the user message participant."""
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAISystemMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAISystemMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAISystemMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAISystemMessageParamContentUnionMember1]]
"""The content of the "system prompt".
@@ -454,37 +311,12 @@ class InputMessageOpenAISystemMessageParam(BaseModel):
"""(Optional) The name of the system message participant."""
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIAssistantMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIAssistantMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
@@ -515,33 +347,12 @@ class InputMessageOpenAIAssistantMessageParam(BaseModel):
"""List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object."""
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(BaseModel):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIToolMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIToolMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIToolMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAIToolMessageParamContentUnionMember1]]
"""The response content from the tool"""
@@ -553,37 +364,12 @@ class InputMessageOpenAIToolMessageParam(BaseModel):
"""Unique identifier for the tool call this response is for"""
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
+class InputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
type: Literal["text"]
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
- BaseModel
-):
- url: str
-
- detail: Optional[str] = None
-
-
-class InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
- image_url: (
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
- )
-
- type: Literal["image_url"]
-
-
-InputMessageOpenAIDeveloperMessageParamContentUnionMember1: TypeAlias = Annotated[
- Union[
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
- InputMessageOpenAIDeveloperMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
- ],
- PropertyInfo(discriminator="type"),
-]
-
-
class InputMessageOpenAIDeveloperMessageParam(BaseModel):
content: Union[str, List[InputMessageOpenAIDeveloperMessageParamContentUnionMember1]]
"""The content of the developer message"""
diff --git a/src/llama_stack_client/types/post_training_preference_optimize_params.py b/src/llama_stack_client/types/post_training_preference_optimize_params.py
index f7d998eb..9d9f8c8c 100644
--- a/src/llama_stack_client/types/post_training_preference_optimize_params.py
+++ b/src/llama_stack_client/types/post_training_preference_optimize_params.py
@@ -36,13 +36,9 @@ class PostTrainingPreferenceOptimizeParams(TypedDict, total=False):
class AlgorithmConfig(TypedDict, total=False):
- epsilon: Required[float]
+ beta: Required[float]
- gamma: Required[float]
-
- reward_clip: Required[float]
-
- reward_scale: Required[float]
+ loss_type: Required[Literal["sigmoid", "hinge", "ipo", "kto_pair"]]
class TrainingConfigDataConfig(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/vector_store_create_params.py b/src/llama_stack_client/types/vector_store_create_params.py
index 78a77a2c..dc6ea47e 100644
--- a/src/llama_stack_client/types/vector_store_create_params.py
+++ b/src/llama_stack_client/types/vector_store_create_params.py
@@ -3,15 +3,12 @@
from __future__ import annotations
from typing import Dict, List, Union, Iterable
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
__all__ = ["VectorStoreCreateParams"]
class VectorStoreCreateParams(TypedDict, total=False):
- name: Required[str]
- """A name for the vector store."""
-
chunking_strategy: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
"""The chunking strategy used to chunk the file(s).
@@ -36,5 +33,8 @@ class VectorStoreCreateParams(TypedDict, total=False):
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
"""Set of 16 key-value pairs that can be attached to an object."""
+ name: str
+ """A name for the vector store."""
+
provider_id: str
"""The ID of the provider to use for this vector store."""
diff --git a/tests/api_resources/test_post_training.py b/tests/api_resources/test_post_training.py
index 5e7430fb..899a53ca 100644
--- a/tests/api_resources/test_post_training.py
+++ b/tests/api_resources/test_post_training.py
@@ -23,10 +23,8 @@ class TestPostTraining:
def test_method_preference_optimize(self, client: LlamaStackClient) -> None:
post_training = client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -44,10 +42,8 @@ def test_method_preference_optimize(self, client: LlamaStackClient) -> None:
def test_method_preference_optimize_with_all_params(self, client: LlamaStackClient) -> None:
post_training = client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -88,10 +84,8 @@ def test_method_preference_optimize_with_all_params(self, client: LlamaStackClie
def test_raw_response_preference_optimize(self, client: LlamaStackClient) -> None:
response = client.post_training.with_raw_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -113,10 +107,8 @@ def test_raw_response_preference_optimize(self, client: LlamaStackClient) -> Non
def test_streaming_response_preference_optimize(self, client: LlamaStackClient) -> None:
with client.post_training.with_streaming_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -247,10 +239,8 @@ class TestAsyncPostTraining:
async def test_method_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
post_training = await async_client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -268,10 +258,8 @@ async def test_method_preference_optimize(self, async_client: AsyncLlamaStackCli
async def test_method_preference_optimize_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
post_training = await async_client.post_training.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -312,10 +300,8 @@ async def test_method_preference_optimize_with_all_params(self, async_client: As
async def test_raw_response_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
response = await async_client.post_training.with_raw_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
@@ -337,10 +323,8 @@ async def test_raw_response_preference_optimize(self, async_client: AsyncLlamaSt
async def test_streaming_response_preference_optimize(self, async_client: AsyncLlamaStackClient) -> None:
async with async_client.post_training.with_streaming_response.preference_optimize(
algorithm_config={
- "epsilon": 0,
- "gamma": 0,
- "reward_clip": 0,
- "reward_scale": 0,
+ "beta": 0,
+ "loss_type": "sigmoid",
},
finetuned_model="finetuned_model",
hyperparam_search_config={"foo": True},
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 1300f6af..0547061a 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -24,30 +24,26 @@ class TestVectorStores:
@parametrize
def test_method_create(self, client: LlamaStackClient) -> None:
- vector_store = client.vector_stores.create(
- name="name",
- )
+ vector_store = client.vector_stores.create()
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: LlamaStackClient) -> None:
vector_store = client.vector_stores.create(
- name="name",
chunking_strategy={"foo": True},
embedding_dimension=0,
embedding_model="embedding_model",
expires_after={"foo": True},
file_ids=["string"],
metadata={"foo": True},
+ name="name",
provider_id="provider_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_raw_response_create(self, client: LlamaStackClient) -> None:
- response = client.vector_stores.with_raw_response.create(
- name="name",
- )
+ response = client.vector_stores.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -56,9 +52,7 @@ def test_raw_response_create(self, client: LlamaStackClient) -> None:
@parametrize
def test_streaming_response_create(self, client: LlamaStackClient) -> None:
- with client.vector_stores.with_streaming_response.create(
- name="name",
- ) as response:
+ with client.vector_stores.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -292,30 +286,26 @@ class TestAsyncVectorStores:
@parametrize
async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
- vector_store = await async_client.vector_stores.create(
- name="name",
- )
+ vector_store = await async_client.vector_stores.create()
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
vector_store = await async_client.vector_stores.create(
- name="name",
chunking_strategy={"foo": True},
embedding_dimension=0,
embedding_model="embedding_model",
expires_after={"foo": True},
file_ids=["string"],
metadata={"foo": True},
+ name="name",
provider_id="provider_id",
)
assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.vector_stores.with_raw_response.create(
- name="name",
- )
+ response = await async_client.vector_stores.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -324,9 +314,7 @@ async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) ->
@parametrize
async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.vector_stores.with_streaming_response.create(
- name="name",
- ) as response:
+ async with async_client.vector_stores.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From 2d422f92ee95364dc67c6557beafccde42ea11eb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 20:18:10 +0000
Subject: [PATCH 074/102] chore: update SDK settings
---
.stats.yml | 2 +-
README.md | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 441c4f5e..2a9a40ba 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
-config_hash: e7d2a81bdf0160da1d41afbaac55d4d2
+config_hash: 4205e80455db5fa2a7b414372d28dac1
diff --git a/README.md b/README.md
index 1ccdb98b..cb5c6237 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,6 @@ You can find more example apps with client SDKs to talk with the Llama Stack ser
pip install llama-stack-client
```
-> [!NOTE]
-> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install llama_stack_client`
-
## Usage
The full API of this library can be found in [api.md](api.md). You may find basic client examples in our [llama-stack-apps](https://github.com/meta-llama/llama-stack-apps/tree/main) repo.
From b2875ecbe69976ccaeeafb7b6216b711a0214edb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 075/102] chore(internal): version bump
From 443ce023733e06e1a83920727630ad4442aa2104 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 076/102] chore(internal): version bump
From 3727fa5703c3e6cfc38fc963650cee1af23c6d68 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 077/102] chore(internal): version bump
From da26ed01f5ad7ff77d0b2166a0c282806a6d1aff Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 078/102] chore(internal): version bump
From 87c9d01fd4f8451882e1b936ba43375e20a56622 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 079/102] chore(ci): only run for pushes and fork pull requests
From 07691acac571ff68cd1ff90f9d60ac3e49b1e144 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:38:54 +0000
Subject: [PATCH 080/102] feat(api): update via SDK Studio
---
.stats.yml | 6 +++---
api.md | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 2a9a40ba..7472e88b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-1cdc29778f32a03666a1933885fc6c9411e710d6f140303847bad5f9fb046e51.yml
-openapi_spec_hash: 691e467be91172e5a2db6a216cce1cc1
-config_hash: 4205e80455db5fa2a7b414372d28dac1
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ea01b3ebf9eea9d623d73a0dbf712698436d216fdcb09f3c6cb2aa7334615103.yml
+openapi_spec_hash: a4f54e9909e5f99acf14d9735974b834
+config_hash: ffbd7388f1c8a5151f2630ae154056ee
diff --git a/api.md b/api.md
index c7a7686b..9b9f0e0c 100644
--- a/api.md
+++ b/api.md
@@ -458,7 +458,7 @@ Methods:
Types:
```python
-from llama_stack_client.types import RunShieldResponse
+from llama_stack_client.types import OpenAPIModerationsResponse, RunShieldResponse
```
Methods:
From 81ee747a2272be3923c978b17b8dc4fa55e813c5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:39:28 +0000
Subject: [PATCH 081/102] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 7472e88b..07e0a87f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ea01b3ebf9eea9d623d73a0dbf712698436d216fdcb09f3c6cb2aa7334615103.yml
-openapi_spec_hash: a4f54e9909e5f99acf14d9735974b834
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
+openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
config_hash: ffbd7388f1c8a5151f2630ae154056ee
From 2a4296d3df60787b4fc3fe2812d06d6080b0d6db Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:40:12 +0000
Subject: [PATCH 082/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
api.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 07e0a87f..156cc112 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 105
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: ffbd7388f1c8a5151f2630ae154056ee
+config_hash: 0394c2b14022becb0352c36afcdfbafe
diff --git a/api.md b/api.md
index 9b9f0e0c..e84d0366 100644
--- a/api.md
+++ b/api.md
@@ -458,7 +458,7 @@ Methods:
Types:
```python
-from llama_stack_client.types import OpenAPIModerationsResponse, RunShieldResponse
+from llama_stack_client.types import OpenAIModerationsResponse, RunShieldResponse
```
Methods:
From f6b80caaad58711957b7935f9b6833528ae3bd78 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 28 Jul 2025 23:43:05 +0000
Subject: [PATCH 083/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
api.md | 1 +
src/llama_stack_client/resources/safety.py | 105 +++++++++++++++++-
src/llama_stack_client/types/__init__.py | 2 +
.../types/openai_moderations_response.py | 33 ++++++
.../types/safety_openai_moderations_params.py | 20 ++++
tests/api_resources/test_safety.py | 83 +++++++++++++-
7 files changed, 243 insertions(+), 5 deletions(-)
create mode 100644 src/llama_stack_client/types/openai_moderations_response.py
create mode 100644 src/llama_stack_client/types/safety_openai_moderations_params.py
diff --git a/.stats.yml b/.stats.yml
index 156cc112..a680bc5c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 105
+configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: 0394c2b14022becb0352c36afcdfbafe
+config_hash: b0cd3ed9be70b0310bc685a4014eb0a5
diff --git a/api.md b/api.md
index e84d0366..f9618fae 100644
--- a/api.md
+++ b/api.md
@@ -463,6 +463,7 @@ from llama_stack_client.types import OpenAIModerationsResponse, RunShieldRespons
Methods:
+- client.safety.openai_moderations(\*\*params) -> OpenAIModerationsResponse
- client.safety.run_shield(\*\*params) -> RunShieldResponse
# Shields
diff --git a/src/llama_stack_client/resources/safety.py b/src/llama_stack_client/resources/safety.py
index 813a1f67..64a5135c 100644
--- a/src/llama_stack_client/resources/safety.py
+++ b/src/llama_stack_client/resources/safety.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from typing import Dict, Union, Iterable
+from typing import Dict, List, Union, Iterable
import httpx
-from ..types import safety_run_shield_params
+from ..types import safety_run_shield_params, safety_openai_moderations_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -20,6 +20,7 @@
from .._base_client import make_request_options
from ..types.run_shield_response import RunShieldResponse
from ..types.shared_params.message import Message
+from ..types.openai_moderations_response import OpenAIModerationsResponse
__all__ = ["SafetyResource", "AsyncSafetyResource"]
@@ -44,6 +45,50 @@ def with_streaming_response(self) -> SafetyResourceWithStreamingResponse:
"""
return SafetyResourceWithStreamingResponse(self)
+ def openai_moderations(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> OpenAIModerationsResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/v1/openai/v1/moderations",
+ body=maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenAIModerationsResponse,
+ )
+
def run_shield(
self,
*,
@@ -112,6 +157,50 @@ def with_streaming_response(self) -> AsyncSafetyResourceWithStreamingResponse:
"""
return AsyncSafetyResourceWithStreamingResponse(self)
+ async def openai_moderations(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> OpenAIModerationsResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/v1/openai/v1/moderations",
+ body=await async_maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=OpenAIModerationsResponse,
+ )
+
async def run_shield(
self,
*,
@@ -164,6 +253,9 @@ class SafetyResourceWithRawResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = to_raw_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = to_raw_response_wrapper(
safety.run_shield,
)
@@ -173,6 +265,9 @@ class AsyncSafetyResourceWithRawResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = async_to_raw_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = async_to_raw_response_wrapper(
safety.run_shield,
)
@@ -182,6 +277,9 @@ class SafetyResourceWithStreamingResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = to_streamed_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = to_streamed_response_wrapper(
safety.run_shield,
)
@@ -191,6 +289,9 @@ class AsyncSafetyResourceWithStreamingResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
+ self.openai_moderations = async_to_streamed_response_wrapper(
+ safety.openai_moderations,
+ )
self.run_shield = async_to_streamed_response_wrapper(
safety.run_shield,
)
diff --git a/src/llama_stack_client/types/__init__.py b/src/llama_stack_client/types/__init__.py
index cfb77868..f595ee76 100644
--- a/src/llama_stack_client/types/__init__.py
+++ b/src/llama_stack_client/types/__init__.py
@@ -133,6 +133,7 @@
from .inference_completion_params import InferenceCompletionParams as InferenceCompletionParams
from .inference_embeddings_params import InferenceEmbeddingsParams as InferenceEmbeddingsParams
from .list_vector_stores_response import ListVectorStoresResponse as ListVectorStoresResponse
+from .openai_moderations_response import OpenAIModerationsResponse as OpenAIModerationsResponse
from .telemetry_get_span_response import TelemetryGetSpanResponse as TelemetryGetSpanResponse
from .vector_db_register_response import VectorDBRegisterResponse as VectorDBRegisterResponse
from .vector_db_retrieve_response import VectorDBRetrieveResponse as VectorDBRetrieveResponse
@@ -151,6 +152,7 @@
from .tool_runtime_invoke_tool_params import ToolRuntimeInvokeToolParams as ToolRuntimeInvokeToolParams
from .inference_chat_completion_params import InferenceChatCompletionParams as InferenceChatCompletionParams
from .list_post_training_jobs_response import ListPostTrainingJobsResponse as ListPostTrainingJobsResponse
+from .safety_openai_moderations_params import SafetyOpenAIModerationsParams as SafetyOpenAIModerationsParams
from .scoring_function_register_params import ScoringFunctionRegisterParams as ScoringFunctionRegisterParams
from .telemetry_get_span_tree_response import TelemetryGetSpanTreeResponse as TelemetryGetSpanTreeResponse
from .tool_runtime_list_tools_response import ToolRuntimeListToolsResponse as ToolRuntimeListToolsResponse
diff --git a/src/llama_stack_client/types/openai_moderations_response.py b/src/llama_stack_client/types/openai_moderations_response.py
new file mode 100644
index 00000000..45eb0d12
--- /dev/null
+++ b/src/llama_stack_client/types/openai_moderations_response.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List
+
+from .._models import BaseModel
+
+__all__ = ["OpenAIModerationsResponse", "Result"]
+
+
+class Result(BaseModel):
+ categories: Dict[str, bool]
+ """A list of the categories, and whether they are flagged or not."""
+
+ category_applied_input_types: Dict[str, List[str]]
+
+ category_messages: Dict[str, str]
+
+ category_scores: Dict[str, float]
+ """A list of the categories along with their scores as predicted by model."""
+
+ flagged: bool
+ """Whether any of the below categories are flagged."""
+
+
+class OpenAIModerationsResponse(BaseModel):
+ id: str
+ """The unique identifier for the moderation request."""
+
+ model: str
+ """The model used to generate the moderation results."""
+
+ results: List[Result]
+ """A list of moderation objects"""
diff --git a/src/llama_stack_client/types/safety_openai_moderations_params.py b/src/llama_stack_client/types/safety_openai_moderations_params.py
new file mode 100644
index 00000000..219c0c74
--- /dev/null
+++ b/src/llama_stack_client/types/safety_openai_moderations_params.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from typing_extensions import Required, TypedDict
+
+__all__ = ["SafetyOpenAIModerationsParams"]
+
+
+class SafetyOpenAIModerationsParams(TypedDict, total=False):
+ input: Required[Union[str, List[str]]]
+ """Input (or inputs) to classify.
+
+ Can be a single string, an array of strings, or an array of multi-modal input
+ objects similar to other models.
+ """
+
+ model: str
+ """The content moderation model you would like to use."""
diff --git a/tests/api_resources/test_safety.py b/tests/api_resources/test_safety.py
index 257dfd76..a2a691fe 100644
--- a/tests/api_resources/test_safety.py
+++ b/tests/api_resources/test_safety.py
@@ -9,7 +9,10 @@
from tests.utils import assert_matches_type
from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
-from llama_stack_client.types import RunShieldResponse
+from llama_stack_client.types import (
+ RunShieldResponse,
+ OpenAIModerationsResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -17,6 +20,45 @@
class TestSafety:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @parametrize
+ def test_method_openai_moderations(self, client: LlamaStackClient) -> None:
+ safety = client.safety.openai_moderations(
+ input="string",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_method_openai_moderations_with_all_params(self, client: LlamaStackClient) -> None:
+ safety = client.safety.openai_moderations(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_raw_response_openai_moderations(self, client: LlamaStackClient) -> None:
+ response = client.safety.with_raw_response.openai_moderations(
+ input="string",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ safety = response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ def test_streaming_response_openai_moderations(self, client: LlamaStackClient) -> None:
+ with client.safety.with_streaming_response.openai_moderations(
+ input="string",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ safety = response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
def test_method_run_shield(self, client: LlamaStackClient) -> None:
safety = client.safety.run_shield(
@@ -75,6 +117,45 @@ class TestAsyncSafety:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @parametrize
+ async def test_method_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.openai_moderations(
+ input="string",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_method_openai_moderations_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.openai_moderations(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_raw_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ response = await async_client.safety.with_raw_response.openai_moderations(
+ input="string",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ safety = await response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
+ async with async_client.safety.with_streaming_response.openai_moderations(
+ input="string",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ safety = await response.parse()
+ assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@parametrize
async def test_method_run_shield(self, async_client: AsyncLlamaStackClient) -> None:
safety = await async_client.safety.run_shield(
From 2e1a629e8d24c37031d8d853ec5e3d9200952934 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 084/102] chore(internal): version bump
From f52cb89e8a8d2e2b41155b6b5db2e700d85fcc29 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 085/102] chore(internal): version bump
From 8f15ef01b12c88af245e477362f86785586b697f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 086/102] chore(internal): version bump
From cc7a51927110f8f4ef7309b9f6c92ace0434b24e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 087/102] chore(internal): version bump
From c05df6620f31a4860e11c5b94b3d7bf85fc9d197 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 088/102] chore(ci): only run for pushes and fork pull requests
From 5d6cc6be97ca098140575e65803d3d51ddc1e9ea Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 089/102] chore(internal): version bump
From 86a0766da6a2e282a2185b42530266aaa4c1a9ce Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 090/102] chore(internal): version bump
From 148be8d37f92a77e553edd599ad4a5981642b40c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 091/102] chore(internal): version bump
From 5af7869be75f6e577c57509c11e55a6dbbcdc4d8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 18:58:20 +0000
Subject: [PATCH 092/102] chore(internal): version bump
From 03a7636bce1974ef9be709cd6df395d687f0f22b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 25 Jul 2025 01:02:31 +0000
Subject: [PATCH 093/102] chore(ci): only run for pushes and fork pull requests
From e84459fc65a28e68ed185d6dba28b559e6882b99 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 31 Jul 2025 04:29:05 +0000
Subject: [PATCH 094/102] feat(client): support file upload requests
---
src/llama_stack_client/_base_client.py | 5 ++++-
src/llama_stack_client/_files.py | 8 ++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/llama_stack_client/_base_client.py b/src/llama_stack_client/_base_client.py
index 4224d36a..b5e326e9 100644
--- a/src/llama_stack_client/_base_client.py
+++ b/src/llama_stack_client/_base_client.py
@@ -532,7 +532,10 @@ def _build_request(
is_body_allowed = options.method.lower() != "get"
if is_body_allowed:
- kwargs["json"] = json_data if is_given(json_data) else None
+ if isinstance(json_data, bytes):
+ kwargs["content"] = json_data
+ else:
+ kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
diff --git a/src/llama_stack_client/_files.py b/src/llama_stack_client/_files.py
index 45f57c0a..035a1144 100644
--- a/src/llama_stack_client/_files.py
+++ b/src/llama_stack_client/_files.py
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], _read_file_content(file[1]), *file[2:])
+ return (file[0], read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-def _read_file_content(file: FileContent) -> HttpxFileContent:
+def read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return pathlib.Path(file).read_bytes()
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
return file
if is_tuple_t(file):
- return (file[0], await _async_read_file_content(file[1]), *file[2:])
+ return (file[0], await async_read_file_content(file[1]), *file[2:])
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
-async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
+async def async_read_file_content(file: FileContent) -> HttpxFileContent:
if isinstance(file, os.PathLike):
return await anyio.Path(file).read_bytes()
From a34c8230f8a3f6f356c4f990f66bb02eda229819 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 31 Jul 2025 19:38:33 +0000
Subject: [PATCH 095/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
pyproject.toml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index a680bc5c..0e117056 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: b0cd3ed9be70b0310bc685a4014eb0a5
+config_hash: b105ed4704c2998287916138c03d211a
diff --git a/pyproject.toml b/pyproject.toml
index 30a44752..c784560b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "llama_stack_client"
version = "0.2.17"
description = "The official Python library for the llama-stack-client API"
dynamic = ["readme"]
-license = "Apache-2.0"
+license = "MIT"
authors = [{ name = "Meta Llama", email = "llama-oss@meta.com" }]
dependencies = [
"httpx>=0.23.0, <1",
@@ -34,7 +34,7 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Libraries :: Python Modules",
- "License :: OSI Approved :: Apache Software License"
+ "License :: OSI Approved :: MIT License"
]
[dependency-groups]
From 54ff3c405af01ce068230990654b75d26967e745 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 1 Aug 2025 17:53:59 +0000
Subject: [PATCH 096/102] feat(api): update via SDK Studio
---
.stats.yml | 6 +-
api.md | 4 +-
src/llama_stack_client/resources/safety.py | 40 ++++++-------
src/llama_stack_client/types/__init__.py | 4 +-
.../types/chat/completion_create_params.py | 17 ++++++
.../types/chat/completion_create_response.py | 17 ++++++
.../types/chat/completion_list_response.py | 34 +++++++++++
.../chat/completion_retrieve_response.py | 34 +++++++++++
...rations_response.py => create_response.py} | 25 ++++----
...ions_params.py => safety_create_params.py} | 6 +-
tests/api_resources/test_safety.py | 59 ++++++++-----------
11 files changed, 170 insertions(+), 76 deletions(-)
rename src/llama_stack_client/types/{openai_moderations_response.py => create_response.py} (53%)
rename src/llama_stack_client/types/{safety_openai_moderations_params.py => safety_create_params.py} (79%)
diff --git a/.stats.yml b/.stats.yml
index 0e117056..8a2e9b6f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ab9c9bf2527d3b4179e2bc3e6495c64d43c42b2ea8dc1a55d472986e1a1430a0.yml
-openapi_spec_hash: b93c85fb747e3c29134451d2f364ce8b
-config_hash: b105ed4704c2998287916138c03d211a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-fe0ae8a478adcaa69c96b9ee501073818e499700ce2ec66dd7f6eaf4c3fcf69c.yml
+openapi_spec_hash: 418d4a00c4676bbb2973b64a93484965
+config_hash: e6c3e48e220b264936ee6df8b996ab12
diff --git a/api.md b/api.md
index f9618fae..01dd2924 100644
--- a/api.md
+++ b/api.md
@@ -458,12 +458,12 @@ Methods:
Types:
```python
-from llama_stack_client.types import OpenAIModerationsResponse, RunShieldResponse
+from llama_stack_client.types import CreateResponse, RunShieldResponse
```
Methods:
-- client.safety.openai_moderations(\*\*params) -> OpenAIModerationsResponse
+- client.safety.create(\*\*params) -> CreateResponse
- client.safety.run_shield(\*\*params) -> RunShieldResponse
# Shields
diff --git a/src/llama_stack_client/resources/safety.py b/src/llama_stack_client/resources/safety.py
index 64a5135c..114f2b76 100644
--- a/src/llama_stack_client/resources/safety.py
+++ b/src/llama_stack_client/resources/safety.py
@@ -6,7 +6,7 @@
import httpx
-from ..types import safety_run_shield_params, safety_openai_moderations_params
+from ..types import safety_create_params, safety_run_shield_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -18,9 +18,9 @@
async_to_streamed_response_wrapper,
)
from .._base_client import make_request_options
+from ..types.create_response import CreateResponse
from ..types.run_shield_response import RunShieldResponse
from ..types.shared_params.message import Message
-from ..types.openai_moderations_response import OpenAIModerationsResponse
__all__ = ["SafetyResource", "AsyncSafetyResource"]
@@ -45,18 +45,18 @@ def with_streaming_response(self) -> SafetyResourceWithStreamingResponse:
"""
return SafetyResourceWithStreamingResponse(self)
- def openai_moderations(
+ def create(
self,
*,
input: Union[str, List[str]],
- model: str | NotGiven = NOT_GIVEN,
+ model: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OpenAIModerationsResponse:
+ ) -> CreateResponse:
"""
Classifies if text and/or image inputs are potentially harmful.
@@ -81,12 +81,12 @@ def openai_moderations(
"input": input,
"model": model,
},
- safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ safety_create_params.SafetyCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=OpenAIModerationsResponse,
+ cast_to=CreateResponse,
)
def run_shield(
@@ -157,18 +157,18 @@ def with_streaming_response(self) -> AsyncSafetyResourceWithStreamingResponse:
"""
return AsyncSafetyResourceWithStreamingResponse(self)
- async def openai_moderations(
+ async def create(
self,
*,
input: Union[str, List[str]],
- model: str | NotGiven = NOT_GIVEN,
+ model: str,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OpenAIModerationsResponse:
+ ) -> CreateResponse:
"""
Classifies if text and/or image inputs are potentially harmful.
@@ -193,12 +193,12 @@ async def openai_moderations(
"input": input,
"model": model,
},
- safety_openai_moderations_params.SafetyOpenAIModerationsParams,
+ safety_create_params.SafetyCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=OpenAIModerationsResponse,
+ cast_to=CreateResponse,
)
async def run_shield(
@@ -253,8 +253,8 @@ class SafetyResourceWithRawResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.openai_moderations = to_raw_response_wrapper(
- safety.openai_moderations,
+ self.create = to_raw_response_wrapper(
+ safety.create,
)
self.run_shield = to_raw_response_wrapper(
safety.run_shield,
@@ -265,8 +265,8 @@ class AsyncSafetyResourceWithRawResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.openai_moderations = async_to_raw_response_wrapper(
- safety.openai_moderations,
+ self.create = async_to_raw_response_wrapper(
+ safety.create,
)
self.run_shield = async_to_raw_response_wrapper(
safety.run_shield,
@@ -277,8 +277,8 @@ class SafetyResourceWithStreamingResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.openai_moderations = to_streamed_response_wrapper(
- safety.openai_moderations,
+ self.create = to_streamed_response_wrapper(
+ safety.create,
)
self.run_shield = to_streamed_response_wrapper(
safety.run_shield,
@@ -289,8 +289,8 @@ class AsyncSafetyResourceWithStreamingResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.openai_moderations = async_to_streamed_response_wrapper(
- safety.openai_moderations,
+ self.create = async_to_streamed_response_wrapper(
+ safety.create,
)
self.run_shield = async_to_streamed_response_wrapper(
safety.run_shield,
diff --git a/src/llama_stack_client/types/__init__.py b/src/llama_stack_client/types/__init__.py
index f595ee76..1146a4e2 100644
--- a/src/llama_stack_client/types/__init__.py
+++ b/src/llama_stack_client/types/__init__.py
@@ -47,6 +47,7 @@
from .tool_response import ToolResponse as ToolResponse
from .inference_step import InferenceStep as InferenceStep
from .tool_def_param import ToolDefParam as ToolDefParam
+from .create_response import CreateResponse as CreateResponse
from .response_object import ResponseObject as ResponseObject
from .token_log_probs import TokenLogProbs as TokenLogProbs
from .file_list_params import FileListParams as FileListParams
@@ -77,6 +78,7 @@
from .list_routes_response import ListRoutesResponse as ListRoutesResponse
from .query_spans_response import QuerySpansResponse as QuerySpansResponse
from .response_list_params import ResponseListParams as ResponseListParams
+from .safety_create_params import SafetyCreateParams as SafetyCreateParams
from .scoring_score_params import ScoringScoreParams as ScoringScoreParams
from .shield_list_response import ShieldListResponse as ShieldListResponse
from .agent_create_response import AgentCreateResponse as AgentCreateResponse
@@ -133,7 +135,6 @@
from .inference_completion_params import InferenceCompletionParams as InferenceCompletionParams
from .inference_embeddings_params import InferenceEmbeddingsParams as InferenceEmbeddingsParams
from .list_vector_stores_response import ListVectorStoresResponse as ListVectorStoresResponse
-from .openai_moderations_response import OpenAIModerationsResponse as OpenAIModerationsResponse
from .telemetry_get_span_response import TelemetryGetSpanResponse as TelemetryGetSpanResponse
from .vector_db_register_response import VectorDBRegisterResponse as VectorDBRegisterResponse
from .vector_db_retrieve_response import VectorDBRetrieveResponse as VectorDBRetrieveResponse
@@ -152,7 +153,6 @@
from .tool_runtime_invoke_tool_params import ToolRuntimeInvokeToolParams as ToolRuntimeInvokeToolParams
from .inference_chat_completion_params import InferenceChatCompletionParams as InferenceChatCompletionParams
from .list_post_training_jobs_response import ListPostTrainingJobsResponse as ListPostTrainingJobsResponse
-from .safety_openai_moderations_params import SafetyOpenAIModerationsParams as SafetyOpenAIModerationsParams
from .scoring_function_register_params import ScoringFunctionRegisterParams as ScoringFunctionRegisterParams
from .telemetry_get_span_tree_response import TelemetryGetSpanTreeResponse as TelemetryGetSpanTreeResponse
from .tool_runtime_list_tools_response import ToolRuntimeListToolsResponse as ToolRuntimeListToolsResponse
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index 3d448dcf..a487783e 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -13,6 +13,8 @@
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"MessageOpenAISystemMessageParam",
"MessageOpenAISystemMessageParamContentUnionMember1",
"MessageOpenAIAssistantMessageParam",
@@ -127,9 +129,24 @@ class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionConten
type: Required[Literal["image_url"]]
+class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(TypedDict, total=False):
+ file_data: str
+
+ file_id: str
+
+ filename: str
+
+
+class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(TypedDict, total=False):
+ file: Required[MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile]
+
+ type: Required[Literal["file"]]
+
+
MessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Union[
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ MessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
]
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index 3315982c..d22cd188 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -17,6 +17,8 @@
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam",
"OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam",
@@ -59,10 +61,25 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1
type: Literal["image_url"]
+class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index e6a3d319..f9f6c335 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -16,6 +16,8 @@
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"DataChoiceMessageOpenAISystemMessageParam",
"DataChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"DataChoiceMessageOpenAIAssistantMessageParam",
@@ -37,6 +39,8 @@
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"DataInputMessageOpenAISystemMessageParam",
"DataInputMessageOpenAISystemMessageParamContentUnionMember1",
"DataInputMessageOpenAIAssistantMessageParam",
@@ -72,10 +76,25 @@ class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatComple
type: Literal["image_url"]
+class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
@@ -276,10 +295,25 @@ class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatComplet
type: Literal["image_url"]
+class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
DataInputMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index bdfd48c3..eb13bb97 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -15,6 +15,8 @@
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"ChoiceMessageOpenAISystemMessageParam",
"ChoiceMessageOpenAISystemMessageParamContentUnionMember1",
"ChoiceMessageOpenAIAssistantMessageParam",
@@ -36,6 +38,8 @@
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam",
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam",
"InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL",
+ "InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile",
+ "InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile",
"InputMessageOpenAISystemMessageParam",
"InputMessageOpenAISystemMessageParamContentUnionMember1",
"InputMessageOpenAIAssistantMessageParam",
@@ -69,10 +73,25 @@ class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletion
type: Literal["image_url"]
+class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
ChoiceMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
@@ -269,10 +288,25 @@ class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionC
type: Literal["image_url"]
+class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
+ file_data: Optional[str] = None
+
+ file_id: Optional[str] = None
+
+ filename: Optional[str] = None
+
+
+class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile(BaseModel):
+ file: InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile
+
+ type: Literal["file"]
+
+
InputMessageOpenAIUserMessageParamContentUnionMember1: TypeAlias = Annotated[
Union[
InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam,
InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam,
+ InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFile,
],
PropertyInfo(discriminator="type"),
]
diff --git a/src/llama_stack_client/types/openai_moderations_response.py b/src/llama_stack_client/types/create_response.py
similarity index 53%
rename from src/llama_stack_client/types/openai_moderations_response.py
rename to src/llama_stack_client/types/create_response.py
index 45eb0d12..fbb519f0 100644
--- a/src/llama_stack_client/types/openai_moderations_response.py
+++ b/src/llama_stack_client/types/create_response.py
@@ -1,28 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List
+from typing import Dict, List, Union, Optional
from .._models import BaseModel
-__all__ = ["OpenAIModerationsResponse", "Result"]
+__all__ = ["CreateResponse", "Result"]
class Result(BaseModel):
- categories: Dict[str, bool]
- """A list of the categories, and whether they are flagged or not."""
+ flagged: bool
+ """Whether any of the below categories are flagged."""
- category_applied_input_types: Dict[str, List[str]]
+ metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
- category_messages: Dict[str, str]
+ categories: Optional[Dict[str, bool]] = None
+ """A list of the categories, and whether they are flagged or not."""
- category_scores: Dict[str, float]
+ category_applied_input_types: Optional[Dict[str, List[str]]] = None
+ """
+ A list of the categories along with the input type(s) that the score applies to.
+ """
+
+ category_scores: Optional[Dict[str, float]] = None
"""A list of the categories along with their scores as predicted by model."""
- flagged: bool
- """Whether any of the below categories are flagged."""
+ user_message: Optional[str] = None
-class OpenAIModerationsResponse(BaseModel):
+class CreateResponse(BaseModel):
id: str
"""The unique identifier for the moderation request."""
diff --git a/src/llama_stack_client/types/safety_openai_moderations_params.py b/src/llama_stack_client/types/safety_create_params.py
similarity index 79%
rename from src/llama_stack_client/types/safety_openai_moderations_params.py
rename to src/llama_stack_client/types/safety_create_params.py
index 219c0c74..76d7e8c9 100644
--- a/src/llama_stack_client/types/safety_openai_moderations_params.py
+++ b/src/llama_stack_client/types/safety_create_params.py
@@ -5,10 +5,10 @@
from typing import List, Union
from typing_extensions import Required, TypedDict
-__all__ = ["SafetyOpenAIModerationsParams"]
+__all__ = ["SafetyCreateParams"]
-class SafetyOpenAIModerationsParams(TypedDict, total=False):
+class SafetyCreateParams(TypedDict, total=False):
input: Required[Union[str, List[str]]]
"""Input (or inputs) to classify.
@@ -16,5 +16,5 @@ class SafetyOpenAIModerationsParams(TypedDict, total=False):
objects similar to other models.
"""
- model: str
+ model: Required[str]
"""The content moderation model you would like to use."""
diff --git a/tests/api_resources/test_safety.py b/tests/api_resources/test_safety.py
index a2a691fe..94fe0110 100644
--- a/tests/api_resources/test_safety.py
+++ b/tests/api_resources/test_safety.py
@@ -9,10 +9,7 @@
from tests.utils import assert_matches_type
from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
-from llama_stack_client.types import (
- RunShieldResponse,
- OpenAIModerationsResponse,
-)
+from llama_stack_client.types import CreateResponse, RunShieldResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -21,41 +18,36 @@ class TestSafety:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@parametrize
- def test_method_openai_moderations(self, client: LlamaStackClient) -> None:
- safety = client.safety.openai_moderations(
- input="string",
- )
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
-
- @parametrize
- def test_method_openai_moderations_with_all_params(self, client: LlamaStackClient) -> None:
- safety = client.safety.openai_moderations(
+ def test_method_create(self, client: LlamaStackClient) -> None:
+ safety = client.safety.create(
input="string",
model="model",
)
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- def test_raw_response_openai_moderations(self, client: LlamaStackClient) -> None:
- response = client.safety.with_raw_response.openai_moderations(
+ def test_raw_response_create(self, client: LlamaStackClient) -> None:
+ response = client.safety.with_raw_response.create(
input="string",
+ model="model",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- def test_streaming_response_openai_moderations(self, client: LlamaStackClient) -> None:
- with client.safety.with_streaming_response.openai_moderations(
+ def test_streaming_response_create(self, client: LlamaStackClient) -> None:
+ with client.safety.with_streaming_response.create(
input="string",
+ model="model",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -118,41 +110,36 @@ class TestAsyncSafety:
)
@parametrize
- async def test_method_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- safety = await async_client.safety.openai_moderations(
- input="string",
- )
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
-
- @parametrize
- async def test_method_openai_moderations_with_all_params(self, async_client: AsyncLlamaStackClient) -> None:
- safety = await async_client.safety.openai_moderations(
+ async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
+ safety = await async_client.safety.create(
input="string",
model="model",
)
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- async def test_raw_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.safety.with_raw_response.openai_moderations(
+ async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ response = await async_client.safety.with_raw_response.create(
input="string",
+ model="model",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = await response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
@parametrize
- async def test_streaming_response_openai_moderations(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.safety.with_streaming_response.openai_moderations(
+ async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ async with async_client.safety.with_streaming_response.create(
input="string",
+ model="model",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
safety = await response.parse()
- assert_matches_type(OpenAIModerationsResponse, safety, path=["response"])
+ assert_matches_type(CreateResponse, safety, path=["response"])
assert cast(Any, response.is_closed) is True
From 6e26309d14cb0b0a0b5d43b7cbab56528b878fd9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 1 Aug 2025 18:00:19 +0000
Subject: [PATCH 097/102] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
src/llama_stack_client/resources/inspect.py | 4 +-
.../resources/responses/responses.py | 12 ++
src/llama_stack_client/resources/routes.py | 4 +-
.../resources/synthetic_data_generation.py | 18 ++-
.../resources/tool_runtime/rag_tool.py | 32 +++-
.../resources/vector_stores/files.py | 28 ++++
.../types/agent_create_response.py | 1 +
.../types/agent_retrieve_response.py | 4 +-
.../agent_turn_response_stream_chunk.py | 1 +
.../types/agents/session.py | 4 +
.../types/agents/session_create_response.py | 1 +
.../types/agents/step_retrieve_response.py | 2 +-
src/llama_stack_client/types/agents/turn.py | 11 +-
.../types/agents/turn_create_params.py | 2 +
.../types/agents/turn_response_event.py | 1 +
.../agents/turn_response_event_payload.py | 24 ++-
.../types/algorithm_config_param.py | 11 ++
src/llama_stack_client/types/benchmark.py | 4 +
.../types/chat/completion_create_params.py | 31 ++++
.../types/chat/completion_create_response.py | 23 +++
.../types/chat/completion_list_response.py | 51 ++++++
.../chat/completion_retrieve_response.py | 46 ++++++
.../types/chat_completion_chunk.py | 6 +
.../chat_completion_response_stream_chunk.py | 4 +
.../types/completion_response.py | 4 +
.../types/dataset_list_response.py | 6 +-
.../types/dataset_register_response.py | 6 +-
.../types/dataset_retrieve_response.py | 6 +-
src/llama_stack_client/types/event_param.py | 26 ++++
src/llama_stack_client/types/health_info.py | 1 +
...nference_batch_chat_completion_response.py | 1 +
src/llama_stack_client/types/job.py | 2 +
.../types/list_datasets_response.py | 1 +
.../types/list_files_response.py | 3 +
.../types/list_providers_response.py | 1 +
.../types/list_routes_response.py | 1 +
.../types/list_tool_groups_response.py | 1 +
.../types/list_tools_response.py | 1 +
.../types/list_vector_dbs_response.py | 1 +
.../types/list_vector_stores_response.py | 5 +
src/llama_stack_client/types/model.py | 6 +
.../post_training/job_artifacts_response.py | 12 ++
.../post_training/job_status_response.py | 17 ++
...ost_training_preference_optimize_params.py | 28 ++++
...st_training_supervised_fine_tune_params.py | 26 ++++
src/llama_stack_client/types/provider_info.py | 5 +
.../types/query_chunks_response.py | 2 +
.../types/query_condition_param.py | 3 +
.../types/query_spans_response.py | 1 +
.../types/response_create_params.py | 54 ++++++-
.../types/response_list_response.py | 94 ++++++++++-
.../types/response_object.py | 60 ++++++-
.../types/response_object_stream.py | 146 ++++++++++++++++--
.../responses/input_item_list_response.py | 30 ++++
src/llama_stack_client/types/route_info.py | 3 +
.../types/run_shield_response.py | 1 +
src/llama_stack_client/types/scoring_fn.py | 2 +
.../types/scoring_fn_params.py | 10 ++
.../types/scoring_fn_params_param.py | 10 ++
.../types/scoring_score_batch_response.py | 2 +
.../types/shared/batch_completion.py | 1 +
.../types/shared/chat_completion_response.py | 4 +
.../types/shared/content_delta.py | 7 +
.../types/shared/document.py | 2 +
.../types/shared/interleaved_content.py | 1 +
.../types/shared/interleaved_content_item.py | 1 +
.../types/shared/param_type.py | 10 ++
.../types/shared/query_config.py | 3 +-
.../types/shared/query_generator_config.py | 5 +
.../types/shared/query_result.py | 3 +-
.../types/shared/safety_violation.py | 6 +
.../types/shared/sampling_params.py | 6 +
.../types/shared_params/document.py | 2 +
.../shared_params/interleaved_content.py | 1 +
.../shared_params/interleaved_content_item.py | 1 +
.../types/shared_params/query_config.py | 3 +-
.../shared_params/query_generator_config.py | 5 +
.../types/shared_params/sampling_params.py | 6 +
src/llama_stack_client/types/shield.py | 2 +
.../types/span_with_status.py | 8 +
...nthetic_data_generation_generate_params.py | 8 +-
.../synthetic_data_generation_response.py | 5 +
.../types/telemetry_get_span_response.py | 7 +
.../types/telemetry_query_spans_response.py | 7 +
src/llama_stack_client/types/tool.py | 10 ++
src/llama_stack_client/types/tool_def.py | 9 ++
.../types/tool_def_param.py | 9 ++
src/llama_stack_client/types/tool_group.py | 4 +
.../types/tool_invocation_result.py | 5 +-
src/llama_stack_client/types/tool_response.py | 5 +-
.../types/tool_response_param.py | 5 +-
.../tool_runtime/rag_tool_insert_params.py | 3 +
.../tool_runtime/rag_tool_query_params.py | 5 +-
.../types/tool_runtime_list_tools_params.py | 1 +
.../types/toolgroup_register_params.py | 1 +
src/llama_stack_client/types/trace.py | 4 +
.../types/vector_db_list_response.py | 3 +
.../types/vector_db_register_response.py | 3 +
.../types/vector_db_retrieve_response.py | 3 +
src/llama_stack_client/types/vector_store.py | 16 ++
.../types/vector_store_delete_response.py | 3 +
.../types/vector_store_search_params.py | 2 +
.../types/vector_store_search_response.py | 12 ++
.../vector_stores/file_content_response.py | 6 +
.../types/vector_stores/file_create_params.py | 5 +
.../vector_stores/file_delete_response.py | 3 +
.../types/vector_stores/file_list_params.py | 19 +++
.../types/vector_stores/file_list_response.py | 5 +
.../types/vector_stores/vector_store_file.py | 16 ++
src/llama_stack_client/types/version_info.py | 1 +
111 files changed, 1114 insertions(+), 55 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 8a2e9b6f..611c42e2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-fe0ae8a478adcaa69c96b9ee501073818e499700ce2ec66dd7f6eaf4c3fcf69c.yml
-openapi_spec_hash: 418d4a00c4676bbb2973b64a93484965
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bb6596edeb9aa753145023f1950a340bc1701d5339b3fe7ea5d949fe6518f2c9.yml
+openapi_spec_hash: 2602f83d69df2cbde50321d06fa9ac9b
config_hash: e6c3e48e220b264936ee6df8b996ab12
diff --git a/src/llama_stack_client/resources/inspect.py b/src/llama_stack_client/resources/inspect.py
index eb028c16..bd67ae96 100644
--- a/src/llama_stack_client/resources/inspect.py
+++ b/src/llama_stack_client/resources/inspect.py
@@ -50,7 +50,7 @@ def health(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> HealthInfo:
- """Get the health of the service."""
+ """Get the current health status of the service."""
return self._get(
"/v1/health",
options=make_request_options(
@@ -109,7 +109,7 @@ async def health(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> HealthInfo:
- """Get the health of the service."""
+ """Get the current health status of the service."""
return await self._get(
"/v1/health",
options=make_request_options(
diff --git a/src/llama_stack_client/resources/responses/responses.py b/src/llama_stack_client/resources/responses/responses.py
index fa05f7ed..f958f556 100644
--- a/src/llama_stack_client/resources/responses/responses.py
+++ b/src/llama_stack_client/resources/responses/responses.py
@@ -92,6 +92,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -135,6 +137,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -178,6 +182,8 @@ def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -381,6 +387,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -424,6 +432,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -467,6 +477,8 @@ async def create(
response. This can be used to easily fork-off new responses from existing
responses.
+ text: Text response configuration for OpenAI responses.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/llama_stack_client/resources/routes.py b/src/llama_stack_client/resources/routes.py
index a95b5e06..7d544c0e 100644
--- a/src/llama_stack_client/resources/routes.py
+++ b/src/llama_stack_client/resources/routes.py
@@ -52,7 +52,7 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteListResponse:
- """List all routes."""
+ """List all available API routes with their methods and implementing providers."""
return self._get(
"/v1/inspect/routes",
options=make_request_options(
@@ -96,7 +96,7 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteListResponse:
- """List all routes."""
+ """List all available API routes with their methods and implementing providers."""
return await self._get(
"/v1/inspect/routes",
options=make_request_options(
diff --git a/src/llama_stack_client/resources/synthetic_data_generation.py b/src/llama_stack_client/resources/synthetic_data_generation.py
index 6e4e5a08..0843eafe 100644
--- a/src/llama_stack_client/resources/synthetic_data_generation.py
+++ b/src/llama_stack_client/resources/synthetic_data_generation.py
@@ -59,8 +59,15 @@ def generate(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyntheticDataGenerationResponse:
"""
+ Generate synthetic data based on input dialogs and apply filtering.
+
Args:
- filtering_function: The type of filtering function.
+ dialogs: List of conversation messages to use as input for synthetic data generation
+
+ filtering_function: Type of filtering to apply to generated synthetic data samples
+
+ model: (Optional) The identifier of the model to use. The model must be registered with
+ Llama Stack and available via the /models endpoint
extra_headers: Send extra headers
@@ -121,8 +128,15 @@ async def generate(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyntheticDataGenerationResponse:
"""
+ Generate synthetic data based on input dialogs and apply filtering.
+
Args:
- filtering_function: The type of filtering function.
+ dialogs: List of conversation messages to use as input for synthetic data generation
+
+ filtering_function: Type of filtering to apply to generated synthetic data samples
+
+ model: (Optional) The identifier of the model to use. The model must be registered with
+ Llama Stack and available via the /models endpoint
extra_headers: Send extra headers
diff --git a/src/llama_stack_client/resources/tool_runtime/rag_tool.py b/src/llama_stack_client/resources/tool_runtime/rag_tool.py
index 65ef0463..3ff25968 100644
--- a/src/llama_stack_client/resources/tool_runtime/rag_tool.py
+++ b/src/llama_stack_client/resources/tool_runtime/rag_tool.py
@@ -60,9 +60,15 @@ def insert(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
- Index documents so they can be used by the RAG system
+ Index documents so they can be used by the RAG system.
Args:
+ chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing
+
+ documents: List of documents to index in the RAG system
+
+ vector_db_id: ID of the vector database to store the document embeddings
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -102,12 +108,14 @@ def query(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> QueryResult:
"""
- Query the RAG system for context; typically invoked by the agent
+ Query the RAG system for context; typically invoked by the agent.
Args:
- content: A image content item
+ content: The query content to search for in the indexed documents
+
+ vector_db_ids: List of vector database IDs to search within
- query_config: Configuration for the RAG query generation.
+ query_config: (Optional) Configuration parameters for the query operation
extra_headers: Send extra headers
@@ -168,9 +176,15 @@ async def insert(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
- Index documents so they can be used by the RAG system
+ Index documents so they can be used by the RAG system.
Args:
+ chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing
+
+ documents: List of documents to index in the RAG system
+
+ vector_db_id: ID of the vector database to store the document embeddings
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -210,12 +224,14 @@ async def query(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> QueryResult:
"""
- Query the RAG system for context; typically invoked by the agent
+ Query the RAG system for context; typically invoked by the agent.
Args:
- content: A image content item
+ content: The query content to search for in the indexed documents
+
+ vector_db_ids: List of vector database IDs to search within
- query_config: Configuration for the RAG query generation.
+ query_config: (Optional) Configuration parameters for the query operation
extra_headers: Send extra headers
diff --git a/src/llama_stack_client/resources/vector_stores/files.py b/src/llama_stack_client/resources/vector_stores/files.py
index 4ea92a1e..34757751 100644
--- a/src/llama_stack_client/resources/vector_stores/files.py
+++ b/src/llama_stack_client/resources/vector_stores/files.py
@@ -193,6 +193,20 @@ def list(
List files in a vector store.
Args:
+ after: (Optional) A cursor for use in pagination. `after` is an object ID that defines
+ your place in the list.
+
+ before: (Optional) A cursor for use in pagination. `before` is an object ID that defines
+ your place in the list.
+
+ filter: (Optional) Filter by file status to only return files with the specified status.
+
+ limit: (Optional) A limit on the number of objects to be returned. Limit can range
+ between 1 and 100, and the default is 20.
+
+ order: (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for
+ ascending order and `desc` for descending order.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -463,6 +477,20 @@ async def list(
List files in a vector store.
Args:
+ after: (Optional) A cursor for use in pagination. `after` is an object ID that defines
+ your place in the list.
+
+ before: (Optional) A cursor for use in pagination. `before` is an object ID that defines
+ your place in the list.
+
+ filter: (Optional) Filter by file status to only return files with the specified status.
+
+ limit: (Optional) A limit on the number of objects to be returned. Limit can range
+ between 1 and 100, and the default is 20.
+
+ order: (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for
+ ascending order and `desc` for descending order.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/llama_stack_client/types/agent_create_response.py b/src/llama_stack_client/types/agent_create_response.py
index 93651cb6..24fe864e 100644
--- a/src/llama_stack_client/types/agent_create_response.py
+++ b/src/llama_stack_client/types/agent_create_response.py
@@ -7,3 +7,4 @@
class AgentCreateResponse(BaseModel):
agent_id: str
+ """Unique identifier for the created agent"""
diff --git a/src/llama_stack_client/types/agent_retrieve_response.py b/src/llama_stack_client/types/agent_retrieve_response.py
index 132821cb..1671a9fc 100644
--- a/src/llama_stack_client/types/agent_retrieve_response.py
+++ b/src/llama_stack_client/types/agent_retrieve_response.py
@@ -10,8 +10,10 @@
class AgentRetrieveResponse(BaseModel):
agent_config: AgentConfig
- """Configuration for an agent."""
+ """Configuration settings for the agent"""
agent_id: str
+ """Unique identifier for the agent"""
created_at: datetime
+ """Timestamp when the agent was created"""
diff --git a/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py b/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
index c488ba81..1ce1b8a7 100644
--- a/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
+++ b/src/llama_stack_client/types/agents/agent_turn_response_stream_chunk.py
@@ -8,3 +8,4 @@
class AgentTurnResponseStreamChunk(BaseModel):
event: TurnResponseEvent
+ """Individual event in the agent turn response stream"""
diff --git a/src/llama_stack_client/types/agents/session.py b/src/llama_stack_client/types/agents/session.py
index 707c4cbf..1d3d697e 100644
--- a/src/llama_stack_client/types/agents/session.py
+++ b/src/llama_stack_client/types/agents/session.py
@@ -11,9 +11,13 @@
class Session(BaseModel):
session_id: str
+ """Unique identifier for the conversation session"""
session_name: str
+ """Human-readable name for the session"""
started_at: datetime
+ """Timestamp when the session was created"""
turns: List[Turn]
+ """List of all turns that have occurred in this session"""
diff --git a/src/llama_stack_client/types/agents/session_create_response.py b/src/llama_stack_client/types/agents/session_create_response.py
index abf18665..e7fe2a06 100644
--- a/src/llama_stack_client/types/agents/session_create_response.py
+++ b/src/llama_stack_client/types/agents/session_create_response.py
@@ -7,3 +7,4 @@
class SessionCreateResponse(BaseModel):
session_id: str
+ """Unique identifier for the created session"""
diff --git a/src/llama_stack_client/types/agents/step_retrieve_response.py b/src/llama_stack_client/types/agents/step_retrieve_response.py
index fcf2044b..10fc13d2 100644
--- a/src/llama_stack_client/types/agents/step_retrieve_response.py
+++ b/src/llama_stack_client/types/agents/step_retrieve_response.py
@@ -20,4 +20,4 @@
class StepRetrieveResponse(BaseModel):
step: Step
- """An inference step in an agent turn."""
+ """The complete step data and execution details"""
diff --git a/src/llama_stack_client/types/agents/turn.py b/src/llama_stack_client/types/agents/turn.py
index aa8eeefe..386d7f78 100644
--- a/src/llama_stack_client/types/agents/turn.py
+++ b/src/llama_stack_client/types/agents/turn.py
@@ -38,6 +38,7 @@
class OutputAttachmentContentImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class OutputAttachmentContentImageContentItemImage(BaseModel):
@@ -69,6 +70,7 @@ class OutputAttachmentContentTextContentItem(BaseModel):
class OutputAttachmentContentURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
OutputAttachmentContent: TypeAlias = Union[
@@ -90,18 +92,25 @@ class OutputAttachment(BaseModel):
class Turn(BaseModel):
input_messages: List[InputMessage]
+ """List of messages that initiated this turn"""
output_message: CompletionMessage
- """A message containing the model's (assistant) response in a chat conversation."""
+ """The model's generated response containing content and metadata"""
session_id: str
+ """Unique identifier for the conversation session"""
started_at: datetime
+ """Timestamp when the turn began"""
steps: List[Step]
+ """Ordered list of processing steps executed during this turn"""
turn_id: str
+ """Unique identifier for the turn within a session"""
completed_at: Optional[datetime] = None
+ """(Optional) Timestamp when the turn finished, if completed"""
output_attachments: Optional[List[OutputAttachment]] = None
+ """(Optional) Files or media attached to the agent's response"""
diff --git a/src/llama_stack_client/types/agents/turn_create_params.py b/src/llama_stack_client/types/agents/turn_create_params.py
index 01e0f64b..fbb8de8e 100644
--- a/src/llama_stack_client/types/agents/turn_create_params.py
+++ b/src/llama_stack_client/types/agents/turn_create_params.py
@@ -54,6 +54,7 @@ class TurnCreateParamsBase(TypedDict, total=False):
class DocumentContentImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class DocumentContentImageContentItemImage(TypedDict, total=False):
@@ -85,6 +86,7 @@ class DocumentContentTextContentItem(TypedDict, total=False):
class DocumentContentURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
DocumentContent: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/agents/turn_response_event.py b/src/llama_stack_client/types/agents/turn_response_event.py
index c6a42d75..df213246 100644
--- a/src/llama_stack_client/types/agents/turn_response_event.py
+++ b/src/llama_stack_client/types/agents/turn_response_event.py
@@ -8,3 +8,4 @@
class TurnResponseEvent(BaseModel):
payload: TurnResponseEventPayload
+ """Event-specific payload containing event data"""
diff --git a/src/llama_stack_client/types/agents/turn_response_event_payload.py b/src/llama_stack_client/types/agents/turn_response_event_payload.py
index 345a7ec4..1844c61e 100644
--- a/src/llama_stack_client/types/agents/turn_response_event_payload.py
+++ b/src/llama_stack_client/types/agents/turn_response_event_payload.py
@@ -26,24 +26,30 @@
class AgentTurnResponseStepStartPayload(BaseModel):
event_type: Literal["step_start"]
+ """Type of event being reported"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata for the step"""
class AgentTurnResponseStepProgressPayload(BaseModel):
delta: ContentDelta
+ """Incremental content changes during step execution"""
event_type: Literal["step_progress"]
+ """Type of event being reported"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
AgentTurnResponseStepCompletePayloadStepDetails: TypeAlias = Annotated[
@@ -54,34 +60,40 @@ class AgentTurnResponseStepProgressPayload(BaseModel):
class AgentTurnResponseStepCompletePayload(BaseModel):
event_type: Literal["step_complete"]
+ """Type of event being reported"""
step_details: AgentTurnResponseStepCompletePayloadStepDetails
- """An inference step in an agent turn."""
+ """Complete details of the executed step"""
step_id: str
+ """Unique identifier for the step within a turn"""
step_type: Literal["inference", "tool_execution", "shield_call", "memory_retrieval"]
- """Type of the step in an agent turn."""
+ """Type of step being executed"""
class AgentTurnResponseTurnStartPayload(BaseModel):
event_type: Literal["turn_start"]
+ """Type of event being reported"""
turn_id: str
+ """Unique identifier for the turn within a session"""
class AgentTurnResponseTurnCompletePayload(BaseModel):
event_type: Literal["turn_complete"]
+ """Type of event being reported"""
turn: Turn
- """A single turn in an interaction with an Agentic System."""
+ """Complete turn data including all steps and results"""
class AgentTurnResponseTurnAwaitingInputPayload(BaseModel):
event_type: Literal["turn_awaiting_input"]
+ """Type of event being reported"""
turn: Turn
- """A single turn in an interaction with an Agentic System."""
+ """Turn data when waiting for external tool responses"""
TurnResponseEventPayload: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/algorithm_config_param.py b/src/llama_stack_client/types/algorithm_config_param.py
index 3f3c0cac..f2856526 100644
--- a/src/llama_stack_client/types/algorithm_config_param.py
+++ b/src/llama_stack_client/types/algorithm_config_param.py
@@ -10,28 +10,39 @@
class LoraFinetuningConfig(TypedDict, total=False):
alpha: Required[int]
+ """LoRA scaling parameter that controls adaptation strength"""
apply_lora_to_mlp: Required[bool]
+ """Whether to apply LoRA to MLP layers"""
apply_lora_to_output: Required[bool]
+ """Whether to apply LoRA to output projection layers"""
lora_attn_modules: Required[List[str]]
+ """List of attention module names to apply LoRA to"""
rank: Required[int]
+ """Rank of the LoRA adaptation (lower rank = fewer parameters)"""
type: Required[Literal["LoRA"]]
+ """Algorithm type identifier, always "LoRA" """
quantize_base: bool
+ """(Optional) Whether to quantize the base model weights"""
use_dora: bool
+ """(Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)"""
class QatFinetuningConfig(TypedDict, total=False):
group_size: Required[int]
+ """Size of groups for grouped quantization"""
quantizer_name: Required[str]
+ """Name of the quantization algorithm to use"""
type: Required[Literal["QAT"]]
+ """Algorithm type identifier, always "QAT" """
AlgorithmConfigParam: TypeAlias = Union[LoraFinetuningConfig, QatFinetuningConfig]
diff --git a/src/llama_stack_client/types/benchmark.py b/src/llama_stack_client/types/benchmark.py
index e0b1ce9e..eb6dde75 100644
--- a/src/llama_stack_client/types/benchmark.py
+++ b/src/llama_stack_client/types/benchmark.py
@@ -10,15 +10,19 @@
class Benchmark(BaseModel):
dataset_id: str
+ """Identifier of the dataset to use for the benchmark evaluation"""
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Metadata for this evaluation task"""
provider_id: str
scoring_functions: List[str]
+ """List of scoring function identifiers to apply during evaluation"""
type: Literal["benchmark"]
+ """The resource type, always benchmark"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/chat/completion_create_params.py b/src/llama_stack_client/types/chat/completion_create_params.py
index a487783e..263c1c78 100644
--- a/src/llama_stack_client/types/chat/completion_create_params.py
+++ b/src/llama_stack_client/types/chat/completion_create_params.py
@@ -109,24 +109,33 @@ class CompletionCreateParamsBase(TypedDict, total=False):
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
TypedDict, total=False
):
url: Required[str]
+ """URL of the image to include in the message"""
detail: str
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(TypedDict, total=False):
image_url: Required[
MessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
]
+ """Image URL specification and processing details"""
type: Required[Literal["image_url"]]
+ """Must be "image_url" to identify this as image content"""
class MessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(TypedDict, total=False):
@@ -163,8 +172,10 @@ class MessageOpenAIUserMessageParam(TypedDict, total=False):
class MessageOpenAISystemMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAISystemMessageParam(TypedDict, total=False):
@@ -185,24 +196,32 @@ class MessageOpenAISystemMessageParam(TypedDict, total=False):
class MessageOpenAIAssistantMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIAssistantMessageParamToolCallFunction(TypedDict, total=False):
arguments: str
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: str
+ """(Optional) Name of the function to call"""
class MessageOpenAIAssistantMessageParamToolCall(TypedDict, total=False):
type: Required[Literal["function"]]
+ """Must be "function" to identify this as a function call"""
id: str
+ """(Optional) Unique identifier for the tool call"""
function: MessageOpenAIAssistantMessageParamToolCallFunction
+ """(Optional) Function call details"""
index: int
+ """(Optional) Index of the tool call in the list"""
class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
@@ -221,8 +240,10 @@ class MessageOpenAIAssistantMessageParam(TypedDict, total=False):
class MessageOpenAIToolMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIToolMessageParam(TypedDict, total=False):
@@ -238,8 +259,10 @@ class MessageOpenAIToolMessageParam(TypedDict, total=False):
class MessageOpenAIDeveloperMessageParamContentUnionMember1(TypedDict, total=False):
text: Required[str]
+ """The text content of the message"""
type: Required[Literal["text"]]
+ """Must be "text" to identify this as text content"""
class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
@@ -264,26 +287,34 @@ class MessageOpenAIDeveloperMessageParam(TypedDict, total=False):
class ResponseFormatOpenAIResponseFormatText(TypedDict, total=False):
type: Required[Literal["text"]]
+ """Must be "text" to indicate plain text response format"""
class ResponseFormatOpenAIResponseFormatJsonSchemaJsonSchema(TypedDict, total=False):
name: Required[str]
+ """Name of the schema"""
description: str
+ """(Optional) Description of the schema"""
schema: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) The JSON schema definition"""
strict: bool
+ """(Optional) Whether to enforce strict adherence to the schema"""
class ResponseFormatOpenAIResponseFormatJsonSchema(TypedDict, total=False):
json_schema: Required[ResponseFormatOpenAIResponseFormatJsonSchemaJsonSchema]
+ """The JSON schema specification for the response"""
type: Required[Literal["json_schema"]]
+ """Must be "json_schema" to indicate structured JSON response format"""
class ResponseFormatOpenAIResponseFormatJsonObject(TypedDict, total=False):
type: Required[Literal["json_object"]]
+ """Must be "json_object" to indicate generic JSON object response format"""
ResponseFormat: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/chat/completion_create_response.py b/src/llama_stack_client/types/chat/completion_create_response.py
index d22cd188..7c6b2299 100644
--- a/src/llama_stack_client/types/chat/completion_create_response.py
+++ b/src/llama_stack_client/types/chat/completion_create_response.py
@@ -41,24 +41,33 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1
BaseModel
):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(
BaseModel
):
image_url: OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -98,8 +107,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIUserMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -120,24 +131,32 @@ class OpenAIChatCompletionChoiceMessageOpenAISystemMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -158,8 +177,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -175,8 +196,10 @@ class OpenAIChatCompletionChoiceMessageOpenAIToolMessageParam(BaseModel):
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class OpenAIChatCompletionChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
diff --git a/src/llama_stack_client/types/chat/completion_list_response.py b/src/llama_stack_client/types/chat/completion_list_response.py
index f9f6c335..5f7731cc 100644
--- a/src/llama_stack_client/types/chat/completion_list_response.py
+++ b/src/llama_stack_client/types/chat/completion_list_response.py
@@ -56,24 +56,33 @@
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: (
DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
)
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class DataChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -113,8 +122,10 @@ class DataChoiceMessageOpenAIUserMessageParam(BaseModel):
class DataChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -135,24 +146,32 @@ class DataChoiceMessageOpenAISystemMessageParam(BaseModel):
class DataChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class DataChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[DataChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -171,8 +190,10 @@ class DataChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class DataChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -188,8 +209,10 @@ class DataChoiceMessageOpenAIToolMessageParam(BaseModel):
class DataChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -275,24 +298,33 @@ class DataChoice(BaseModel):
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: (
DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
)
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class DataInputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -332,8 +364,10 @@ class DataInputMessageOpenAIUserMessageParam(BaseModel):
class DataInputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAISystemMessageParam(BaseModel):
@@ -354,24 +388,32 @@ class DataInputMessageOpenAISystemMessageParam(BaseModel):
class DataInputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class DataInputMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[DataInputMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
@@ -390,8 +432,10 @@ class DataInputMessageOpenAIAssistantMessageParam(BaseModel):
class DataInputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIToolMessageParam(BaseModel):
@@ -407,8 +451,10 @@ class DataInputMessageOpenAIToolMessageParam(BaseModel):
class DataInputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class DataInputMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -455,11 +501,16 @@ class Data(BaseModel):
class CompletionListResponse(BaseModel):
data: List[Data]
+ """List of chat completion objects with their input messages"""
first_id: str
+ """ID of the first completion in this list"""
has_more: bool
+ """Whether there are more completions available beyond this list"""
last_id: str
+ """ID of the last completion in this list"""
object: Literal["list"]
+ """Must be "list" to identify this as a list response"""
diff --git a/src/llama_stack_client/types/chat/completion_retrieve_response.py b/src/llama_stack_client/types/chat/completion_retrieve_response.py
index eb13bb97..74b60c35 100644
--- a/src/llama_stack_client/types/chat/completion_retrieve_response.py
+++ b/src/llama_stack_client/types/chat/completion_retrieve_response.py
@@ -55,22 +55,31 @@
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(
BaseModel
):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class ChoiceMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -110,8 +119,10 @@ class ChoiceMessageOpenAIUserMessageParam(BaseModel):
class ChoiceMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAISystemMessageParam(BaseModel):
@@ -132,24 +143,32 @@ class ChoiceMessageOpenAISystemMessageParam(BaseModel):
class ChoiceMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class ChoiceMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[ChoiceMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
@@ -168,8 +187,10 @@ class ChoiceMessageOpenAIAssistantMessageParam(BaseModel):
class ChoiceMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIToolMessageParam(BaseModel):
@@ -185,8 +206,10 @@ class ChoiceMessageOpenAIToolMessageParam(BaseModel):
class ChoiceMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class ChoiceMessageOpenAIDeveloperMessageParam(BaseModel):
@@ -272,20 +295,29 @@ class Choice(BaseModel):
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartTextParam(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL(BaseModel):
url: str
+ """URL of the image to include in the message"""
detail: Optional[str] = None
+ """(Optional) Level of detail for image processing.
+
+ Can be "low", "high", or "auto"
+ """
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParam(BaseModel):
image_url: InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIChatCompletionContentPartImageParamImageURL
+ """Image URL specification and processing details"""
type: Literal["image_url"]
+ """Must be "image_url" to identify this as image content"""
class InputMessageOpenAIUserMessageParamContentUnionMember1OpenAIFileFile(BaseModel):
@@ -325,8 +357,10 @@ class InputMessageOpenAIUserMessageParam(BaseModel):
class InputMessageOpenAISystemMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAISystemMessageParam(BaseModel):
@@ -347,24 +381,32 @@ class InputMessageOpenAISystemMessageParam(BaseModel):
class InputMessageOpenAIAssistantMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIAssistantMessageParamToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class InputMessageOpenAIAssistantMessageParamToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[InputMessageOpenAIAssistantMessageParamToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class InputMessageOpenAIAssistantMessageParam(BaseModel):
@@ -383,8 +425,10 @@ class InputMessageOpenAIAssistantMessageParam(BaseModel):
class InputMessageOpenAIToolMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIToolMessageParam(BaseModel):
@@ -400,8 +444,10 @@ class InputMessageOpenAIToolMessageParam(BaseModel):
class InputMessageOpenAIDeveloperMessageParamContentUnionMember1(BaseModel):
text: str
+ """The text content of the message"""
type: Literal["text"]
+ """Must be "text" to identify this as text content"""
class InputMessageOpenAIDeveloperMessageParam(BaseModel):
diff --git a/src/llama_stack_client/types/chat_completion_chunk.py b/src/llama_stack_client/types/chat_completion_chunk.py
index 7d74663a..788a34ed 100644
--- a/src/llama_stack_client/types/chat_completion_chunk.py
+++ b/src/llama_stack_client/types/chat_completion_chunk.py
@@ -21,18 +21,24 @@
class ChoiceDeltaToolCallFunction(BaseModel):
arguments: Optional[str] = None
+ """(Optional) Arguments to pass to the function as a JSON string"""
name: Optional[str] = None
+ """(Optional) Name of the function to call"""
class ChoiceDeltaToolCall(BaseModel):
type: Literal["function"]
+ """Must be "function" to identify this as a function call"""
id: Optional[str] = None
+ """(Optional) Unique identifier for the tool call"""
function: Optional[ChoiceDeltaToolCallFunction] = None
+ """(Optional) Function call details"""
index: Optional[int] = None
+ """(Optional) Index of the tool call in the list"""
class ChoiceDelta(BaseModel):
diff --git a/src/llama_stack_client/types/chat_completion_response_stream_chunk.py b/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
index 3c236fd4..2b94eb18 100644
--- a/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
+++ b/src/llama_stack_client/types/chat_completion_response_stream_chunk.py
@@ -29,10 +29,13 @@ class Event(BaseModel):
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class ChatCompletionResponseStreamChunk(BaseModel):
@@ -40,3 +43,4 @@ class ChatCompletionResponseStreamChunk(BaseModel):
"""The event containing the new content"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/completion_response.py b/src/llama_stack_client/types/completion_response.py
index 78254b28..51772801 100644
--- a/src/llama_stack_client/types/completion_response.py
+++ b/src/llama_stack_client/types/completion_response.py
@@ -11,10 +11,13 @@
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class CompletionResponse(BaseModel):
@@ -28,3 +31,4 @@ class CompletionResponse(BaseModel):
"""Optional log probabilities for generated tokens"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/dataset_list_response.py b/src/llama_stack_client/types/dataset_list_response.py
index 42b27ab4..7080e589 100644
--- a/src/llama_stack_client/types/dataset_list_response.py
+++ b/src/llama_stack_client/types/dataset_list_response.py
@@ -47,16 +47,18 @@ class DatasetListResponseItem(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: DatasetListResponseItemSource
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/dataset_register_response.py b/src/llama_stack_client/types/dataset_register_response.py
index a79367bb..8da590b8 100644
--- a/src/llama_stack_client/types/dataset_register_response.py
+++ b/src/llama_stack_client/types/dataset_register_response.py
@@ -38,15 +38,17 @@ class DatasetRegisterResponse(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: Source
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/dataset_retrieve_response.py b/src/llama_stack_client/types/dataset_retrieve_response.py
index ab96c387..6cda0a42 100644
--- a/src/llama_stack_client/types/dataset_retrieve_response.py
+++ b/src/llama_stack_client/types/dataset_retrieve_response.py
@@ -38,15 +38,17 @@ class DatasetRetrieveResponse(BaseModel):
identifier: str
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata for the dataset"""
provider_id: str
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"]
- """Purpose of the dataset. Each purpose has a required input data schema."""
+ """Purpose of the dataset indicating its intended use"""
source: Source
- """A dataset that can be obtained from a URI."""
+ """Data source configuration for the dataset"""
type: Literal["dataset"]
+ """Type of resource, always 'dataset' for datasets"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/event_param.py b/src/llama_stack_client/types/event_param.py
index 500e4a24..b26f2916 100644
--- a/src/llama_stack_client/types/event_param.py
+++ b/src/llama_stack_client/types/event_param.py
@@ -21,50 +21,70 @@
class UnstructuredLogEvent(TypedDict, total=False):
message: Required[str]
+ """The log message text"""
severity: Required[Literal["verbose", "debug", "info", "warn", "error", "critical"]]
+ """The severity level of the log message"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["unstructured_log"]]
+ """Event type identifier set to UNSTRUCTURED_LOG"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
class MetricEvent(TypedDict, total=False):
metric: Required[str]
+ """The name of the metric being measured"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["metric"]]
+ """Event type identifier set to METRIC"""
unit: Required[str]
+ """The unit of measurement for the metric value"""
value: Required[float]
+ """The numeric value of the metric measurement"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
class StructuredLogEventPayloadSpanStartPayload(TypedDict, total=False):
name: Required[str]
+ """Human-readable name describing the operation this span represents"""
type: Required[Literal["span_start"]]
+ """Payload type identifier set to SPAN_START"""
parent_span_id: str
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
class StructuredLogEventPayloadSpanEndPayload(TypedDict, total=False):
status: Required[Literal["ok", "error"]]
+ """The final status of the span indicating success or failure"""
type: Required[Literal["span_end"]]
+ """Payload type identifier set to SPAN_END"""
StructuredLogEventPayload: TypeAlias = Union[
@@ -74,16 +94,22 @@ class StructuredLogEventPayloadSpanEndPayload(TypedDict, total=False):
class StructuredLogEvent(TypedDict, total=False):
payload: Required[StructuredLogEventPayload]
+ """The structured payload data for the log event"""
span_id: Required[str]
+ """Unique identifier for the span this event belongs to"""
timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Timestamp when the event occurred"""
trace_id: Required[str]
+ """Unique identifier for the trace this event belongs to"""
type: Required[Literal["structured_log"]]
+ """Event type identifier set to STRUCTURED_LOG"""
attributes: Dict[str, Union[str, float, bool, None]]
+ """(Optional) Key-value pairs containing additional metadata about the event"""
EventParam: TypeAlias = Union[UnstructuredLogEvent, MetricEvent, StructuredLogEvent]
diff --git a/src/llama_stack_client/types/health_info.py b/src/llama_stack_client/types/health_info.py
index 3441ddd1..86410ed0 100644
--- a/src/llama_stack_client/types/health_info.py
+++ b/src/llama_stack_client/types/health_info.py
@@ -9,3 +9,4 @@
class HealthInfo(BaseModel):
status: Literal["OK", "Error", "Not Implemented"]
+ """Current health status of the service"""
diff --git a/src/llama_stack_client/types/inference_batch_chat_completion_response.py b/src/llama_stack_client/types/inference_batch_chat_completion_response.py
index 84d6c425..ed24908d 100644
--- a/src/llama_stack_client/types/inference_batch_chat_completion_response.py
+++ b/src/llama_stack_client/types/inference_batch_chat_completion_response.py
@@ -10,3 +10,4 @@
class InferenceBatchChatCompletionResponse(BaseModel):
batch: List[ChatCompletionResponse]
+ """List of chat completion responses, one for each conversation in the batch"""
diff --git a/src/llama_stack_client/types/job.py b/src/llama_stack_client/types/job.py
index 4953b3bf..9635de38 100644
--- a/src/llama_stack_client/types/job.py
+++ b/src/llama_stack_client/types/job.py
@@ -9,5 +9,7 @@
class Job(BaseModel):
job_id: str
+ """Unique identifier for the job"""
status: Literal["completed", "in_progress", "failed", "scheduled", "cancelled"]
+ """Current execution status of the job"""
diff --git a/src/llama_stack_client/types/list_datasets_response.py b/src/llama_stack_client/types/list_datasets_response.py
index 5a897f78..21c4b72a 100644
--- a/src/llama_stack_client/types/list_datasets_response.py
+++ b/src/llama_stack_client/types/list_datasets_response.py
@@ -8,3 +8,4 @@
class ListDatasetsResponse(BaseModel):
data: DatasetListResponse
+ """List of datasets"""
diff --git a/src/llama_stack_client/types/list_files_response.py b/src/llama_stack_client/types/list_files_response.py
index cbb7d514..fb42f298 100644
--- a/src/llama_stack_client/types/list_files_response.py
+++ b/src/llama_stack_client/types/list_files_response.py
@@ -14,10 +14,13 @@ class ListFilesResponse(BaseModel):
"""List of file objects"""
first_id: str
+ """ID of the first file in the list for pagination"""
has_more: bool
+ """Whether there are more files available beyond this page"""
last_id: str
+ """ID of the last file in the list for pagination"""
object: Literal["list"]
"""The object type, which is always "list" """
diff --git a/src/llama_stack_client/types/list_providers_response.py b/src/llama_stack_client/types/list_providers_response.py
index 4904c0b1..c75b6880 100644
--- a/src/llama_stack_client/types/list_providers_response.py
+++ b/src/llama_stack_client/types/list_providers_response.py
@@ -8,3 +8,4 @@
class ListProvidersResponse(BaseModel):
data: ProviderListResponse
+ """List of provider information objects"""
diff --git a/src/llama_stack_client/types/list_routes_response.py b/src/llama_stack_client/types/list_routes_response.py
index 59e8392b..d038fe6d 100644
--- a/src/llama_stack_client/types/list_routes_response.py
+++ b/src/llama_stack_client/types/list_routes_response.py
@@ -8,3 +8,4 @@
class ListRoutesResponse(BaseModel):
data: RouteListResponse
+ """List of available route information objects"""
diff --git a/src/llama_stack_client/types/list_tool_groups_response.py b/src/llama_stack_client/types/list_tool_groups_response.py
index 6433b164..94c5c145 100644
--- a/src/llama_stack_client/types/list_tool_groups_response.py
+++ b/src/llama_stack_client/types/list_tool_groups_response.py
@@ -8,3 +8,4 @@
class ListToolGroupsResponse(BaseModel):
data: ToolgroupListResponse
+ """List of tool groups"""
diff --git a/src/llama_stack_client/types/list_tools_response.py b/src/llama_stack_client/types/list_tools_response.py
index c9b4ec6b..47f040b5 100644
--- a/src/llama_stack_client/types/list_tools_response.py
+++ b/src/llama_stack_client/types/list_tools_response.py
@@ -8,3 +8,4 @@
class ListToolsResponse(BaseModel):
data: ToolListResponse
+ """List of tools"""
diff --git a/src/llama_stack_client/types/list_vector_dbs_response.py b/src/llama_stack_client/types/list_vector_dbs_response.py
index fede6c42..5ff7d5e5 100644
--- a/src/llama_stack_client/types/list_vector_dbs_response.py
+++ b/src/llama_stack_client/types/list_vector_dbs_response.py
@@ -8,3 +8,4 @@
class ListVectorDBsResponse(BaseModel):
data: VectorDBListResponse
+ """List of vector databases"""
diff --git a/src/llama_stack_client/types/list_vector_stores_response.py b/src/llama_stack_client/types/list_vector_stores_response.py
index c79fd895..d4960217 100644
--- a/src/llama_stack_client/types/list_vector_stores_response.py
+++ b/src/llama_stack_client/types/list_vector_stores_response.py
@@ -10,11 +10,16 @@
class ListVectorStoresResponse(BaseModel):
data: List[VectorStore]
+ """List of vector store objects"""
has_more: bool
+ """Whether there are more vector stores available beyond this page"""
object: str
+ """Object type identifier, always "list" """
first_id: Optional[str] = None
+ """(Optional) ID of the first vector store in the list for pagination"""
last_id: Optional[str] = None
+ """(Optional) ID of the last vector store in the list for pagination"""
diff --git a/src/llama_stack_client/types/model.py b/src/llama_stack_client/types/model.py
index dea24d53..5651667d 100644
--- a/src/llama_stack_client/types/model.py
+++ b/src/llama_stack_client/types/model.py
@@ -12,13 +12,19 @@
class Model(BaseModel):
identifier: str
+ """Unique identifier for this resource in llama stack"""
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Any additional metadata for this model"""
api_model_type: Literal["llm", "embedding"] = FieldInfo(alias="model_type")
+ """The type of model (LLM or embedding model)"""
provider_id: str
+ """ID of the provider that owns this resource"""
type: Literal["model"]
+ """The resource type, always 'model' for model resources"""
provider_resource_id: Optional[str] = None
+ """Unique identifier for this resource in the provider"""
diff --git a/src/llama_stack_client/types/post_training/job_artifacts_response.py b/src/llama_stack_client/types/post_training/job_artifacts_response.py
index a5646e34..42784aee 100644
--- a/src/llama_stack_client/types/post_training/job_artifacts_response.py
+++ b/src/llama_stack_client/types/post_training/job_artifacts_response.py
@@ -10,29 +10,41 @@
class CheckpointTrainingMetrics(BaseModel):
epoch: int
+ """Training epoch number"""
perplexity: float
+ """Perplexity metric indicating model confidence"""
train_loss: float
+ """Loss value on the training dataset"""
validation_loss: float
+ """Loss value on the validation dataset"""
class Checkpoint(BaseModel):
created_at: datetime
+ """Timestamp when the checkpoint was created"""
epoch: int
+ """Training epoch when the checkpoint was saved"""
identifier: str
+ """Unique identifier for the checkpoint"""
path: str
+ """File system path where the checkpoint is stored"""
post_training_job_id: str
+ """Identifier of the training job that created this checkpoint"""
training_metrics: Optional[CheckpointTrainingMetrics] = None
+ """(Optional) Training metrics associated with this checkpoint"""
class JobArtifactsResponse(BaseModel):
checkpoints: List[Checkpoint]
+ """List of model checkpoints created during training"""
job_uuid: str
+ """Unique identifier for the training job"""
diff --git a/src/llama_stack_client/types/post_training/job_status_response.py b/src/llama_stack_client/types/post_training/job_status_response.py
index e830b10d..94379579 100644
--- a/src/llama_stack_client/types/post_training/job_status_response.py
+++ b/src/llama_stack_client/types/post_training/job_status_response.py
@@ -11,39 +11,56 @@
class CheckpointTrainingMetrics(BaseModel):
epoch: int
+ """Training epoch number"""
perplexity: float
+ """Perplexity metric indicating model confidence"""
train_loss: float
+ """Loss value on the training dataset"""
validation_loss: float
+ """Loss value on the validation dataset"""
class Checkpoint(BaseModel):
created_at: datetime
+ """Timestamp when the checkpoint was created"""
epoch: int
+ """Training epoch when the checkpoint was saved"""
identifier: str
+ """Unique identifier for the checkpoint"""
path: str
+ """File system path where the checkpoint is stored"""
post_training_job_id: str
+ """Identifier of the training job that created this checkpoint"""
training_metrics: Optional[CheckpointTrainingMetrics] = None
+ """(Optional) Training metrics associated with this checkpoint"""
class JobStatusResponse(BaseModel):
checkpoints: List[Checkpoint]
+ """List of model checkpoints created during training"""
job_uuid: str
+ """Unique identifier for the training job"""
status: Literal["completed", "in_progress", "failed", "scheduled", "cancelled"]
+ """Current status of the training job"""
completed_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job finished, if completed"""
resources_allocated: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Information about computational resources allocated to the job"""
scheduled_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job was scheduled"""
started_at: Optional[datetime] = None
+ """(Optional) Timestamp when the job execution began"""
diff --git a/src/llama_stack_client/types/post_training_preference_optimize_params.py b/src/llama_stack_client/types/post_training_preference_optimize_params.py
index 9d9f8c8c..2dcd294d 100644
--- a/src/llama_stack_client/types/post_training_preference_optimize_params.py
+++ b/src/llama_stack_client/types/post_training_preference_optimize_params.py
@@ -37,59 +37,87 @@ class PostTrainingPreferenceOptimizeParams(TypedDict, total=False):
class AlgorithmConfig(TypedDict, total=False):
beta: Required[float]
+ """Temperature parameter for the DPO loss"""
loss_type: Required[Literal["sigmoid", "hinge", "ipo", "kto_pair"]]
+ """The type of loss function to use for DPO"""
class TrainingConfigDataConfig(TypedDict, total=False):
batch_size: Required[int]
+ """Number of samples per training batch"""
data_format: Required[Literal["instruct", "dialog"]]
+ """Format of the dataset (instruct or dialog)"""
dataset_id: Required[str]
+ """Unique identifier for the training dataset"""
shuffle: Required[bool]
+ """Whether to shuffle the dataset during training"""
packed: bool
+ """
+ (Optional) Whether to pack multiple samples into a single sequence for
+ efficiency
+ """
train_on_input: bool
+ """(Optional) Whether to compute loss on input tokens as well as output tokens"""
validation_dataset_id: str
+ """(Optional) Unique identifier for the validation dataset"""
class TrainingConfigEfficiencyConfig(TypedDict, total=False):
enable_activation_checkpointing: bool
+ """(Optional) Whether to use activation checkpointing to reduce memory usage"""
enable_activation_offloading: bool
+ """(Optional) Whether to offload activations to CPU to save GPU memory"""
fsdp_cpu_offload: bool
+ """(Optional) Whether to offload FSDP parameters to CPU"""
memory_efficient_fsdp_wrap: bool
+ """(Optional) Whether to use memory-efficient FSDP wrapping"""
class TrainingConfigOptimizerConfig(TypedDict, total=False):
lr: Required[float]
+ """Learning rate for the optimizer"""
num_warmup_steps: Required[int]
+ """Number of steps for learning rate warmup"""
optimizer_type: Required[Literal["adam", "adamw", "sgd"]]
+ """Type of optimizer to use (adam, adamw, or sgd)"""
weight_decay: Required[float]
+ """Weight decay coefficient for regularization"""
class TrainingConfig(TypedDict, total=False):
gradient_accumulation_steps: Required[int]
+ """Number of steps to accumulate gradients before updating"""
max_steps_per_epoch: Required[int]
+ """Maximum number of steps to run per epoch"""
n_epochs: Required[int]
+ """Number of training epochs to run"""
data_config: TrainingConfigDataConfig
+ """(Optional) Configuration for data loading and formatting"""
dtype: str
+ """(Optional) Data type for model parameters (bf16, fp16, fp32)"""
efficiency_config: TrainingConfigEfficiencyConfig
+ """(Optional) Configuration for memory and compute optimizations"""
max_validation_steps: int
+ """(Optional) Maximum number of validation steps per epoch"""
optimizer_config: TrainingConfigOptimizerConfig
+ """(Optional) Configuration for the optimization algorithm"""
diff --git a/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py b/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
index 596ec18b..c23796f0 100644
--- a/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
+++ b/src/llama_stack_client/types/post_training_supervised_fine_tune_params.py
@@ -41,53 +41,79 @@ class PostTrainingSupervisedFineTuneParams(TypedDict, total=False):
class TrainingConfigDataConfig(TypedDict, total=False):
batch_size: Required[int]
+ """Number of samples per training batch"""
data_format: Required[Literal["instruct", "dialog"]]
+ """Format of the dataset (instruct or dialog)"""
dataset_id: Required[str]
+ """Unique identifier for the training dataset"""
shuffle: Required[bool]
+ """Whether to shuffle the dataset during training"""
packed: bool
+ """
+ (Optional) Whether to pack multiple samples into a single sequence for
+ efficiency
+ """
train_on_input: bool
+ """(Optional) Whether to compute loss on input tokens as well as output tokens"""
validation_dataset_id: str
+ """(Optional) Unique identifier for the validation dataset"""
class TrainingConfigEfficiencyConfig(TypedDict, total=False):
enable_activation_checkpointing: bool
+ """(Optional) Whether to use activation checkpointing to reduce memory usage"""
enable_activation_offloading: bool
+ """(Optional) Whether to offload activations to CPU to save GPU memory"""
fsdp_cpu_offload: bool
+ """(Optional) Whether to offload FSDP parameters to CPU"""
memory_efficient_fsdp_wrap: bool
+ """(Optional) Whether to use memory-efficient FSDP wrapping"""
class TrainingConfigOptimizerConfig(TypedDict, total=False):
lr: Required[float]
+ """Learning rate for the optimizer"""
num_warmup_steps: Required[int]
+ """Number of steps for learning rate warmup"""
optimizer_type: Required[Literal["adam", "adamw", "sgd"]]
+ """Type of optimizer to use (adam, adamw, or sgd)"""
weight_decay: Required[float]
+ """Weight decay coefficient for regularization"""
class TrainingConfig(TypedDict, total=False):
gradient_accumulation_steps: Required[int]
+ """Number of steps to accumulate gradients before updating"""
max_steps_per_epoch: Required[int]
+ """Maximum number of steps to run per epoch"""
n_epochs: Required[int]
+ """Number of training epochs to run"""
data_config: TrainingConfigDataConfig
+ """(Optional) Configuration for data loading and formatting"""
dtype: str
+ """(Optional) Data type for model parameters (bf16, fp16, fp32)"""
efficiency_config: TrainingConfigEfficiencyConfig
+ """(Optional) Configuration for memory and compute optimizations"""
max_validation_steps: int
+ """(Optional) Maximum number of validation steps per epoch"""
optimizer_config: TrainingConfigOptimizerConfig
+ """(Optional) Configuration for the optimization algorithm"""
diff --git a/src/llama_stack_client/types/provider_info.py b/src/llama_stack_client/types/provider_info.py
index c9c748cc..6b8a1ec6 100644
--- a/src/llama_stack_client/types/provider_info.py
+++ b/src/llama_stack_client/types/provider_info.py
@@ -9,11 +9,16 @@
class ProviderInfo(BaseModel):
api: str
+ """The API name this provider implements"""
config: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Configuration parameters for the provider"""
health: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Current health status of the provider"""
provider_id: str
+ """Unique identifier for the provider"""
provider_type: str
+ """The type of provider implementation"""
diff --git a/src/llama_stack_client/types/query_chunks_response.py b/src/llama_stack_client/types/query_chunks_response.py
index 97c1927c..6a06b3f2 100644
--- a/src/llama_stack_client/types/query_chunks_response.py
+++ b/src/llama_stack_client/types/query_chunks_response.py
@@ -76,5 +76,7 @@ class Chunk(BaseModel):
class QueryChunksResponse(BaseModel):
chunks: List[Chunk]
+ """List of content chunks returned from the query"""
scores: List[float]
+ """Relevance scores corresponding to each returned chunk"""
diff --git a/src/llama_stack_client/types/query_condition_param.py b/src/llama_stack_client/types/query_condition_param.py
index 37c48093..59def1b4 100644
--- a/src/llama_stack_client/types/query_condition_param.py
+++ b/src/llama_stack_client/types/query_condition_param.py
@@ -10,7 +10,10 @@
class QueryConditionParam(TypedDict, total=False):
key: Required[str]
+ """The attribute key to filter on"""
op: Required[Literal["eq", "ne", "gt", "lt"]]
+ """The comparison operator to apply"""
value: Required[Union[bool, float, str, Iterable[object], object, None]]
+ """The value to compare against"""
diff --git a/src/llama_stack_client/types/query_spans_response.py b/src/llama_stack_client/types/query_spans_response.py
index 488a4331..a20c9b92 100644
--- a/src/llama_stack_client/types/query_spans_response.py
+++ b/src/llama_stack_client/types/query_spans_response.py
@@ -8,3 +8,4 @@
class QuerySpansResponse(BaseModel):
data: TelemetryQuerySpansResponse
+ """List of spans matching the query criteria"""
diff --git a/src/llama_stack_client/types/response_create_params.py b/src/llama_stack_client/types/response_create_params.py
index 471d8b21..74857714 100644
--- a/src/llama_stack_client/types/response_create_params.py
+++ b/src/llama_stack_client/types/response_create_params.py
@@ -62,42 +62,57 @@ class ResponseCreateParamsBase(TypedDict, total=False):
temperature: float
text: Text
+ """Text response configuration for OpenAI responses."""
tools: Iterable[Tool]
class InputUnionMember1OpenAIResponseOutputMessageWebSearchToolCall(TypedDict, total=False):
id: Required[str]
+ """Unique identifier for this tool call"""
status: Required[str]
+ """Current status of the web search operation"""
type: Required[Literal["web_search_call"]]
+ """Tool call type identifier, always "web_search_call" """
class InputUnionMember1OpenAIResponseOutputMessageFileSearchToolCall(TypedDict, total=False):
id: Required[str]
+ """Unique identifier for this tool call"""
queries: Required[List[str]]
+ """List of search queries executed"""
status: Required[str]
+ """Current status of the file search operation"""
type: Required[Literal["file_search_call"]]
+ """Tool call type identifier, always "file_search_call" """
results: Iterable[Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
+ """(Optional) Search results returned by the file search operation"""
class InputUnionMember1OpenAIResponseOutputMessageFunctionToolCall(TypedDict, total=False):
arguments: Required[str]
+ """JSON string containing the function arguments"""
call_id: Required[str]
+ """Unique identifier for the function call"""
name: Required[str]
+ """Name of the function being called"""
type: Required[Literal["function_call"]]
+ """Tool call type identifier, always "function_call" """
id: str
+ """(Optional) Additional identifier for the tool call"""
status: str
+ """(Optional) Current status of the function call execution"""
class InputUnionMember1OpenAIResponseInputFunctionToolCallOutput(TypedDict, total=False):
@@ -116,18 +131,23 @@ class InputUnionMember1OpenAIResponseMessageContentUnionMember1OpenAIResponseInp
TypedDict, total=False
):
text: Required[str]
+ """The text content of the input message"""
type: Required[Literal["input_text"]]
+ """Content type identifier, always "input_text" """
class InputUnionMember1OpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
TypedDict, total=False
):
detail: Required[Literal["low", "high", "auto"]]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Required[Literal["input_image"]]
+ """Content type identifier, always "input_image" """
image_url: str
+ """(Optional) URL of the image content"""
InputUnionMember1OpenAIResponseMessageContentUnionMember1: TypeAlias = Union[
@@ -140,26 +160,35 @@ class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIR
TypedDict, total=False
):
file_id: Required[str]
+ """Unique identifier of the referenced file"""
filename: Required[str]
+ """Name of the referenced file"""
index: Required[int]
+ """Position index of the citation within the content"""
type: Required[Literal["file_citation"]]
+ """Annotation type identifier, always "file_citation" """
class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
TypedDict, total=False
):
end_index: Required[int]
+ """End position of the citation span in the content"""
start_index: Required[int]
+ """Start position of the citation span in the content"""
title: Required[str]
+ """Title of the referenced web resource"""
type: Required[Literal["url_citation"]]
+ """Annotation type identifier, always "url_citation" """
url: Required[str]
+ """URL of the referenced web resource"""
class InputUnionMember1OpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -256,49 +285,65 @@ class TextFormat(TypedDict, total=False):
class Text(TypedDict, total=False):
format: TextFormat
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class ToolOpenAIResponseInputToolWebSearch(TypedDict, total=False):
type: Required[Literal["web_search", "web_search_preview", "web_search_preview_2025_03_11"]]
+ """Web search tool type variant to use"""
search_context_size: str
+ """(Optional) Size of search context, must be "low", "medium", or "high" """
class ToolOpenAIResponseInputToolFileSearchRankingOptions(TypedDict, total=False):
ranker: str
+ """(Optional) Name of the ranking algorithm to use"""
score_threshold: float
+ """(Optional) Minimum relevance score threshold for results"""
class ToolOpenAIResponseInputToolFileSearch(TypedDict, total=False):
type: Required[Literal["file_search"]]
+ """Tool type identifier, always "file_search" """
vector_store_ids: Required[List[str]]
+ """List of vector store identifiers to search within"""
filters: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional filters to apply to the search"""
max_num_results: int
+ """(Optional) Maximum number of search results to return (1-50)"""
ranking_options: ToolOpenAIResponseInputToolFileSearchRankingOptions
+ """(Optional) Options for ranking and scoring search results"""
class ToolOpenAIResponseInputToolFunction(TypedDict, total=False):
name: Required[str]
+ """Name of the function that can be called"""
type: Required[Literal["function"]]
+ """Tool type identifier, always "function" """
description: str
+ """(Optional) Description of what the function does"""
parameters: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) JSON schema defining the function's parameters"""
strict: bool
+ """(Optional) Whether to enforce strict parameter validation"""
class ToolOpenAIResponseInputToolMcpRequireApprovalApprovalFilter(TypedDict, total=False):
always: List[str]
+ """(Optional) List of tool names that always require approval"""
never: List[str]
+ """(Optional) List of tool names that never require approval"""
ToolOpenAIResponseInputToolMcpRequireApproval: TypeAlias = Union[
@@ -308,6 +353,7 @@ class ToolOpenAIResponseInputToolMcpRequireApprovalApprovalFilter(TypedDict, tot
class ToolOpenAIResponseInputToolMcpAllowedToolsAllowedToolsFilter(TypedDict, total=False):
tool_names: List[str]
+ """(Optional) List of specific tool names that are allowed"""
ToolOpenAIResponseInputToolMcpAllowedTools: TypeAlias = Union[
@@ -317,16 +363,22 @@ class ToolOpenAIResponseInputToolMcpAllowedToolsAllowedToolsFilter(TypedDict, to
class ToolOpenAIResponseInputToolMcp(TypedDict, total=False):
require_approval: Required[ToolOpenAIResponseInputToolMcpRequireApproval]
+ """Approval requirement for tool calls ("always", "never", or filter)"""
server_label: Required[str]
+ """Label to identify this MCP server"""
server_url: Required[str]
+ """URL endpoint of the MCP server"""
type: Required[Literal["mcp"]]
+ """Tool type identifier, always "mcp" """
allowed_tools: ToolOpenAIResponseInputToolMcpAllowedTools
+ """(Optional) Restriction on which tools can be used from this server"""
headers: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) HTTP headers to include when connecting to the server"""
Tool: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/response_list_response.py b/src/llama_stack_client/types/response_list_response.py
index d46213ef..996fb00a 100644
--- a/src/llama_stack_client/types/response_list_response.py
+++ b/src/llama_stack_client/types/response_list_response.py
@@ -51,36 +51,50 @@
class DataInputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataInputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataInputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataInputOpenAIResponseInputFunctionToolCallOutput(BaseModel):
@@ -97,16 +111,21 @@ class DataInputOpenAIResponseInputFunctionToolCallOutput(BaseModel):
class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataInputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -120,24 +139,33 @@ class DataInputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessag
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataInputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -210,16 +238,21 @@ class DataInputOpenAIResponseMessage(BaseModel):
class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataOutputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -233,24 +266,33 @@ class DataOutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessa
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataOutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -314,70 +356,98 @@ class DataOutputOpenAIResponseMessage(BaseModel):
class DataOutputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataOutputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataOutputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataOutputOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class DataOutputOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class DataOutputOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[DataOutputOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
DataOutput: TypeAlias = Annotated[
@@ -420,54 +490,76 @@ class DataTextFormat(BaseModel):
class DataText(BaseModel):
format: Optional[DataTextFormat] = None
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class DataError(BaseModel):
code: str
+ """Error code identifying the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class Data(BaseModel):
id: str
+ """Unique identifier for this response"""
created_at: int
+ """Unix timestamp when the response was created"""
input: List[DataInput]
+ """List of input items that led to this response"""
model: str
+ """Model identifier used for generation"""
object: Literal["response"]
+ """Object type identifier, always "response" """
output: List[DataOutput]
+ """List of generated output items (messages, tool calls, etc.)"""
parallel_tool_calls: bool
+ """Whether tool calls can be executed in parallel"""
status: str
+ """Current status of the response generation"""
text: DataText
+ """Text formatting configuration for the response"""
error: Optional[DataError] = None
+ """(Optional) Error details if the response generation failed"""
previous_response_id: Optional[str] = None
+ """(Optional) ID of the previous response in a conversation"""
temperature: Optional[float] = None
+ """(Optional) Sampling temperature used for generation"""
top_p: Optional[float] = None
+ """(Optional) Nucleus sampling parameter used for generation"""
truncation: Optional[str] = None
+ """(Optional) Truncation strategy applied to the response"""
user: Optional[str] = None
+ """(Optional) User identifier associated with the request"""
class ResponseListResponse(BaseModel):
data: List[Data]
+ """List of response objects with their input context"""
first_id: str
+ """Identifier of the first item in this page"""
has_more: bool
+ """Whether there are more results available beyond this page"""
last_id: str
+ """Identifier of the last item in this page"""
object: Literal["list"]
+ """Object type identifier, always "list" """
diff --git a/src/llama_stack_client/types/response_object.py b/src/llama_stack_client/types/response_object.py
index e4b313d3..e1c88a16 100644
--- a/src/llama_stack_client/types/response_object.py
+++ b/src/llama_stack_client/types/response_object.py
@@ -35,16 +35,21 @@
class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OutputOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -58,24 +63,33 @@ class OutputOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageCo
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OutputOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(BaseModel):
@@ -135,70 +149,98 @@ class OutputOpenAIResponseMessage(BaseModel):
class OutputOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OutputOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OutputOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OutputOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OutputOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OutputOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OutputOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
Output: TypeAlias = Annotated[
@@ -241,13 +283,15 @@ class TextFormat(BaseModel):
class Text(BaseModel):
format: Optional[TextFormat] = None
- """Configuration for Responses API text format."""
+ """(Optional) Text format configuration specifying output format requirements"""
class Error(BaseModel):
code: str
+ """Error code identifying the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class ResponseObject(BaseModel):
@@ -262,29 +306,43 @@ def output_text(self) -> str:
return "".join(texts)
id: str
+ """Unique identifier for this response"""
created_at: int
+ """Unix timestamp when the response was created"""
model: str
+ """Model identifier used for generation"""
object: Literal["response"]
+ """Object type identifier, always "response" """
output: List[Output]
+ """List of generated output items (messages, tool calls, etc.)"""
parallel_tool_calls: bool
+ """Whether tool calls can be executed in parallel"""
status: str
+ """Current status of the response generation"""
text: Text
+ """Text formatting configuration for the response"""
error: Optional[Error] = None
+ """(Optional) Error details if the response generation failed"""
previous_response_id: Optional[str] = None
+ """(Optional) ID of the previous response in a conversation"""
temperature: Optional[float] = None
+ """(Optional) Sampling temperature used for generation"""
top_p: Optional[float] = None
+ """(Optional) Nucleus sampling parameter used for generation"""
truncation: Optional[str] = None
+ """(Optional) Truncation strategy applied to the response"""
user: Optional[str] = None
+ """(Optional) User identifier associated with the request"""
diff --git a/src/llama_stack_client/types/response_object_stream.py b/src/llama_stack_client/types/response_object_stream.py
index 311ad6bd..aa787093 100644
--- a/src/llama_stack_client/types/response_object_stream.py
+++ b/src/llama_stack_client/types/response_object_stream.py
@@ -67,26 +67,33 @@
class OpenAIResponseObjectStreamResponseCreated(BaseModel):
response: ResponseObject
+ """The newly created response object"""
type: Literal["response.created"]
+ """Event type identifier, always "response.created" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(
BaseModel
):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
BaseModel
):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -102,26 +109,35 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessage
BaseModel
):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
BaseModel
):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -189,70 +205,98 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseMessage
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
OpenAIResponseObjectStreamResponseOutputItemAddedItem: TypeAlias = Annotated[
@@ -270,37 +314,42 @@ class OpenAIResponseObjectStreamResponseOutputItemAddedItemOpenAIResponseOutputM
class OpenAIResponseObjectStreamResponseOutputItemAdded(BaseModel):
item: OpenAIResponseObjectStreamResponseOutputItemAddedItem
- """Corresponds to the various Message types in the Responses API.
-
- They are all under one type because the Responses API gives them all the same
- "type" value, and there is no way to tell them apart in certain scenarios.
- """
+ """The output item that was added (message, tool call, etc.)"""
output_index: int
+ """Index position of this item in the output list"""
response_id: str
+ """Unique identifier of the response containing this output"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_item.added"]
+ """Event type identifier, always "response.output_item.added" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(
BaseModel
):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(
BaseModel
):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -316,26 +365,35 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageC
BaseModel
):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(
BaseModel
):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(
@@ -403,70 +461,98 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseMessage(
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpCall(BaseModel):
id: str
+ """Unique identifier for this MCP call"""
arguments: str
+ """JSON string containing the MCP call arguments"""
name: str
+ """Name of the MCP method being called"""
server_label: str
+ """Label identifying the MCP server handling the call"""
type: Literal["mcp_call"]
+ """Tool call type identifier, always "mcp_call" """
error: Optional[str] = None
+ """(Optional) Error message if the MCP call failed"""
output: Optional[str] = None
+ """(Optional) Output result from the successful MCP call"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListToolsTool(BaseModel):
input_schema: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """JSON schema defining the tool's input parameters"""
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Description of what the tool does"""
class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListTools(BaseModel):
id: str
+ """Unique identifier for this MCP list tools operation"""
server_label: str
+ """Label identifying the MCP server providing the tools"""
tools: List[OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMessageMcpListToolsTool]
+ """List of available tools provided by the MCP server"""
type: Literal["mcp_list_tools"]
+ """Tool call type identifier, always "mcp_list_tools" """
OpenAIResponseObjectStreamResponseOutputItemDoneItem: TypeAlias = Annotated[
@@ -484,81 +570,107 @@ class OpenAIResponseObjectStreamResponseOutputItemDoneItemOpenAIResponseOutputMe
class OpenAIResponseObjectStreamResponseOutputItemDone(BaseModel):
item: OpenAIResponseObjectStreamResponseOutputItemDoneItem
- """Corresponds to the various Message types in the Responses API.
-
- They are all under one type because the Responses API gives them all the same
- "type" value, and there is no way to tell them apart in certain scenarios.
- """
+ """The completed output item (message, tool call, etc.)"""
output_index: int
+ """Index position of this item in the output list"""
response_id: str
+ """Unique identifier of the response containing this output"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_item.done"]
+ """Event type identifier, always "response.output_item.done" """
class OpenAIResponseObjectStreamResponseOutputTextDelta(BaseModel):
content_index: int
+ """Index position within the text content"""
delta: str
+ """Incremental text content being added"""
item_id: str
+ """Unique identifier of the output item being updated"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.output_text.delta"]
+ """Event type identifier, always "response.output_text.delta" """
class OpenAIResponseObjectStreamResponseOutputTextDone(BaseModel):
content_index: int
+ """Index position within the text content"""
item_id: str
+ """Unique identifier of the completed output item"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
text: str
+ """Final complete text content of the output item"""
type: Literal["response.output_text.done"]
+ """Event type identifier, always "response.output_text.done" """
class OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta(BaseModel):
delta: str
+ """Incremental function call arguments being added"""
item_id: str
+ """Unique identifier of the function call being updated"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.function_call_arguments.delta"]
+ """Event type identifier, always "response.function_call_arguments.delta" """
class OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone(BaseModel):
arguments: str
+ """Final complete arguments JSON string for the function call"""
item_id: str
+ """Unique identifier of the completed function call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.function_call_arguments.done"]
+ """Event type identifier, always "response.function_call_arguments.done" """
class OpenAIResponseObjectStreamResponseWebSearchCallInProgress(BaseModel):
item_id: str
+ """Unique identifier of the web search call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.web_search_call.in_progress"]
+ """Event type identifier, always "response.web_search_call.in_progress" """
class OpenAIResponseObjectStreamResponseWebSearchCallSearching(BaseModel):
@@ -573,12 +685,16 @@ class OpenAIResponseObjectStreamResponseWebSearchCallSearching(BaseModel):
class OpenAIResponseObjectStreamResponseWebSearchCallCompleted(BaseModel):
item_id: str
+ """Unique identifier of the completed web search call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.web_search_call.completed"]
+ """Event type identifier, always "response.web_search_call.completed" """
class OpenAIResponseObjectStreamResponseMcpListToolsInProgress(BaseModel):
@@ -625,30 +741,40 @@ class OpenAIResponseObjectStreamResponseMcpCallArgumentsDone(BaseModel):
class OpenAIResponseObjectStreamResponseMcpCallInProgress(BaseModel):
item_id: str
+ """Unique identifier of the MCP call"""
output_index: int
+ """Index position of the item in the output list"""
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.in_progress"]
+ """Event type identifier, always "response.mcp_call.in_progress" """
class OpenAIResponseObjectStreamResponseMcpCallFailed(BaseModel):
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.failed"]
+ """Event type identifier, always "response.mcp_call.failed" """
class OpenAIResponseObjectStreamResponseMcpCallCompleted(BaseModel):
sequence_number: int
+ """Sequential number for ordering streaming events"""
type: Literal["response.mcp_call.completed"]
+ """Event type identifier, always "response.mcp_call.completed" """
class OpenAIResponseObjectStreamResponseCompleted(BaseModel):
response: ResponseObject
+ """The completed response object"""
type: Literal["response.completed"]
+ """Event type identifier, always "response.completed" """
ResponseObjectStream: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/responses/input_item_list_response.py b/src/llama_stack_client/types/responses/input_item_list_response.py
index aadcd9f2..abb09e98 100644
--- a/src/llama_stack_client/types/responses/input_item_list_response.py
+++ b/src/llama_stack_client/types/responses/input_item_list_response.py
@@ -28,36 +28,50 @@
class DataOpenAIResponseOutputMessageWebSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
status: str
+ """Current status of the web search operation"""
type: Literal["web_search_call"]
+ """Tool call type identifier, always "web_search_call" """
class DataOpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
id: str
+ """Unique identifier for this tool call"""
queries: List[str]
+ """List of search queries executed"""
status: str
+ """Current status of the file search operation"""
type: Literal["file_search_call"]
+ """Tool call type identifier, always "file_search_call" """
results: Optional[List[Dict[str, Union[bool, float, str, List[object], object, None]]]] = None
+ """(Optional) Search results returned by the file search operation"""
class DataOpenAIResponseOutputMessageFunctionToolCall(BaseModel):
arguments: str
+ """JSON string containing the function arguments"""
call_id: str
+ """Unique identifier for the function call"""
name: str
+ """Name of the function being called"""
type: Literal["function_call"]
+ """Tool call type identifier, always "function_call" """
id: Optional[str] = None
+ """(Optional) Additional identifier for the tool call"""
status: Optional[str] = None
+ """(Optional) Current status of the function call execution"""
class DataOpenAIResponseInputFunctionToolCallOutput(BaseModel):
@@ -74,16 +88,21 @@ class DataOpenAIResponseInputFunctionToolCallOutput(BaseModel):
class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentText(BaseModel):
text: str
+ """The text content of the input message"""
type: Literal["input_text"]
+ """Content type identifier, always "input_text" """
class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageContentImage(BaseModel):
detail: Literal["low", "high", "auto"]
+ """Level of detail for image processing, can be "low", "high", or "auto" """
type: Literal["input_image"]
+ """Content type identifier, always "input_image" """
image_url: Optional[str] = None
+ """(Optional) URL of the image content"""
DataOpenAIResponseMessageContentUnionMember1: TypeAlias = Annotated[
@@ -97,24 +116,33 @@ class DataOpenAIResponseMessageContentUnionMember1OpenAIResponseInputMessageCont
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationFileCitation(BaseModel):
file_id: str
+ """Unique identifier of the referenced file"""
filename: str
+ """Name of the referenced file"""
index: int
+ """Position index of the citation within the content"""
type: Literal["file_citation"]
+ """Annotation type identifier, always "file_citation" """
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationCitation(BaseModel):
end_index: int
+ """End position of the citation span in the content"""
start_index: int
+ """Start position of the citation span in the content"""
title: str
+ """Title of the referenced web resource"""
type: Literal["url_citation"]
+ """Annotation type identifier, always "url_citation" """
url: str
+ """URL of the referenced web resource"""
class DataOpenAIResponseMessageContentUnionMember2AnnotationOpenAIResponseAnnotationContainerFileCitation(BaseModel):
@@ -183,5 +211,7 @@ class DataOpenAIResponseMessage(BaseModel):
class InputItemListResponse(BaseModel):
data: List[Data]
+ """List of input items"""
object: Literal["list"]
+ """Object type identifier, always "list" """
diff --git a/src/llama_stack_client/types/route_info.py b/src/llama_stack_client/types/route_info.py
index 3d8880f1..671361b9 100644
--- a/src/llama_stack_client/types/route_info.py
+++ b/src/llama_stack_client/types/route_info.py
@@ -9,7 +9,10 @@
class RouteInfo(BaseModel):
method: str
+ """HTTP method for the route"""
provider_types: List[str]
+ """List of provider types that implement this route"""
route: str
+ """The API endpoint path"""
diff --git a/src/llama_stack_client/types/run_shield_response.py b/src/llama_stack_client/types/run_shield_response.py
index 1dbdf5a0..ba7bac0b 100644
--- a/src/llama_stack_client/types/run_shield_response.py
+++ b/src/llama_stack_client/types/run_shield_response.py
@@ -10,3 +10,4 @@
class RunShieldResponse(BaseModel):
violation: Optional[SafetyViolation] = None
+ """(Optional) Safety violation detected by the shield, if any"""
diff --git a/src/llama_stack_client/types/scoring_fn.py b/src/llama_stack_client/types/scoring_fn.py
index 3569cb44..8c558f2a 100644
--- a/src/llama_stack_client/types/scoring_fn.py
+++ b/src/llama_stack_client/types/scoring_fn.py
@@ -20,9 +20,11 @@ class ScoringFn(BaseModel):
return_type: ReturnType
type: Literal["scoring_function"]
+ """The resource type, always scoring_function"""
description: Optional[str] = None
params: Optional[ScoringFnParams] = None
+ """Parameters for LLM-as-judge scoring function configuration."""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/scoring_fn_params.py b/src/llama_stack_client/types/scoring_fn_params.py
index a46b46f5..937fd886 100644
--- a/src/llama_stack_client/types/scoring_fn_params.py
+++ b/src/llama_stack_client/types/scoring_fn_params.py
@@ -11,28 +11,38 @@
class LlmAsJudgeScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
judge_model: str
+ """Identifier of the LLM model to use as a judge for scoring"""
judge_score_regexes: List[str]
+ """Regexes to extract the answer from generated response"""
type: Literal["llm_as_judge"]
+ """The type of scoring function parameters, always llm_as_judge"""
prompt_template: Optional[str] = None
+ """(Optional) Custom prompt template for the judge model"""
class RegexParserScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
parsing_regexes: List[str]
+ """Regex to extract the answer from generated response"""
type: Literal["regex_parser"]
+ """The type of scoring function parameters, always regex_parser"""
class BasicScoringFnParams(BaseModel):
aggregation_functions: List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
+ """Aggregation functions to apply to the scores of each row"""
type: Literal["basic"]
+ """The type of scoring function parameters, always basic"""
ScoringFnParams: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/scoring_fn_params_param.py b/src/llama_stack_client/types/scoring_fn_params_param.py
index b404bc89..9753ddeb 100644
--- a/src/llama_stack_client/types/scoring_fn_params_param.py
+++ b/src/llama_stack_client/types/scoring_fn_params_param.py
@@ -12,32 +12,42 @@ class LlmAsJudgeScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
judge_model: Required[str]
+ """Identifier of the LLM model to use as a judge for scoring"""
judge_score_regexes: Required[List[str]]
+ """Regexes to extract the answer from generated response"""
type: Required[Literal["llm_as_judge"]]
+ """The type of scoring function parameters, always llm_as_judge"""
prompt_template: str
+ """(Optional) Custom prompt template for the judge model"""
class RegexParserScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
parsing_regexes: Required[List[str]]
+ """Regex to extract the answer from generated response"""
type: Required[Literal["regex_parser"]]
+ """The type of scoring function parameters, always regex_parser"""
class BasicScoringFnParams(TypedDict, total=False):
aggregation_functions: Required[
List[Literal["average", "weighted_average", "median", "categorical_count", "accuracy"]]
]
+ """Aggregation functions to apply to the scores of each row"""
type: Required[Literal["basic"]]
+ """The type of scoring function parameters, always basic"""
ScoringFnParamsParam: TypeAlias = Union[LlmAsJudgeScoringFnParams, RegexParserScoringFnParams, BasicScoringFnParams]
diff --git a/src/llama_stack_client/types/scoring_score_batch_response.py b/src/llama_stack_client/types/scoring_score_batch_response.py
index da124b1e..7f5f7e24 100644
--- a/src/llama_stack_client/types/scoring_score_batch_response.py
+++ b/src/llama_stack_client/types/scoring_score_batch_response.py
@@ -10,5 +10,7 @@
class ScoringScoreBatchResponse(BaseModel):
results: Dict[str, ScoringResult]
+ """A map of scoring function name to ScoringResult"""
dataset_id: Optional[str] = None
+ """(Optional) The identifier of the dataset that was scored"""
diff --git a/src/llama_stack_client/types/shared/batch_completion.py b/src/llama_stack_client/types/shared/batch_completion.py
index 547884d1..43a0a735 100644
--- a/src/llama_stack_client/types/shared/batch_completion.py
+++ b/src/llama_stack_client/types/shared/batch_completion.py
@@ -10,3 +10,4 @@
class BatchCompletion(BaseModel):
batch: List[CompletionResponse]
+ """List of completion responses, one for each input in the batch"""
diff --git a/src/llama_stack_client/types/shared/chat_completion_response.py b/src/llama_stack_client/types/shared/chat_completion_response.py
index 20dd1ecc..3ff6e0bc 100644
--- a/src/llama_stack_client/types/shared/chat_completion_response.py
+++ b/src/llama_stack_client/types/shared/chat_completion_response.py
@@ -11,10 +11,13 @@
class Metric(BaseModel):
metric: str
+ """The name of the metric"""
value: float
+ """The numeric value of the metric"""
unit: Optional[str] = None
+ """(Optional) The unit of measurement for the metric value"""
class ChatCompletionResponse(BaseModel):
@@ -25,3 +28,4 @@ class ChatCompletionResponse(BaseModel):
"""Optional log probabilities for generated tokens"""
metrics: Optional[List[Metric]] = None
+ """(Optional) List of metrics associated with the API response"""
diff --git a/src/llama_stack_client/types/shared/content_delta.py b/src/llama_stack_client/types/shared/content_delta.py
index ae036ad8..e5936990 100644
--- a/src/llama_stack_client/types/shared/content_delta.py
+++ b/src/llama_stack_client/types/shared/content_delta.py
@@ -12,22 +12,29 @@
class TextDelta(BaseModel):
text: str
+ """The incremental text content"""
type: Literal["text"]
+ """Discriminator type of the delta. Always "text" """
class ImageDelta(BaseModel):
image: str
+ """The incremental image data as bytes"""
type: Literal["image"]
+ """Discriminator type of the delta. Always "image" """
class ToolCallDelta(BaseModel):
parse_status: Literal["started", "in_progress", "failed", "succeeded"]
+ """Current parsing status of the tool call"""
tool_call: ToolCallOrString
+ """Either an in-progress tool call string or the final parsed tool call"""
type: Literal["tool_call"]
+ """Discriminator type of the delta. Always "tool_call" """
ContentDelta: TypeAlias = Annotated[Union[TextDelta, ImageDelta, ToolCallDelta], PropertyInfo(discriminator="type")]
diff --git a/src/llama_stack_client/types/shared/document.py b/src/llama_stack_client/types/shared/document.py
index 67704232..492e6abd 100644
--- a/src/llama_stack_client/types/shared/document.py
+++ b/src/llama_stack_client/types/shared/document.py
@@ -19,6 +19,7 @@
class ContentImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ContentImageContentItemImage(BaseModel):
@@ -50,6 +51,7 @@ class ContentTextContentItem(BaseModel):
class ContentURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
Content: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/shared/interleaved_content.py b/src/llama_stack_client/types/shared/interleaved_content.py
index dc496150..852e487e 100644
--- a/src/llama_stack_client/types/shared/interleaved_content.py
+++ b/src/llama_stack_client/types/shared/interleaved_content.py
@@ -17,6 +17,7 @@
class ImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ImageContentItemImage(BaseModel):
diff --git a/src/llama_stack_client/types/shared/interleaved_content_item.py b/src/llama_stack_client/types/shared/interleaved_content_item.py
index 8a3238b8..cb034712 100644
--- a/src/llama_stack_client/types/shared/interleaved_content_item.py
+++ b/src/llama_stack_client/types/shared/interleaved_content_item.py
@@ -17,6 +17,7 @@
class ImageContentItemImageURL(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ImageContentItemImage(BaseModel):
diff --git a/src/llama_stack_client/types/shared/param_type.py b/src/llama_stack_client/types/shared/param_type.py
index 2fed6df2..199b0fd7 100644
--- a/src/llama_stack_client/types/shared/param_type.py
+++ b/src/llama_stack_client/types/shared/param_type.py
@@ -23,42 +23,52 @@
class StringType(BaseModel):
type: Literal["string"]
+ """Discriminator type. Always "string" """
class NumberType(BaseModel):
type: Literal["number"]
+ """Discriminator type. Always "number" """
class BooleanType(BaseModel):
type: Literal["boolean"]
+ """Discriminator type. Always "boolean" """
class ArrayType(BaseModel):
type: Literal["array"]
+ """Discriminator type. Always "array" """
class ObjectType(BaseModel):
type: Literal["object"]
+ """Discriminator type. Always "object" """
class JsonType(BaseModel):
type: Literal["json"]
+ """Discriminator type. Always "json" """
class UnionType(BaseModel):
type: Literal["union"]
+ """Discriminator type. Always "union" """
class ChatCompletionInputType(BaseModel):
type: Literal["chat_completion_input"]
+ """Discriminator type. Always "chat_completion_input" """
class CompletionInputType(BaseModel):
type: Literal["completion_input"]
+ """Discriminator type. Always "completion_input" """
class AgentTurnInputType(BaseModel):
type: Literal["agent_turn_input"]
+ """Discriminator type. Always "agent_turn_input" """
ParamType: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared/query_config.py b/src/llama_stack_client/types/shared/query_config.py
index 5c1e1806..389514c7 100644
--- a/src/llama_stack_client/types/shared/query_config.py
+++ b/src/llama_stack_client/types/shared/query_config.py
@@ -14,8 +14,7 @@ class RankerRrfRanker(BaseModel):
impact_factor: float
"""The impact factor for RRF scoring.
- Higher values give more weight to higher-ranked results. Must be greater than 0.
- Default of 60 is from the original RRF paper (Cormack et al., 2009).
+ Higher values give more weight to higher-ranked results. Must be greater than 0
"""
type: Literal["rrf"]
diff --git a/src/llama_stack_client/types/shared/query_generator_config.py b/src/llama_stack_client/types/shared/query_generator_config.py
index 559fca7d..624fc190 100644
--- a/src/llama_stack_client/types/shared/query_generator_config.py
+++ b/src/llama_stack_client/types/shared/query_generator_config.py
@@ -11,16 +11,21 @@
class DefaultRagQueryGeneratorConfig(BaseModel):
separator: str
+ """String separator used to join query terms"""
type: Literal["default"]
+ """Type of query generator, always 'default'"""
class LlmragQueryGeneratorConfig(BaseModel):
model: str
+ """Name of the language model to use for query generation"""
template: str
+ """Template string for formatting the query generation prompt"""
type: Literal["llm"]
+ """Type of query generator, always 'llm'"""
QueryGeneratorConfig: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared/query_result.py b/src/llama_stack_client/types/shared/query_result.py
index c0a1d44c..c623c6d6 100644
--- a/src/llama_stack_client/types/shared/query_result.py
+++ b/src/llama_stack_client/types/shared/query_result.py
@@ -10,6 +10,7 @@
class QueryResult(BaseModel):
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Additional metadata about the query result"""
content: Optional[InterleavedContent] = None
- """A image content item"""
+ """(Optional) The retrieved content from the query"""
diff --git a/src/llama_stack_client/types/shared/safety_violation.py b/src/llama_stack_client/types/shared/safety_violation.py
index e3c94312..bea7ca93 100644
--- a/src/llama_stack_client/types/shared/safety_violation.py
+++ b/src/llama_stack_client/types/shared/safety_violation.py
@@ -10,7 +10,13 @@
class SafetyViolation(BaseModel):
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """
+ Additional metadata including specific violation codes for debugging and
+ telemetry
+ """
violation_level: Literal["info", "warn", "error"]
+ """Severity level of the violation"""
user_message: Optional[str] = None
+ """(Optional) Message to convey to the user about the violation"""
diff --git a/src/llama_stack_client/types/shared/sampling_params.py b/src/llama_stack_client/types/shared/sampling_params.py
index 7ce2211e..6823aee7 100644
--- a/src/llama_stack_client/types/shared/sampling_params.py
+++ b/src/llama_stack_client/types/shared/sampling_params.py
@@ -17,20 +17,26 @@
class StrategyGreedySamplingStrategy(BaseModel):
type: Literal["greedy"]
+ """Must be "greedy" to identify this sampling strategy"""
class StrategyTopPSamplingStrategy(BaseModel):
type: Literal["top_p"]
+ """Must be "top_p" to identify this sampling strategy"""
temperature: Optional[float] = None
+ """Controls randomness in sampling. Higher values increase randomness"""
top_p: Optional[float] = None
+ """Cumulative probability threshold for nucleus sampling. Defaults to 0.95"""
class StrategyTopKSamplingStrategy(BaseModel):
top_k: int
+ """Number of top tokens to consider for sampling. Must be at least 1"""
type: Literal["top_k"]
+ """Must be "top_k" to identify this sampling strategy"""
Strategy: TypeAlias = Annotated[
diff --git a/src/llama_stack_client/types/shared_params/document.py b/src/llama_stack_client/types/shared_params/document.py
index 78564cfa..db9cd51d 100644
--- a/src/llama_stack_client/types/shared_params/document.py
+++ b/src/llama_stack_client/types/shared_params/document.py
@@ -20,6 +20,7 @@
class ContentImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ContentImageContentItemImage(TypedDict, total=False):
@@ -51,6 +52,7 @@ class ContentTextContentItem(TypedDict, total=False):
class ContentURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
Content: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/shared_params/interleaved_content.py b/src/llama_stack_client/types/shared_params/interleaved_content.py
index 5d045a20..5ea3953a 100644
--- a/src/llama_stack_client/types/shared_params/interleaved_content.py
+++ b/src/llama_stack_client/types/shared_params/interleaved_content.py
@@ -18,6 +18,7 @@
class ImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ImageContentItemImage(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/shared_params/interleaved_content_item.py b/src/llama_stack_client/types/shared_params/interleaved_content_item.py
index b5c0bcc1..ed3daa32 100644
--- a/src/llama_stack_client/types/shared_params/interleaved_content_item.py
+++ b/src/llama_stack_client/types/shared_params/interleaved_content_item.py
@@ -16,6 +16,7 @@
class ImageContentItemImageURL(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
class ImageContentItemImage(TypedDict, total=False):
diff --git a/src/llama_stack_client/types/shared_params/query_config.py b/src/llama_stack_client/types/shared_params/query_config.py
index 9da3da08..d008c48c 100644
--- a/src/llama_stack_client/types/shared_params/query_config.py
+++ b/src/llama_stack_client/types/shared_params/query_config.py
@@ -14,8 +14,7 @@ class RankerRrfRanker(TypedDict, total=False):
impact_factor: Required[float]
"""The impact factor for RRF scoring.
- Higher values give more weight to higher-ranked results. Must be greater than 0.
- Default of 60 is from the original RRF paper (Cormack et al., 2009).
+ Higher values give more weight to higher-ranked results. Must be greater than 0
"""
type: Required[Literal["rrf"]]
diff --git a/src/llama_stack_client/types/shared_params/query_generator_config.py b/src/llama_stack_client/types/shared_params/query_generator_config.py
index db135e80..8c589bf9 100644
--- a/src/llama_stack_client/types/shared_params/query_generator_config.py
+++ b/src/llama_stack_client/types/shared_params/query_generator_config.py
@@ -10,16 +10,21 @@
class DefaultRagQueryGeneratorConfig(TypedDict, total=False):
separator: Required[str]
+ """String separator used to join query terms"""
type: Required[Literal["default"]]
+ """Type of query generator, always 'default'"""
class LlmragQueryGeneratorConfig(TypedDict, total=False):
model: Required[str]
+ """Name of the language model to use for query generation"""
template: Required[str]
+ """Template string for formatting the query generation prompt"""
type: Required[Literal["llm"]]
+ """Type of query generator, always 'llm'"""
QueryGeneratorConfig: TypeAlias = Union[DefaultRagQueryGeneratorConfig, LlmragQueryGeneratorConfig]
diff --git a/src/llama_stack_client/types/shared_params/sampling_params.py b/src/llama_stack_client/types/shared_params/sampling_params.py
index 158db1c5..55f05e8b 100644
--- a/src/llama_stack_client/types/shared_params/sampling_params.py
+++ b/src/llama_stack_client/types/shared_params/sampling_params.py
@@ -16,20 +16,26 @@
class StrategyGreedySamplingStrategy(TypedDict, total=False):
type: Required[Literal["greedy"]]
+ """Must be "greedy" to identify this sampling strategy"""
class StrategyTopPSamplingStrategy(TypedDict, total=False):
type: Required[Literal["top_p"]]
+ """Must be "top_p" to identify this sampling strategy"""
temperature: float
+ """Controls randomness in sampling. Higher values increase randomness"""
top_p: float
+ """Cumulative probability threshold for nucleus sampling. Defaults to 0.95"""
class StrategyTopKSamplingStrategy(TypedDict, total=False):
top_k: Required[int]
+ """Number of top tokens to consider for sampling. Must be at least 1"""
type: Required[Literal["top_k"]]
+ """Must be "top_k" to identify this sampling strategy"""
Strategy: TypeAlias = Union[StrategyGreedySamplingStrategy, StrategyTopPSamplingStrategy, StrategyTopKSamplingStrategy]
diff --git a/src/llama_stack_client/types/shield.py b/src/llama_stack_client/types/shield.py
index ff5f01f1..dd48dfae 100644
--- a/src/llama_stack_client/types/shield.py
+++ b/src/llama_stack_client/types/shield.py
@@ -14,7 +14,9 @@ class Shield(BaseModel):
provider_id: str
type: Literal["shield"]
+ """The resource type, always shield"""
params: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Configuration parameters for the shield"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/span_with_status.py b/src/llama_stack_client/types/span_with_status.py
index f93f4ff5..04d124bd 100644
--- a/src/llama_stack_client/types/span_with_status.py
+++ b/src/llama_stack_client/types/span_with_status.py
@@ -11,17 +11,25 @@
class SpanWithStatus(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
status: Optional[Literal["ok", "error"]] = None
+ """(Optional) The current status of the span"""
diff --git a/src/llama_stack_client/types/synthetic_data_generation_generate_params.py b/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
index abf51059..5f55a97c 100644
--- a/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
+++ b/src/llama_stack_client/types/synthetic_data_generation_generate_params.py
@@ -12,8 +12,14 @@
class SyntheticDataGenerationGenerateParams(TypedDict, total=False):
dialogs: Required[Iterable[Message]]
+ """List of conversation messages to use as input for synthetic data generation"""
filtering_function: Required[Literal["none", "random", "top_k", "top_p", "top_k_top_p", "sigmoid"]]
- """The type of filtering function."""
+ """Type of filtering to apply to generated synthetic data samples"""
model: str
+ """(Optional) The identifier of the model to use.
+
+ The model must be registered with Llama Stack and available via the /models
+ endpoint
+ """
diff --git a/src/llama_stack_client/types/synthetic_data_generation_response.py b/src/llama_stack_client/types/synthetic_data_generation_response.py
index a2ee11e6..cfb20f08 100644
--- a/src/llama_stack_client/types/synthetic_data_generation_response.py
+++ b/src/llama_stack_client/types/synthetic_data_generation_response.py
@@ -9,5 +9,10 @@
class SyntheticDataGenerationResponse(BaseModel):
synthetic_data: List[Dict[str, Union[bool, float, str, List[object], object, None]]]
+ """List of generated synthetic data samples that passed the filtering criteria"""
statistics: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """
+ (Optional) Statistical information about the generation process and filtering
+ results
+ """
diff --git a/src/llama_stack_client/types/telemetry_get_span_response.py b/src/llama_stack_client/types/telemetry_get_span_response.py
index 9e50ed0d..6826d4d0 100644
--- a/src/llama_stack_client/types/telemetry_get_span_response.py
+++ b/src/llama_stack_client/types/telemetry_get_span_response.py
@@ -10,15 +10,22 @@
class TelemetryGetSpanResponse(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
diff --git a/src/llama_stack_client/types/telemetry_query_spans_response.py b/src/llama_stack_client/types/telemetry_query_spans_response.py
index c630efeb..49eaeb38 100644
--- a/src/llama_stack_client/types/telemetry_query_spans_response.py
+++ b/src/llama_stack_client/types/telemetry_query_spans_response.py
@@ -11,18 +11,25 @@
class TelemetryQuerySpansResponseItem(BaseModel):
name: str
+ """Human-readable name describing the operation this span represents"""
span_id: str
+ """Unique identifier for the span"""
start_time: datetime
+ """Timestamp when the operation began"""
trace_id: str
+ """Unique identifier for the trace this span belongs to"""
attributes: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Key-value pairs containing additional metadata about the span"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the operation finished, if completed"""
parent_span_id: Optional[str] = None
+ """(Optional) Unique identifier for the parent span, if this is a child span"""
TelemetryQuerySpansResponse: TypeAlias = List[TelemetryQuerySpansResponseItem]
diff --git a/src/llama_stack_client/types/tool.py b/src/llama_stack_client/types/tool.py
index 6beb8764..c6994268 100644
--- a/src/llama_stack_client/types/tool.py
+++ b/src/llama_stack_client/types/tool.py
@@ -10,29 +10,39 @@
class Parameter(BaseModel):
description: str
+ """Human-readable description of what the parameter does"""
name: str
+ """Name of the parameter"""
parameter_type: str
+ """Type of the parameter (e.g., string, integer)"""
required: bool
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, List[object], object, None] = None
+ """(Optional) Default value for the parameter if not provided"""
class Tool(BaseModel):
description: str
+ """Human-readable description of what the tool does"""
identifier: str
parameters: List[Parameter]
+ """List of parameters this tool accepts"""
provider_id: str
toolgroup_id: str
+ """ID of the tool group this tool belongs to"""
type: Literal["tool"]
+ """Type of resource, always 'tool'"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/tool_def.py b/src/llama_stack_client/types/tool_def.py
index d96c5c5d..c82a9b8a 100644
--- a/src/llama_stack_client/types/tool_def.py
+++ b/src/llama_stack_client/types/tool_def.py
@@ -9,21 +9,30 @@
class Parameter(BaseModel):
description: str
+ """Human-readable description of what the parameter does"""
name: str
+ """Name of the parameter"""
parameter_type: str
+ """Type of the parameter (e.g., string, integer)"""
required: bool
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, List[object], object, None] = None
+ """(Optional) Default value for the parameter if not provided"""
class ToolDef(BaseModel):
name: str
+ """Name of the tool"""
description: Optional[str] = None
+ """(Optional) Human-readable description of what the tool does"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool"""
parameters: Optional[List[Parameter]] = None
+ """(Optional) List of parameters this tool accepts"""
diff --git a/src/llama_stack_client/types/tool_def_param.py b/src/llama_stack_client/types/tool_def_param.py
index 42d27fbd..93ad8285 100644
--- a/src/llama_stack_client/types/tool_def_param.py
+++ b/src/llama_stack_client/types/tool_def_param.py
@@ -10,21 +10,30 @@
class Parameter(TypedDict, total=False):
description: Required[str]
+ """Human-readable description of what the parameter does"""
name: Required[str]
+ """Name of the parameter"""
parameter_type: Required[str]
+ """Type of the parameter (e.g., string, integer)"""
required: Required[bool]
+ """Whether this parameter is required for tool invocation"""
default: Union[bool, float, str, Iterable[object], object, None]
+ """(Optional) Default value for the parameter if not provided"""
class ToolDefParam(TypedDict, total=False):
name: Required[str]
+ """Name of the tool"""
description: str
+ """(Optional) Human-readable description of what the tool does"""
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional metadata about the tool"""
parameters: Iterable[Parameter]
+ """(Optional) List of parameters this tool accepts"""
diff --git a/src/llama_stack_client/types/tool_group.py b/src/llama_stack_client/types/tool_group.py
index 3389395a..52fca005 100644
--- a/src/llama_stack_client/types/tool_group.py
+++ b/src/llama_stack_client/types/tool_group.py
@@ -10,6 +10,7 @@
class McpEndpoint(BaseModel):
uri: str
+ """The URL string pointing to the resource"""
class ToolGroup(BaseModel):
@@ -18,9 +19,12 @@ class ToolGroup(BaseModel):
provider_id: str
type: Literal["tool_group"]
+ """Type of resource, always 'tool_group'"""
args: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional arguments for the tool group"""
mcp_endpoint: Optional[McpEndpoint] = None
+ """(Optional) Model Context Protocol endpoint for remote tools"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/tool_invocation_result.py b/src/llama_stack_client/types/tool_invocation_result.py
index 01f7db28..4262a85b 100644
--- a/src/llama_stack_client/types/tool_invocation_result.py
+++ b/src/llama_stack_client/types/tool_invocation_result.py
@@ -10,10 +10,13 @@
class ToolInvocationResult(BaseModel):
content: Optional[InterleavedContent] = None
- """A image content item"""
+ """(Optional) The output content from the tool execution"""
error_code: Optional[int] = None
+ """(Optional) Numeric error code if the tool execution failed"""
error_message: Optional[str] = None
+ """(Optional) Error message if the tool execution failed"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool execution"""
diff --git a/src/llama_stack_client/types/tool_response.py b/src/llama_stack_client/types/tool_response.py
index f984f30a..7750494e 100644
--- a/src/llama_stack_client/types/tool_response.py
+++ b/src/llama_stack_client/types/tool_response.py
@@ -11,10 +11,13 @@
class ToolResponse(BaseModel):
call_id: str
+ """Unique identifier for the tool call this response is for"""
content: InterleavedContent
- """A image content item"""
+ """The response content from the tool"""
tool_name: Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]
+ """Name of the tool that was invoked"""
metadata: Optional[Dict[str, Union[bool, float, str, List[object], object, None]]] = None
+ """(Optional) Additional metadata about the tool response"""
diff --git a/src/llama_stack_client/types/tool_response_param.py b/src/llama_stack_client/types/tool_response_param.py
index 8ac14862..386658f9 100644
--- a/src/llama_stack_client/types/tool_response_param.py
+++ b/src/llama_stack_client/types/tool_response_param.py
@@ -12,10 +12,13 @@
class ToolResponseParam(TypedDict, total=False):
call_id: Required[str]
+ """Unique identifier for the tool call this response is for"""
content: Required[InterleavedContent]
- """A image content item"""
+ """The response content from the tool"""
tool_name: Required[Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]]
+ """Name of the tool that was invoked"""
metadata: Dict[str, Union[bool, float, str, Iterable[object], object, None]]
+ """(Optional) Additional metadata about the tool response"""
diff --git a/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py b/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
index bc52c481..614a969c 100644
--- a/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
+++ b/src/llama_stack_client/types/tool_runtime/rag_tool_insert_params.py
@@ -12,7 +12,10 @@
class RagToolInsertParams(TypedDict, total=False):
chunk_size_in_tokens: Required[int]
+ """(Optional) Size in tokens for document chunking during indexing"""
documents: Required[Iterable[Document]]
+ """List of documents to index in the RAG system"""
vector_db_id: Required[str]
+ """ID of the vector database to store the document embeddings"""
diff --git a/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py b/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
index 4599c693..a28faf2b 100644
--- a/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
+++ b/src/llama_stack_client/types/tool_runtime/rag_tool_query_params.py
@@ -13,9 +13,10 @@
class RagToolQueryParams(TypedDict, total=False):
content: Required[InterleavedContent]
- """A image content item"""
+ """The query content to search for in the indexed documents"""
vector_db_ids: Required[List[str]]
+ """List of vector database IDs to search within"""
query_config: QueryConfig
- """Configuration for the RAG query generation."""
+ """(Optional) Configuration parameters for the query operation"""
diff --git a/src/llama_stack_client/types/tool_runtime_list_tools_params.py b/src/llama_stack_client/types/tool_runtime_list_tools_params.py
index 539e176d..d4933940 100644
--- a/src/llama_stack_client/types/tool_runtime_list_tools_params.py
+++ b/src/llama_stack_client/types/tool_runtime_list_tools_params.py
@@ -17,3 +17,4 @@ class ToolRuntimeListToolsParams(TypedDict, total=False):
class McpEndpoint(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
diff --git a/src/llama_stack_client/types/toolgroup_register_params.py b/src/llama_stack_client/types/toolgroup_register_params.py
index a50c14c4..2aa79960 100644
--- a/src/llama_stack_client/types/toolgroup_register_params.py
+++ b/src/llama_stack_client/types/toolgroup_register_params.py
@@ -24,3 +24,4 @@ class ToolgroupRegisterParams(TypedDict, total=False):
class McpEndpoint(TypedDict, total=False):
uri: Required[str]
+ """The URL string pointing to the resource"""
diff --git a/src/llama_stack_client/types/trace.py b/src/llama_stack_client/types/trace.py
index 3683551c..0657d616 100644
--- a/src/llama_stack_client/types/trace.py
+++ b/src/llama_stack_client/types/trace.py
@@ -10,9 +10,13 @@
class Trace(BaseModel):
root_span_id: str
+ """Unique identifier for the root span that started this trace"""
start_time: datetime
+ """Timestamp when the trace began"""
trace_id: str
+ """Unique identifier for the trace"""
end_time: Optional[datetime] = None
+ """(Optional) Timestamp when the trace finished, if completed"""
diff --git a/src/llama_stack_client/types/vector_db_list_response.py b/src/llama_stack_client/types/vector_db_list_response.py
index d53a3c95..18034f52 100644
--- a/src/llama_stack_client/types/vector_db_list_response.py
+++ b/src/llama_stack_client/types/vector_db_list_response.py
@@ -10,14 +10,17 @@
class VectorDBListResponseItem(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_register_response.py b/src/llama_stack_client/types/vector_db_register_response.py
index b9224a23..cf48dd5a 100644
--- a/src/llama_stack_client/types/vector_db_register_response.py
+++ b/src/llama_stack_client/types/vector_db_register_response.py
@@ -10,14 +10,17 @@
class VectorDBRegisterResponse(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_db_retrieve_response.py b/src/llama_stack_client/types/vector_db_retrieve_response.py
index 4dd3a710..aa349d1c 100644
--- a/src/llama_stack_client/types/vector_db_retrieve_response.py
+++ b/src/llama_stack_client/types/vector_db_retrieve_response.py
@@ -10,14 +10,17 @@
class VectorDBRetrieveResponse(BaseModel):
embedding_dimension: int
+ """Dimension of the embedding vectors"""
embedding_model: str
+ """Name of the embedding model to use for vector generation"""
identifier: str
provider_id: str
type: Literal["vector_db"]
+ """Type of resource, always 'vector_db' for vector databases"""
provider_resource_id: Optional[str] = None
diff --git a/src/llama_stack_client/types/vector_store.py b/src/llama_stack_client/types/vector_store.py
index 5dc4ad3a..cfcebd81 100644
--- a/src/llama_stack_client/types/vector_store.py
+++ b/src/llama_stack_client/types/vector_store.py
@@ -10,35 +10,51 @@
class FileCounts(BaseModel):
cancelled: int
+ """Number of files that had their processing cancelled"""
completed: int
+ """Number of files that have been successfully processed"""
failed: int
+ """Number of files that failed to process"""
in_progress: int
+ """Number of files currently being processed"""
total: int
+ """Total number of files in the vector store"""
class VectorStore(BaseModel):
id: str
+ """Unique identifier for the vector store"""
created_at: int
+ """Timestamp when the vector store was created"""
file_counts: FileCounts
+ """File processing status counts for the vector store"""
metadata: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Set of key-value pairs that can be attached to the vector store"""
object: str
+ """Object type identifier, always "vector_store" """
status: str
+ """Current status of the vector store"""
usage_bytes: int
+ """Storage space used by the vector store in bytes"""
expires_after: Optional[Dict[str, Union[bool, float, str, List[builtins.object], builtins.object, None]]] = None
+ """(Optional) Expiration policy for the vector store"""
expires_at: Optional[int] = None
+ """(Optional) Timestamp when the vector store will expire"""
last_active_at: Optional[int] = None
+ """(Optional) Timestamp of last activity on the vector store"""
name: Optional[str] = None
+ """(Optional) Name of the vector store"""
diff --git a/src/llama_stack_client/types/vector_store_delete_response.py b/src/llama_stack_client/types/vector_store_delete_response.py
index 945ada10..29637547 100644
--- a/src/llama_stack_client/types/vector_store_delete_response.py
+++ b/src/llama_stack_client/types/vector_store_delete_response.py
@@ -7,7 +7,10 @@
class VectorStoreDeleteResponse(BaseModel):
id: str
+ """Unique identifier of the deleted vector store"""
deleted: bool
+ """Whether the deletion operation was successful"""
object: str
+ """Object type identifier for the deletion response"""
diff --git a/src/llama_stack_client/types/vector_store_search_params.py b/src/llama_stack_client/types/vector_store_search_params.py
index fdb02ff7..5a429b79 100644
--- a/src/llama_stack_client/types/vector_store_search_params.py
+++ b/src/llama_stack_client/types/vector_store_search_params.py
@@ -30,5 +30,7 @@ class VectorStoreSearchParams(TypedDict, total=False):
class RankingOptions(TypedDict, total=False):
ranker: str
+ """(Optional) Name of the ranking algorithm to use"""
score_threshold: float
+ """(Optional) Minimum relevance score threshold for results"""
diff --git a/src/llama_stack_client/types/vector_store_search_response.py b/src/llama_stack_client/types/vector_store_search_response.py
index 7b596e03..2f9a1076 100644
--- a/src/llama_stack_client/types/vector_store_search_response.py
+++ b/src/llama_stack_client/types/vector_store_search_response.py
@@ -10,29 +10,41 @@
class DataContent(BaseModel):
text: str
+ """The actual text content"""
type: Literal["text"]
+ """Content type, currently only "text" is supported"""
class Data(BaseModel):
content: List[DataContent]
+ """List of content items matching the search query"""
file_id: str
+ """Unique identifier of the file containing the result"""
filename: str
+ """Name of the file containing the result"""
score: float
+ """Relevance score for this search result"""
attributes: Optional[Dict[str, Union[str, float, bool]]] = None
+ """(Optional) Key-value attributes associated with the file"""
class VectorStoreSearchResponse(BaseModel):
data: List[Data]
+ """List of search result objects"""
has_more: bool
+ """Whether there are more results available beyond this page"""
object: str
+ """Object type identifier for the search results page"""
search_query: str
+ """The original search query that was executed"""
next_page: Optional[str] = None
+ """(Optional) Token for retrieving the next page of results"""
diff --git a/src/llama_stack_client/types/vector_stores/file_content_response.py b/src/llama_stack_client/types/vector_stores/file_content_response.py
index 987160e4..035a34a8 100644
--- a/src/llama_stack_client/types/vector_stores/file_content_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_content_response.py
@@ -10,15 +10,21 @@
class Content(BaseModel):
text: str
+ """The actual text content"""
type: Literal["text"]
+ """Content type, currently only "text" is supported"""
class FileContentResponse(BaseModel):
attributes: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Key-value attributes associated with the file"""
content: List[Content]
+ """List of content items from the file"""
file_id: str
+ """Unique identifier for the file"""
filename: str
+ """Name of the file"""
diff --git a/src/llama_stack_client/types/vector_stores/file_create_params.py b/src/llama_stack_client/types/vector_stores/file_create_params.py
index 66fbf624..a75716b3 100644
--- a/src/llama_stack_client/types/vector_stores/file_create_params.py
+++ b/src/llama_stack_client/types/vector_stores/file_create_params.py
@@ -27,18 +27,23 @@ class FileCreateParams(TypedDict, total=False):
class ChunkingStrategyVectorStoreChunkingStrategyAuto(TypedDict, total=False):
type: Required[Literal["auto"]]
+ """Strategy type, always "auto" for automatic chunking"""
class ChunkingStrategyVectorStoreChunkingStrategyStaticStatic(TypedDict, total=False):
chunk_overlap_tokens: Required[int]
+ """Number of tokens to overlap between adjacent chunks"""
max_chunk_size_tokens: Required[int]
+ """Maximum number of tokens per chunk, must be between 100 and 4096"""
class ChunkingStrategyVectorStoreChunkingStrategyStatic(TypedDict, total=False):
static: Required[ChunkingStrategyVectorStoreChunkingStrategyStaticStatic]
+ """Configuration parameters for the static chunking strategy"""
type: Required[Literal["static"]]
+ """Strategy type, always "static" for static chunking"""
ChunkingStrategy: TypeAlias = Union[
diff --git a/src/llama_stack_client/types/vector_stores/file_delete_response.py b/src/llama_stack_client/types/vector_stores/file_delete_response.py
index be90cec6..f24e1910 100644
--- a/src/llama_stack_client/types/vector_stores/file_delete_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_delete_response.py
@@ -7,7 +7,10 @@
class FileDeleteResponse(BaseModel):
id: str
+ """Unique identifier of the deleted file"""
deleted: bool
+ """Whether the deletion operation was successful"""
object: str
+ """Object type identifier for the deletion response"""
diff --git a/src/llama_stack_client/types/vector_stores/file_list_params.py b/src/llama_stack_client/types/vector_stores/file_list_params.py
index 3843cb3f..7174242d 100644
--- a/src/llama_stack_client/types/vector_stores/file_list_params.py
+++ b/src/llama_stack_client/types/vector_stores/file_list_params.py
@@ -9,11 +9,30 @@
class FileListParams(TypedDict, total=False):
after: str
+ """(Optional) A cursor for use in pagination.
+
+ `after` is an object ID that defines your place in the list.
+ """
before: str
+ """(Optional) A cursor for use in pagination.
+
+ `before` is an object ID that defines your place in the list.
+ """
filter: Literal["completed", "in_progress", "cancelled", "failed"]
+ """
+ (Optional) Filter by file status to only return files with the specified status.
+ """
limit: int
+ """(Optional) A limit on the number of objects to be returned.
+
+ Limit can range between 1 and 100, and the default is 20.
+ """
order: str
+ """(Optional) Sort order by the `created_at` timestamp of the objects.
+
+ `asc` for ascending order and `desc` for descending order.
+ """
diff --git a/src/llama_stack_client/types/vector_stores/file_list_response.py b/src/llama_stack_client/types/vector_stores/file_list_response.py
index d9f5f466..45ddc95f 100644
--- a/src/llama_stack_client/types/vector_stores/file_list_response.py
+++ b/src/llama_stack_client/types/vector_stores/file_list_response.py
@@ -10,11 +10,16 @@
class FileListResponse(BaseModel):
data: List[VectorStoreFile]
+ """List of vector store file objects"""
has_more: bool
+ """Whether there are more files available beyond this page"""
object: str
+ """Object type identifier, always "list" """
first_id: Optional[str] = None
+ """(Optional) ID of the first file in the list for pagination"""
last_id: Optional[str] = None
+ """(Optional) ID of the last file in the list for pagination"""
diff --git a/src/llama_stack_client/types/vector_stores/vector_store_file.py b/src/llama_stack_client/types/vector_stores/vector_store_file.py
index 45ce03f8..243a00df 100644
--- a/src/llama_stack_client/types/vector_stores/vector_store_file.py
+++ b/src/llama_stack_client/types/vector_stores/vector_store_file.py
@@ -18,18 +18,23 @@
class ChunkingStrategyVectorStoreChunkingStrategyAuto(BaseModel):
type: Literal["auto"]
+ """Strategy type, always "auto" for automatic chunking"""
class ChunkingStrategyVectorStoreChunkingStrategyStaticStatic(BaseModel):
chunk_overlap_tokens: int
+ """Number of tokens to overlap between adjacent chunks"""
max_chunk_size_tokens: int
+ """Maximum number of tokens per chunk, must be between 100 and 4096"""
class ChunkingStrategyVectorStoreChunkingStrategyStatic(BaseModel):
static: ChunkingStrategyVectorStoreChunkingStrategyStaticStatic
+ """Configuration parameters for the static chunking strategy"""
type: Literal["static"]
+ """Strategy type, always "static" for static chunking"""
ChunkingStrategy: TypeAlias = Annotated[
@@ -40,25 +45,36 @@ class ChunkingStrategyVectorStoreChunkingStrategyStatic(BaseModel):
class LastError(BaseModel):
code: Literal["server_error", "rate_limit_exceeded"]
+ """Error code indicating the type of failure"""
message: str
+ """Human-readable error message describing the failure"""
class VectorStoreFile(BaseModel):
id: str
+ """Unique identifier for the file"""
attributes: Dict[str, Union[bool, float, str, List[object], object, None]]
+ """Key-value attributes associated with the file"""
chunking_strategy: ChunkingStrategy
+ """Strategy used for splitting the file into chunks"""
created_at: int
+ """Timestamp when the file was added to the vector store"""
object: str
+ """Object type identifier, always "vector_store.file" """
status: Literal["completed", "in_progress", "cancelled", "failed"]
+ """Current processing status of the file"""
usage_bytes: int
+ """Storage space used by this file in bytes"""
vector_store_id: str
+ """ID of the vector store containing this file"""
last_error: Optional[LastError] = None
+ """(Optional) Error information if file processing failed"""
diff --git a/src/llama_stack_client/types/version_info.py b/src/llama_stack_client/types/version_info.py
index 5fc5bbb4..001d05cb 100644
--- a/src/llama_stack_client/types/version_info.py
+++ b/src/llama_stack_client/types/version_info.py
@@ -7,3 +7,4 @@
class VersionInfo(BaseModel):
version: str
+ """Version number of the service"""
From 8be3c73f68512f6e4ae0f2963d1619001635704f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 4 Aug 2025 21:06:14 +0000
Subject: [PATCH 098/102] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 611c42e2..d713b52d 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-bb6596edeb9aa753145023f1950a340bc1701d5339b3fe7ea5d949fe6518f2c9.yml
-openapi_spec_hash: 2602f83d69df2cbde50321d06fa9ac9b
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-569b5214f650a12131ef19db2720843271b9d8f3ac9dc0b4f2d641834459971c.yml
+openapi_spec_hash: 71aee95b81884d1e155a5b0d7672d0d1
config_hash: e6c3e48e220b264936ee6df8b996ab12
From c50a0e0ee44f97ee1ac8ac2a9e80860ae7b71a37 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 16:35:47 +0000
Subject: [PATCH 099/102] chore(internal): fix ruff target version
From 5f90b04bd0b07cc20729551b88578ff322231723 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 16:36:25 +0000
Subject: [PATCH 100/102] feat(api): update via SDK Studio
---
.stats.yml | 4 ++--
src/llama_stack_client/types/create_response.py | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index d713b52d..8be3e118 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-569b5214f650a12131ef19db2720843271b9d8f3ac9dc0b4f2d641834459971c.yml
-openapi_spec_hash: 71aee95b81884d1e155a5b0d7672d0d1
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-f59f1c7d33001d60b5190f68aa49eacec90f05dbe694620b8916152c3922051d.yml
+openapi_spec_hash: 804edd2e834493906dc430145402be3b
config_hash: e6c3e48e220b264936ee6df8b996ab12
diff --git a/src/llama_stack_client/types/create_response.py b/src/llama_stack_client/types/create_response.py
index fbb519f0..b0eaf3e5 100644
--- a/src/llama_stack_client/types/create_response.py
+++ b/src/llama_stack_client/types/create_response.py
@@ -22,7 +22,13 @@ class Result(BaseModel):
"""
category_scores: Optional[Dict[str, float]] = None
- """A list of the categories along with their scores as predicted by model."""
+ """A list of the categories along with their scores as predicted by model.
+
+ Required set of categories that need to be in response - violence -
+ violence/graphic - harassment - harassment/threatening - hate -
+ hate/threatening - illicit - illicit/violent - sexual - sexual/minors -
+ self-harm - self-harm/intent - self-harm/instructions
+ """
user_message: Optional[str] = None
From 9c693530330ad5e2bb427ccfeb154ac993601e05 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 17:08:29 +0000
Subject: [PATCH 101/102] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
api.md | 15 +-
src/llama_stack_client/_client.py | 9 +
src/llama_stack_client/resources/__init__.py | 14 ++
.../resources/moderations.py | 189 ++++++++++++++++++
src/llama_stack_client/resources/safety.py | 105 +---------
src/llama_stack_client/types/__init__.py | 2 +-
..._params.py => moderation_create_params.py} | 4 +-
tests/api_resources/test_moderations.py | 92 +++++++++
tests/api_resources/test_safety.py | 70 +------
10 files changed, 324 insertions(+), 178 deletions(-)
create mode 100644 src/llama_stack_client/resources/moderations.py
rename src/llama_stack_client/types/{safety_create_params.py => moderation_create_params.py} (84%)
create mode 100644 tests/api_resources/test_moderations.py
diff --git a/.stats.yml b/.stats.yml
index 8be3e118..bd77bef1 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-f59f1c7d33001d60b5190f68aa49eacec90f05dbe694620b8916152c3922051d.yml
openapi_spec_hash: 804edd2e834493906dc430145402be3b
-config_hash: e6c3e48e220b264936ee6df8b996ab12
+config_hash: de16e52db65de71ac35adcdb665a74f5
diff --git a/api.md b/api.md
index 01dd2924..e01851c1 100644
--- a/api.md
+++ b/api.md
@@ -453,17 +453,28 @@ Methods:
- client.routes.list() -> RouteListResponse
+# Moderations
+
+Types:
+
+```python
+from llama_stack_client.types import CreateResponse
+```
+
+Methods:
+
+- client.moderations.create(\*\*params) -> CreateResponse
+
# Safety
Types:
```python
-from llama_stack_client.types import CreateResponse, RunShieldResponse
+from llama_stack_client.types import RunShieldResponse
```
Methods:
-- client.safety.create(\*\*params) -> CreateResponse
- client.safety.run_shield(\*\*params) -> RunShieldResponse
# Shields
diff --git a/src/llama_stack_client/_client.py b/src/llama_stack_client/_client.py
index b2f7110e..a479a9b3 100644
--- a/src/llama_stack_client/_client.py
+++ b/src/llama_stack_client/_client.py
@@ -41,6 +41,7 @@
toolgroups,
vector_dbs,
completions,
+ moderations,
scoring_functions,
synthetic_data_generation,
)
@@ -91,6 +92,7 @@ class LlamaStackClient(SyncAPIClient):
post_training: post_training.PostTrainingResource
providers: providers.ProvidersResource
routes: routes.RoutesResource
+ moderations: moderations.ModerationsResource
safety: safety.SafetyResource
shields: shields.ShieldsResource
synthetic_data_generation: synthetic_data_generation.SyntheticDataGenerationResource
@@ -177,6 +179,7 @@ def __init__(
self.post_training = post_training.PostTrainingResource(self)
self.providers = providers.ProvidersResource(self)
self.routes = routes.RoutesResource(self)
+ self.moderations = moderations.ModerationsResource(self)
self.safety = safety.SafetyResource(self)
self.shields = shields.ShieldsResource(self)
self.synthetic_data_generation = synthetic_data_generation.SyntheticDataGenerationResource(self)
@@ -315,6 +318,7 @@ class AsyncLlamaStackClient(AsyncAPIClient):
post_training: post_training.AsyncPostTrainingResource
providers: providers.AsyncProvidersResource
routes: routes.AsyncRoutesResource
+ moderations: moderations.AsyncModerationsResource
safety: safety.AsyncSafetyResource
shields: shields.AsyncShieldsResource
synthetic_data_generation: synthetic_data_generation.AsyncSyntheticDataGenerationResource
@@ -401,6 +405,7 @@ def __init__(
self.post_training = post_training.AsyncPostTrainingResource(self)
self.providers = providers.AsyncProvidersResource(self)
self.routes = routes.AsyncRoutesResource(self)
+ self.moderations = moderations.AsyncModerationsResource(self)
self.safety = safety.AsyncSafetyResource(self)
self.shields = shields.AsyncShieldsResource(self)
self.synthetic_data_generation = synthetic_data_generation.AsyncSyntheticDataGenerationResource(self)
@@ -540,6 +545,7 @@ def __init__(self, client: LlamaStackClient) -> None:
self.post_training = post_training.PostTrainingResourceWithRawResponse(client.post_training)
self.providers = providers.ProvidersResourceWithRawResponse(client.providers)
self.routes = routes.RoutesResourceWithRawResponse(client.routes)
+ self.moderations = moderations.ModerationsResourceWithRawResponse(client.moderations)
self.safety = safety.SafetyResourceWithRawResponse(client.safety)
self.shields = shields.ShieldsResourceWithRawResponse(client.shields)
self.synthetic_data_generation = synthetic_data_generation.SyntheticDataGenerationResourceWithRawResponse(
@@ -573,6 +579,7 @@ def __init__(self, client: AsyncLlamaStackClient) -> None:
self.post_training = post_training.AsyncPostTrainingResourceWithRawResponse(client.post_training)
self.providers = providers.AsyncProvidersResourceWithRawResponse(client.providers)
self.routes = routes.AsyncRoutesResourceWithRawResponse(client.routes)
+ self.moderations = moderations.AsyncModerationsResourceWithRawResponse(client.moderations)
self.safety = safety.AsyncSafetyResourceWithRawResponse(client.safety)
self.shields = shields.AsyncShieldsResourceWithRawResponse(client.shields)
self.synthetic_data_generation = synthetic_data_generation.AsyncSyntheticDataGenerationResourceWithRawResponse(
@@ -608,6 +615,7 @@ def __init__(self, client: LlamaStackClient) -> None:
self.post_training = post_training.PostTrainingResourceWithStreamingResponse(client.post_training)
self.providers = providers.ProvidersResourceWithStreamingResponse(client.providers)
self.routes = routes.RoutesResourceWithStreamingResponse(client.routes)
+ self.moderations = moderations.ModerationsResourceWithStreamingResponse(client.moderations)
self.safety = safety.SafetyResourceWithStreamingResponse(client.safety)
self.shields = shields.ShieldsResourceWithStreamingResponse(client.shields)
self.synthetic_data_generation = synthetic_data_generation.SyntheticDataGenerationResourceWithStreamingResponse(
@@ -643,6 +651,7 @@ def __init__(self, client: AsyncLlamaStackClient) -> None:
self.post_training = post_training.AsyncPostTrainingResourceWithStreamingResponse(client.post_training)
self.providers = providers.AsyncProvidersResourceWithStreamingResponse(client.providers)
self.routes = routes.AsyncRoutesResourceWithStreamingResponse(client.routes)
+ self.moderations = moderations.AsyncModerationsResourceWithStreamingResponse(client.moderations)
self.safety = safety.AsyncSafetyResourceWithStreamingResponse(client.safety)
self.shields = shields.AsyncShieldsResourceWithStreamingResponse(client.shields)
self.synthetic_data_generation = (
diff --git a/src/llama_stack_client/resources/__init__.py b/src/llama_stack_client/resources/__init__.py
index 23f61be1..01e17f57 100644
--- a/src/llama_stack_client/resources/__init__.py
+++ b/src/llama_stack_client/resources/__init__.py
@@ -176,6 +176,14 @@
CompletionsResourceWithStreamingResponse,
AsyncCompletionsResourceWithStreamingResponse,
)
+from .moderations import (
+ ModerationsResource,
+ AsyncModerationsResource,
+ ModerationsResourceWithRawResponse,
+ AsyncModerationsResourceWithRawResponse,
+ ModerationsResourceWithStreamingResponse,
+ AsyncModerationsResourceWithStreamingResponse,
+)
from .tool_runtime import (
ToolRuntimeResource,
AsyncToolRuntimeResource,
@@ -332,6 +340,12 @@
"AsyncRoutesResourceWithRawResponse",
"RoutesResourceWithStreamingResponse",
"AsyncRoutesResourceWithStreamingResponse",
+ "ModerationsResource",
+ "AsyncModerationsResource",
+ "ModerationsResourceWithRawResponse",
+ "AsyncModerationsResourceWithRawResponse",
+ "ModerationsResourceWithStreamingResponse",
+ "AsyncModerationsResourceWithStreamingResponse",
"SafetyResource",
"AsyncSafetyResource",
"SafetyResourceWithRawResponse",
diff --git a/src/llama_stack_client/resources/moderations.py b/src/llama_stack_client/resources/moderations.py
new file mode 100644
index 00000000..165f3ce3
--- /dev/null
+++ b/src/llama_stack_client/resources/moderations.py
@@ -0,0 +1,189 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+
+import httpx
+
+from ..types import moderation_create_params
+from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from .._utils import maybe_transform, async_maybe_transform
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from .._base_client import make_request_options
+from ..types.create_response import CreateResponse
+
+__all__ = ["ModerationsResource", "AsyncModerationsResource"]
+
+
+class ModerationsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> ModerationsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/llamastack/llama-stack-client-python#accessing-raw-response-data-eg-headers
+ """
+ return ModerationsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> ModerationsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/llamastack/llama-stack-client-python#with_streaming_response
+ """
+ return ModerationsResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> CreateResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/v1/openai/v1/moderations",
+ body=maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ moderation_create_params.ModerationCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CreateResponse,
+ )
+
+
+class AsyncModerationsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncModerationsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/llamastack/llama-stack-client-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncModerationsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncModerationsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/llamastack/llama-stack-client-python#with_streaming_response
+ """
+ return AsyncModerationsResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ input: Union[str, List[str]],
+ model: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> CreateResponse:
+ """
+ Classifies if text and/or image inputs are potentially harmful.
+
+ Args:
+ input: Input (or inputs) to classify. Can be a single string, an array of strings, or
+ an array of multi-modal input objects similar to other models.
+
+ model: The content moderation model you would like to use.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/v1/openai/v1/moderations",
+ body=await async_maybe_transform(
+ {
+ "input": input,
+ "model": model,
+ },
+ moderation_create_params.ModerationCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CreateResponse,
+ )
+
+
+class ModerationsResourceWithRawResponse:
+ def __init__(self, moderations: ModerationsResource) -> None:
+ self._moderations = moderations
+
+ self.create = to_raw_response_wrapper(
+ moderations.create,
+ )
+
+
+class AsyncModerationsResourceWithRawResponse:
+ def __init__(self, moderations: AsyncModerationsResource) -> None:
+ self._moderations = moderations
+
+ self.create = async_to_raw_response_wrapper(
+ moderations.create,
+ )
+
+
+class ModerationsResourceWithStreamingResponse:
+ def __init__(self, moderations: ModerationsResource) -> None:
+ self._moderations = moderations
+
+ self.create = to_streamed_response_wrapper(
+ moderations.create,
+ )
+
+
+class AsyncModerationsResourceWithStreamingResponse:
+ def __init__(self, moderations: AsyncModerationsResource) -> None:
+ self._moderations = moderations
+
+ self.create = async_to_streamed_response_wrapper(
+ moderations.create,
+ )
diff --git a/src/llama_stack_client/resources/safety.py b/src/llama_stack_client/resources/safety.py
index 114f2b76..813a1f67 100644
--- a/src/llama_stack_client/resources/safety.py
+++ b/src/llama_stack_client/resources/safety.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable
+from typing import Dict, Union, Iterable
import httpx
-from ..types import safety_create_params, safety_run_shield_params
+from ..types import safety_run_shield_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -18,7 +18,6 @@
async_to_streamed_response_wrapper,
)
from .._base_client import make_request_options
-from ..types.create_response import CreateResponse
from ..types.run_shield_response import RunShieldResponse
from ..types.shared_params.message import Message
@@ -45,50 +44,6 @@ def with_streaming_response(self) -> SafetyResourceWithStreamingResponse:
"""
return SafetyResourceWithStreamingResponse(self)
- def create(
- self,
- *,
- input: Union[str, List[str]],
- model: str,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CreateResponse:
- """
- Classifies if text and/or image inputs are potentially harmful.
-
- Args:
- input: Input (or inputs) to classify. Can be a single string, an array of strings, or
- an array of multi-modal input objects similar to other models.
-
- model: The content moderation model you would like to use.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._post(
- "/v1/openai/v1/moderations",
- body=maybe_transform(
- {
- "input": input,
- "model": model,
- },
- safety_create_params.SafetyCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CreateResponse,
- )
-
def run_shield(
self,
*,
@@ -157,50 +112,6 @@ def with_streaming_response(self) -> AsyncSafetyResourceWithStreamingResponse:
"""
return AsyncSafetyResourceWithStreamingResponse(self)
- async def create(
- self,
- *,
- input: Union[str, List[str]],
- model: str,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CreateResponse:
- """
- Classifies if text and/or image inputs are potentially harmful.
-
- Args:
- input: Input (or inputs) to classify. Can be a single string, an array of strings, or
- an array of multi-modal input objects similar to other models.
-
- model: The content moderation model you would like to use.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return await self._post(
- "/v1/openai/v1/moderations",
- body=await async_maybe_transform(
- {
- "input": input,
- "model": model,
- },
- safety_create_params.SafetyCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CreateResponse,
- )
-
async def run_shield(
self,
*,
@@ -253,9 +164,6 @@ class SafetyResourceWithRawResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.create = to_raw_response_wrapper(
- safety.create,
- )
self.run_shield = to_raw_response_wrapper(
safety.run_shield,
)
@@ -265,9 +173,6 @@ class AsyncSafetyResourceWithRawResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.create = async_to_raw_response_wrapper(
- safety.create,
- )
self.run_shield = async_to_raw_response_wrapper(
safety.run_shield,
)
@@ -277,9 +182,6 @@ class SafetyResourceWithStreamingResponse:
def __init__(self, safety: SafetyResource) -> None:
self._safety = safety
- self.create = to_streamed_response_wrapper(
- safety.create,
- )
self.run_shield = to_streamed_response_wrapper(
safety.run_shield,
)
@@ -289,9 +191,6 @@ class AsyncSafetyResourceWithStreamingResponse:
def __init__(self, safety: AsyncSafetyResource) -> None:
self._safety = safety
- self.create = async_to_streamed_response_wrapper(
- safety.create,
- )
self.run_shield = async_to_streamed_response_wrapper(
safety.run_shield,
)
diff --git a/src/llama_stack_client/types/__init__.py b/src/llama_stack_client/types/__init__.py
index 1146a4e2..887f1706 100644
--- a/src/llama_stack_client/types/__init__.py
+++ b/src/llama_stack_client/types/__init__.py
@@ -78,7 +78,6 @@
from .list_routes_response import ListRoutesResponse as ListRoutesResponse
from .query_spans_response import QuerySpansResponse as QuerySpansResponse
from .response_list_params import ResponseListParams as ResponseListParams
-from .safety_create_params import SafetyCreateParams as SafetyCreateParams
from .scoring_score_params import ScoringScoreParams as ScoringScoreParams
from .shield_list_response import ShieldListResponse as ShieldListResponse
from .agent_create_response import AgentCreateResponse as AgentCreateResponse
@@ -113,6 +112,7 @@
from .completion_create_params import CompletionCreateParams as CompletionCreateParams
from .list_benchmarks_response import ListBenchmarksResponse as ListBenchmarksResponse
from .list_vector_dbs_response import ListVectorDBsResponse as ListVectorDBsResponse
+from .moderation_create_params import ModerationCreateParams as ModerationCreateParams
from .safety_run_shield_params import SafetyRunShieldParams as SafetyRunShieldParams
from .vector_store_list_params import VectorStoreListParams as VectorStoreListParams
from .benchmark_register_params import BenchmarkRegisterParams as BenchmarkRegisterParams
diff --git a/src/llama_stack_client/types/safety_create_params.py b/src/llama_stack_client/types/moderation_create_params.py
similarity index 84%
rename from src/llama_stack_client/types/safety_create_params.py
rename to src/llama_stack_client/types/moderation_create_params.py
index 76d7e8c9..61f7bc1b 100644
--- a/src/llama_stack_client/types/safety_create_params.py
+++ b/src/llama_stack_client/types/moderation_create_params.py
@@ -5,10 +5,10 @@
from typing import List, Union
from typing_extensions import Required, TypedDict
-__all__ = ["SafetyCreateParams"]
+__all__ = ["ModerationCreateParams"]
-class SafetyCreateParams(TypedDict, total=False):
+class ModerationCreateParams(TypedDict, total=False):
input: Required[Union[str, List[str]]]
"""Input (or inputs) to classify.
diff --git a/tests/api_resources/test_moderations.py b/tests/api_resources/test_moderations.py
new file mode 100644
index 00000000..cbc77db1
--- /dev/null
+++ b/tests/api_resources/test_moderations.py
@@ -0,0 +1,92 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from tests.utils import assert_matches_type
+from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
+from llama_stack_client.types import CreateResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestModerations:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: LlamaStackClient) -> None:
+ moderation = client.moderations.create(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: LlamaStackClient) -> None:
+ response = client.moderations.with_raw_response.create(
+ input="string",
+ model="model",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ moderation = response.parse()
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: LlamaStackClient) -> None:
+ with client.moderations.with_streaming_response.create(
+ input="string",
+ model="model",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ moderation = response.parse()
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncModerations:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
+ moderation = await async_client.moderations.create(
+ input="string",
+ model="model",
+ )
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ response = await async_client.moderations.with_raw_response.create(
+ input="string",
+ model="model",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ moderation = await response.parse()
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
+ async with async_client.moderations.with_streaming_response.create(
+ input="string",
+ model="model",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ moderation = await response.parse()
+ assert_matches_type(CreateResponse, moderation, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_safety.py b/tests/api_resources/test_safety.py
index 94fe0110..257dfd76 100644
--- a/tests/api_resources/test_safety.py
+++ b/tests/api_resources/test_safety.py
@@ -9,7 +9,7 @@
from tests.utils import assert_matches_type
from llama_stack_client import LlamaStackClient, AsyncLlamaStackClient
-from llama_stack_client.types import CreateResponse, RunShieldResponse
+from llama_stack_client.types import RunShieldResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -17,40 +17,6 @@
class TestSafety:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
- @parametrize
- def test_method_create(self, client: LlamaStackClient) -> None:
- safety = client.safety.create(
- input="string",
- model="model",
- )
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- @parametrize
- def test_raw_response_create(self, client: LlamaStackClient) -> None:
- response = client.safety.with_raw_response.create(
- input="string",
- model="model",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- safety = response.parse()
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- @parametrize
- def test_streaming_response_create(self, client: LlamaStackClient) -> None:
- with client.safety.with_streaming_response.create(
- input="string",
- model="model",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- safety = response.parse()
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@parametrize
def test_method_run_shield(self, client: LlamaStackClient) -> None:
safety = client.safety.run_shield(
@@ -109,40 +75,6 @@ class TestAsyncSafety:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
- @parametrize
- async def test_method_create(self, async_client: AsyncLlamaStackClient) -> None:
- safety = await async_client.safety.create(
- input="string",
- model="model",
- )
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- response = await async_client.safety.with_raw_response.create(
- input="string",
- model="model",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- safety = await response.parse()
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncLlamaStackClient) -> None:
- async with async_client.safety.with_streaming_response.create(
- input="string",
- model="model",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- safety = await response.parse()
- assert_matches_type(CreateResponse, safety, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
@parametrize
async def test_method_run_shield(self, async_client: AsyncLlamaStackClient) -> None:
safety = await async_client.safety.run_shield(
From 5035f20a00e95d8dc5020326a5cc2e10067a345c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 6 Aug 2025 17:26:57 +0000
Subject: [PATCH 102/102] release: 0.2.17
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 124 ++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+), 1 deletion(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index faf409dd..ca1d94e3 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.15"
+ ".": "0.2.17"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 587420a7..888d369a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,129 @@
# Changelog
+## 0.2.17 (2025-08-06)
+
+Full Changelog: [v0.2.15...v0.2.17](https://github.com/llamastack/llama-stack-client-python/compare/v0.2.15...v0.2.17)
+
+### Features
+
+* **api:** update via SDK Studio ([9c69353](https://github.com/llamastack/llama-stack-client-python/commit/9c693530330ad5e2bb427ccfeb154ac993601e05))
+* **api:** update via SDK Studio ([5f90b04](https://github.com/llamastack/llama-stack-client-python/commit/5f90b04bd0b07cc20729551b88578ff322231723))
+* **api:** update via SDK Studio ([6e26309](https://github.com/llamastack/llama-stack-client-python/commit/6e26309d14cb0b0a0b5d43b7cbab56528b878fd9))
+* **api:** update via SDK Studio ([54ff3c4](https://github.com/llamastack/llama-stack-client-python/commit/54ff3c405af01ce068230990654b75d26967e745))
+* **api:** update via SDK Studio ([a34c823](https://github.com/llamastack/llama-stack-client-python/commit/a34c8230f8a3f6f356c4f990f66bb02eda229819))
+* **api:** update via SDK Studio ([f6b80ca](https://github.com/llamastack/llama-stack-client-python/commit/f6b80caaad58711957b7935f9b6833528ae3bd78))
+* **api:** update via SDK Studio ([2a4296d](https://github.com/llamastack/llama-stack-client-python/commit/2a4296d3df60787b4fc3fe2812d06d6080b0d6db))
+* **api:** update via SDK Studio ([07691ac](https://github.com/llamastack/llama-stack-client-python/commit/07691acac571ff68cd1ff90f9d60ac3e49b1e144))
+* **api:** update via SDK Studio ([585f9ce](https://github.com/llamastack/llama-stack-client-python/commit/585f9ce929e0ac17775febb573fa109d9f3d07ac))
+* **api:** update via SDK Studio ([6d609e3](https://github.com/llamastack/llama-stack-client-python/commit/6d609e3b9e31477fd540dff8c0ecb24bc9d524d1))
+* **api:** update via SDK Studio ([3dbf2a4](https://github.com/llamastack/llama-stack-client-python/commit/3dbf2a4f205d7199cd4d92a7f3f6a2ee5723cb71))
+* **api:** update via SDK Studio ([dd0ae96](https://github.com/llamastack/llama-stack-client-python/commit/dd0ae96300ce6d2940063a7b33c0948d250bbc5e))
+* **api:** update via SDK Studio ([80a2969](https://github.com/llamastack/llama-stack-client-python/commit/80a296977917382fa42b0def0c6bf1a66be45780))
+* **api:** update via SDK Studio ([748e6db](https://github.com/llamastack/llama-stack-client-python/commit/748e6db5002f1ec2c8880414b803d1cfc3ff95ea))
+* **api:** update via SDK Studio ([b6fa2b1](https://github.com/llamastack/llama-stack-client-python/commit/b6fa2b194bc4d66adcc40b5cc07404c45a211cd3))
+* **api:** update via SDK Studio ([e97f870](https://github.com/llamastack/llama-stack-client-python/commit/e97f870b037685af1e65d8d895a063ab2381dc81))
+* **api:** update via SDK Studio ([489b54d](https://github.com/llamastack/llama-stack-client-python/commit/489b54d7acfee41874e2fa253578d3e95f6b111a))
+* **api:** update via SDK Studio ([13cfa4a](https://github.com/llamastack/llama-stack-client-python/commit/13cfa4aa1f12b7369f1bc13c3dff8d4cea46a3f6))
+* **api:** update via SDK Studio ([25c1e49](https://github.com/llamastack/llama-stack-client-python/commit/25c1e49f503e15649e0cdc18b0ac8dd00c2dff7e))
+* **api:** update via SDK Studio ([4a54d61](https://github.com/llamastack/llama-stack-client-python/commit/4a54d613ee0a7ff7a561bc41db626aaea3c00096))
+* **api:** update via SDK Studio ([ac4614a](https://github.com/llamastack/llama-stack-client-python/commit/ac4614a70aa632a7bc55037aa777f0ab40ea908b))
+* **api:** update via SDK Studio ([a201e22](https://github.com/llamastack/llama-stack-client-python/commit/a201e22e2bad1b2290092784d4e2255eaaf73758))
+* **client:** support file upload requests ([e84459f](https://github.com/llamastack/llama-stack-client-python/commit/e84459fc65a28e68ed185d6dba28b559e6882b99))
+* **client:** support file upload requests ([6c73da7](https://github.com/llamastack/llama-stack-client-python/commit/6c73da7c97a558468296f1e8d6da5ba7ae9ea1c4))
+
+
+### Bug Fixes
+
+* **ci:** correct conditional ([d7c2ab8](https://github.com/llamastack/llama-stack-client-python/commit/d7c2ab87065aaade14a143113c90a0082ef35ee4))
+* **ci:** correct conditional ([4368fbd](https://github.com/llamastack/llama-stack-client-python/commit/4368fbd1f733cfda7a2d4273f0c983e44be63fe1))
+* **client:** don't send Content-Type header on GET requests ([d6a80a5](https://github.com/llamastack/llama-stack-client-python/commit/d6a80a5c38305c63494a9f8498e47ba0c0031295))
+* **client:** don't send Content-Type header on GET requests ([c6e0026](https://github.com/llamastack/llama-stack-client-python/commit/c6e0026218d4fde46e23663b55384bdf417fbcbf))
+* helptext for 'inspect version' and 'providers inspect' ([#8](https://github.com/llamastack/llama-stack-client-python/issues/8)) ([d79345e](https://github.com/llamastack/llama-stack-client-python/commit/d79345e42d6a3f3b828396b1ac00e2ecf196c0eb))
+* kill requirements.txt ([a6bd44c](https://github.com/llamastack/llama-stack-client-python/commit/a6bd44c5bdb9415a8cacd53b552b8b43e341d91c))
+* model register missing model-type and not accepting metadata ([#11](https://github.com/llamastack/llama-stack-client-python/issues/11)) ([f3f4515](https://github.com/llamastack/llama-stack-client-python/commit/f3f45155864379f227824d00f6febb1b46ed4839))
+* **parsing:** correctly handle nested discriminated unions ([9f95130](https://github.com/llamastack/llama-stack-client-python/commit/9f95130b77729d2adcf906355ddef41d109999d0))
+* **parsing:** correctly handle nested discriminated unions ([8b7e9ba](https://github.com/llamastack/llama-stack-client-python/commit/8b7e9ba42dbafb89d765f870d7874c86f47b2e7b))
+* **parsing:** ignore empty metadata ([a8a398f](https://github.com/llamastack/llama-stack-client-python/commit/a8a398fb7ca67117d3b7663354a406d1432fd8fb))
+* **parsing:** ignore empty metadata ([264f24c](https://github.com/llamastack/llama-stack-client-python/commit/264f24c9c564a0a5ea862418bfebb6c3cad01cf0))
+* **parsing:** parse extra field types ([f981bdc](https://github.com/llamastack/llama-stack-client-python/commit/f981bdc927411cb3b69febd578d39299dac27670))
+* **parsing:** parse extra field types ([d54c5db](https://github.com/llamastack/llama-stack-client-python/commit/d54c5db3df7b6e5dca66e8e7c855998c67d03250))
+* pre-commit formatting ([a83b1c3](https://github.com/llamastack/llama-stack-client-python/commit/a83b1c36b8acff7d7f762d0eab9d832a3320bcce))
+* update agent event logger ([#10](https://github.com/llamastack/llama-stack-client-python/issues/10)) ([0a10b70](https://github.com/llamastack/llama-stack-client-python/commit/0a10b70f91f28f533710433ae860789f2cb0f70f))
+
+
+### Chores
+
+* **ci:** change upload type ([7827103](https://github.com/llamastack/llama-stack-client-python/commit/78271038dcd35ea78fc2addf0676c4cdbea07a0e))
+* **ci:** change upload type ([5febc13](https://github.com/llamastack/llama-stack-client-python/commit/5febc136956ce6ac5af8e638a6fa430a9d0f3dc3))
+* **ci:** only run for pushes and fork pull requests ([03a7636](https://github.com/llamastack/llama-stack-client-python/commit/03a7636bce1974ef9be709cd6df395d687f0f22b))
+* **ci:** only run for pushes and fork pull requests ([c05df66](https://github.com/llamastack/llama-stack-client-python/commit/c05df6620f31a4860e11c5b94b3d7bf85fc9d197))
+* **ci:** only run for pushes and fork pull requests ([87c9d01](https://github.com/llamastack/llama-stack-client-python/commit/87c9d01fd4f8451882e1b936ba43375e20a56622))
+* **ci:** only run for pushes and fork pull requests ([9d04993](https://github.com/llamastack/llama-stack-client-python/commit/9d04993f6cc133f6ea6ca943d14a59e9b309938a))
+* **ci:** only run for pushes and fork pull requests ([4da7f49](https://github.com/llamastack/llama-stack-client-python/commit/4da7f495eb06d0cb386deeef3825c4876c64cbe2))
+* **ci:** only run for pushes and fork pull requests ([8b37cd3](https://github.com/llamastack/llama-stack-client-python/commit/8b37cd35c06ba045c25be9f6777b854bd9d9dbf8))
+* **ci:** only run for pushes and fork pull requests ([3f0a4b9](https://github.com/llamastack/llama-stack-client-python/commit/3f0a4b9ba82bd9db5ae9f854a2a775781eb75fd0))
+* **ci:** only run for pushes and fork pull requests ([8a1efad](https://github.com/llamastack/llama-stack-client-python/commit/8a1efade982126d1742c912069321ce7bd267bd8))
+* delete unused scripts based on rye ([dae6506](https://github.com/llamastack/llama-stack-client-python/commit/dae65069d31bc4d3e55c15f3f1848d00c35a75ce))
+* **internal:** bump pinned h11 dep ([4a7073f](https://github.com/llamastack/llama-stack-client-python/commit/4a7073f0e60aea8a2b7ec6d72b31fc9554234ef0))
+* **internal:** bump pinned h11 dep ([0568d6d](https://github.com/llamastack/llama-stack-client-python/commit/0568d6d078eab8f65ac191218d6467df9bfa7901))
+* **internal:** codegen related update ([4d4afec](https://github.com/llamastack/llama-stack-client-python/commit/4d4afec936a1e6b2f0bf96a5508fb54620c894e4))
+* **internal:** codegen related update ([7cd543f](https://github.com/llamastack/llama-stack-client-python/commit/7cd543f782490fe6ed5a90474114c1ef084a8b34))
+* **internal:** codegen related update ([3165cad](https://github.com/llamastack/llama-stack-client-python/commit/3165cad3251782f4bfe529d9bdde1f18b5813fc0))
+* **internal:** codegen related update ([c27a701](https://github.com/llamastack/llama-stack-client-python/commit/c27a7015e1627582e00de6c4f6cbc9df9da99c54))
+* **internal:** codegen related update ([aa45ba3](https://github.com/llamastack/llama-stack-client-python/commit/aa45ba35f7107e6278c45134f6130ffaf99eb20e))
+* **internal:** codegen related update ([5d6ccb5](https://github.com/llamastack/llama-stack-client-python/commit/5d6ccb56adf0cdeafd2d027ba2f897fd2f5c7070))
+* **internal:** fix ruff target version ([c50a0e0](https://github.com/llamastack/llama-stack-client-python/commit/c50a0e0ee44f97ee1ac8ac2a9e80860ae7b71a37))
+* **internal:** version bump ([5af7869](https://github.com/llamastack/llama-stack-client-python/commit/5af7869be75f6e577c57509c11e55a6dbbcdc4d8))
+* **internal:** version bump ([148be8d](https://github.com/llamastack/llama-stack-client-python/commit/148be8d37f92a77e553edd599ad4a5981642b40c))
+* **internal:** version bump ([86a0766](https://github.com/llamastack/llama-stack-client-python/commit/86a0766da6a2e282a2185b42530266aaa4c1a9ce))
+* **internal:** version bump ([5d6cc6b](https://github.com/llamastack/llama-stack-client-python/commit/5d6cc6be97ca098140575e65803d3d51ddc1e9ea))
+* **internal:** version bump ([cc7a519](https://github.com/llamastack/llama-stack-client-python/commit/cc7a51927110f8f4ef7309b9f6c92ace0434b24e))
+* **internal:** version bump ([8f15ef0](https://github.com/llamastack/llama-stack-client-python/commit/8f15ef01b12c88af245e477362f86785586b697f))
+* **internal:** version bump ([f52cb89](https://github.com/llamastack/llama-stack-client-python/commit/f52cb89e8a8d2e2b41155b6b5db2e700d85fcc29))
+* **internal:** version bump ([2e1a629](https://github.com/llamastack/llama-stack-client-python/commit/2e1a629e8d24c37031d8d853ec5e3d9200952934))
+* **internal:** version bump ([da26ed0](https://github.com/llamastack/llama-stack-client-python/commit/da26ed01f5ad7ff77d0b2166a0c282806a6d1aff))
+* **internal:** version bump ([3727fa5](https://github.com/llamastack/llama-stack-client-python/commit/3727fa5703c3e6cfc38fc963650cee1af23c6d68))
+* **internal:** version bump ([443ce02](https://github.com/llamastack/llama-stack-client-python/commit/443ce023733e06e1a83920727630ad4442aa2104))
+* **internal:** version bump ([b2875ec](https://github.com/llamastack/llama-stack-client-python/commit/b2875ecbe69976ccaeeafb7b6216b711a0214edb))
+* **internal:** version bump ([9a4320d](https://github.com/llamastack/llama-stack-client-python/commit/9a4320d7a4a81412a8657f23a9b8e3331770951a))
+* **internal:** version bump ([39155e5](https://github.com/llamastack/llama-stack-client-python/commit/39155e53bff8e0255b5c62e7aa3e9b801c719f96))
+* **internal:** version bump ([607c7be](https://github.com/llamastack/llama-stack-client-python/commit/607c7bea3d8e24d12069fa8a496380319badd71c))
+* **internal:** version bump ([62901e7](https://github.com/llamastack/llama-stack-client-python/commit/62901e7b3bb26956f28b2443508d59ab6bc926b4))
+* **internal:** version bump ([4132af9](https://github.com/llamastack/llama-stack-client-python/commit/4132af981fe9d59864c6f2d23258c893200355c1))
+* **internal:** version bump ([e6ae920](https://github.com/llamastack/llama-stack-client-python/commit/e6ae920385cf6a92f1f0623428a61e0325521e67))
+* **internal:** version bump ([96768dc](https://github.com/llamastack/llama-stack-client-python/commit/96768dc3db60936a960a9a46b9597df292a9e85e))
+* **internal:** version bump ([74f7eda](https://github.com/llamastack/llama-stack-client-python/commit/74f7eda7bf4a5d024bdeaf36a0f228d610134530))
+* **internal:** version bump ([d59862a](https://github.com/llamastack/llama-stack-client-python/commit/d59862a1bca2d31bf0f6cd0138bf2a1d804aad9d))
+* **internal:** version bump ([ce98414](https://github.com/llamastack/llama-stack-client-python/commit/ce98414b294a451ac67b9fcee045f28ecce7b408))
+* **internal:** version bump ([9746774](https://github.com/llamastack/llama-stack-client-python/commit/9746774316aed9a04b5ee161452df14e88f3e62c))
+* **internal:** version bump ([6114dbf](https://github.com/llamastack/llama-stack-client-python/commit/6114dbf530354a56539a16a49a7c314bf643fca7))
+* **internal:** version bump ([02c9953](https://github.com/llamastack/llama-stack-client-python/commit/02c9953a78c22d447d5a93b901a2684cce25ee3d))
+* **internal:** version bump ([16f2953](https://github.com/llamastack/llama-stack-client-python/commit/16f2953d3292c3787e28f5178d1d149d6c808258))
+* **internal:** version bump ([c32029b](https://github.com/llamastack/llama-stack-client-python/commit/c32029b26c4e10bba8378cbb61d6b2d7e6c3d10d))
+* **internal:** version bump ([aef5dee](https://github.com/llamastack/llama-stack-client-python/commit/aef5dee81270b6372479fbeb2257d42f487dfcf3))
+* **internal:** version bump ([590de6d](https://github.com/llamastack/llama-stack-client-python/commit/590de6d2ac748199b489c00fe8f79d9f8111a283))
+* **internal:** version bump ([072269f](https://github.com/llamastack/llama-stack-client-python/commit/072269f0c2421313a1ba7a9feb372a72cc5f5f0f))
+* **internal:** version bump ([eee6f0b](https://github.com/llamastack/llama-stack-client-python/commit/eee6f0b5cd146fc962d13da371e09e5abd66f05e))
+* **internal:** version bump ([e6a964e](https://github.com/llamastack/llama-stack-client-python/commit/e6a964e9970e5d4bbd9f3bb9dae959ce6488b3bf))
+* **package:** mark python 3.13 as supported ([2afc17b](https://github.com/llamastack/llama-stack-client-python/commit/2afc17ba76b498f6f0c975111bfd9456090d10b5))
+* **package:** mark python 3.13 as supported ([d1a4e40](https://github.com/llamastack/llama-stack-client-python/commit/d1a4e40ba6a6d1b0ecf7b84cff55a79a6c00b925))
+* **project:** add settings file for vscode ([405febd](https://github.com/llamastack/llama-stack-client-python/commit/405febd7158db4c129c854293a735c8c71712bc5))
+* **project:** add settings file for vscode ([1dd3e53](https://github.com/llamastack/llama-stack-client-python/commit/1dd3e5310f668e81d246f929e2bd6b216a4ac9ad))
+* **readme:** fix version rendering on pypi ([ca89c7f](https://github.com/llamastack/llama-stack-client-python/commit/ca89c7fb2e09ef52565f7de34068b3b4bbb575dc))
+* **readme:** fix version rendering on pypi ([193fb64](https://github.com/llamastack/llama-stack-client-python/commit/193fb64864ce57e9a488d9ee874cededeaad1eae))
+* update SDK settings ([2d422f9](https://github.com/llamastack/llama-stack-client-python/commit/2d422f92ee95364dc67c6557beafccde42ea11eb))
+* update SDK settings ([59b933c](https://github.com/llamastack/llama-stack-client-python/commit/59b933ca39e08b9a36669995b3b5424231df84f5))
+* update version ([10ef53e](https://github.com/llamastack/llama-stack-client-python/commit/10ef53e74dbdd72a8dd829957820e61522fbe6ad))
+
+
+### Build System
+
+* Bump version to 0.2.14 ([745a94e](https://github.com/llamastack/llama-stack-client-python/commit/745a94e1d2875c8e7b4fac5b1676b890aebf4915))
+* Bump version to 0.2.15 ([8700dc6](https://github.com/llamastack/llama-stack-client-python/commit/8700dc6ed9411d436422ee94af2702f10a96b49e))
+* Bump version to 0.2.15 ([4692024](https://github.com/llamastack/llama-stack-client-python/commit/46920241be5f8b921bbba367e65a7afa3aefd612))
+* Bump version to 0.2.16 ([6ce9b84](https://github.com/llamastack/llama-stack-client-python/commit/6ce9b84007967702f6844679604e1b812df864e4))
+* Bump version to 0.2.17 ([69f67ef](https://github.com/llamastack/llama-stack-client-python/commit/69f67ef77c9ca6ffc089a6d24261272aa2fee36f))
+
## 0.1.0-alpha.4 (2025-06-27)
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/llamastack/llama-stack-client-python/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)