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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0-alpha.9"
".": "0.4.0-alpha.10"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-2b99a80543f8bc8fa164167693c214651ac8e710f4726fb5869183b4d6c71a03.yml
openapi_spec_hash: a5632057f5e4d956a71c20a79c0d879c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-aab1b331382f758fc255f765e73b62fedf463cf0748bc11b2b08974de9ac816a.yml
openapi_spec_hash: f717a21f47419aa51e4d9298aa68cc45
config_hash: 0017f6c419cbbf7b949f9b2842917a79
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.4.0-alpha.10 (2025-11-17)

Full Changelog: [v0.4.0-alpha.9...v0.4.0-alpha.10](https://github.com/llamastack/llama-stack-client-python/compare/v0.4.0-alpha.9...v0.4.0-alpha.10)

### Bug Fixes

* **openapi:** restore embedded request wrappers ([261e364](https://github.com/llamastack/llama-stack-client-python/commit/261e3640c942c60860af08cd4d205d8e402bb702))

## 0.4.0-alpha.9 (2025-11-14)

Full Changelog: [v0.4.0-alpha.8...v0.4.0-alpha.9](https://github.com/llamastack/llama-stack-client-python/compare/v0.4.0-alpha.8...v0.4.0-alpha.9)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "llama_stack_client"
version = "0.4.0-alpha.9"
version = "0.4.0-alpha.10"
description = "The official Python library for the llama-stack-client API"
dynamic = ["readme"]
license = "MIT"
Expand Down
82 changes: 14 additions & 68 deletions src/llama_stack_client/resources/alpha/eval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from __future__ import annotations

from typing import Dict, Iterable, Optional
from typing import Dict, Iterable

import httpx

Expand All @@ -20,7 +20,7 @@
JobsResourceWithStreamingResponse,
AsyncJobsResourceWithStreamingResponse,
)
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
Expand Down Expand Up @@ -164,9 +164,7 @@ def run_eval(
self,
benchmark_id: str,
*,
eval_candidate: eval_run_eval_params.EvalCandidate,
num_examples: Optional[int] | Omit = omit,
scoring_params: Dict[str, eval_run_eval_params.ScoringParams] | Omit = omit,
benchmark_config: BenchmarkConfigParam,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -178,13 +176,7 @@ def run_eval(
Run an evaluation on a benchmark.

Args:
eval_candidate: A model candidate for evaluation.

num_examples: Number of examples to evaluate (useful for testing), if not provided, all
examples in the dataset will be evaluated

scoring_params: Map between scoring function id and parameters for each scoring function you
want to run
benchmark_config: A benchmark configuration for evaluation.

extra_headers: Send extra headers

Expand All @@ -198,14 +190,7 @@ def run_eval(
raise ValueError(f"Expected a non-empty value for `benchmark_id` but received {benchmark_id!r}")
return self._post(
f"/v1alpha/eval/benchmarks/{benchmark_id}/jobs",
body=maybe_transform(
{
"eval_candidate": eval_candidate,
"num_examples": num_examples,
"scoring_params": scoring_params,
},
eval_run_eval_params.EvalRunEvalParams,
),
body=maybe_transform({"benchmark_config": benchmark_config}, eval_run_eval_params.EvalRunEvalParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand All @@ -216,9 +201,7 @@ def run_eval_alpha(
self,
benchmark_id: str,
*,
eval_candidate: eval_run_eval_alpha_params.EvalCandidate,
num_examples: Optional[int] | Omit = omit,
scoring_params: Dict[str, eval_run_eval_alpha_params.ScoringParams] | Omit = omit,
benchmark_config: BenchmarkConfigParam,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -230,13 +213,7 @@ def run_eval_alpha(
Run an evaluation on a benchmark.

Args:
eval_candidate: A model candidate for evaluation.

num_examples: Number of examples to evaluate (useful for testing), if not provided, all
examples in the dataset will be evaluated

scoring_params: Map between scoring function id and parameters for each scoring function you
want to run
benchmark_config: A benchmark configuration for evaluation.

extra_headers: Send extra headers

Expand All @@ -251,12 +228,7 @@ def run_eval_alpha(
return self._post(
f"/v1alpha/eval/benchmarks/{benchmark_id}/jobs",
body=maybe_transform(
{
"eval_candidate": eval_candidate,
"num_examples": num_examples,
"scoring_params": scoring_params,
},
eval_run_eval_alpha_params.EvalRunEvalAlphaParams,
{"benchmark_config": benchmark_config}, eval_run_eval_alpha_params.EvalRunEvalAlphaParams
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down Expand Up @@ -385,9 +357,7 @@ async def run_eval(
self,
benchmark_id: str,
*,
eval_candidate: eval_run_eval_params.EvalCandidate,
num_examples: Optional[int] | Omit = omit,
scoring_params: Dict[str, eval_run_eval_params.ScoringParams] | Omit = omit,
benchmark_config: BenchmarkConfigParam,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -399,13 +369,7 @@ async def run_eval(
Run an evaluation on a benchmark.

Args:
eval_candidate: A model candidate for evaluation.

num_examples: Number of examples to evaluate (useful for testing), if not provided, all
examples in the dataset will be evaluated

scoring_params: Map between scoring function id and parameters for each scoring function you
want to run
benchmark_config: A benchmark configuration for evaluation.

extra_headers: Send extra headers

Expand All @@ -420,12 +384,7 @@ async def run_eval(
return await self._post(
f"/v1alpha/eval/benchmarks/{benchmark_id}/jobs",
body=await async_maybe_transform(
{
"eval_candidate": eval_candidate,
"num_examples": num_examples,
"scoring_params": scoring_params,
},
eval_run_eval_params.EvalRunEvalParams,
{"benchmark_config": benchmark_config}, eval_run_eval_params.EvalRunEvalParams
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand All @@ -437,9 +396,7 @@ async def run_eval_alpha(
self,
benchmark_id: str,
*,
eval_candidate: eval_run_eval_alpha_params.EvalCandidate,
num_examples: Optional[int] | Omit = omit,
scoring_params: Dict[str, eval_run_eval_alpha_params.ScoringParams] | Omit = omit,
benchmark_config: BenchmarkConfigParam,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -451,13 +408,7 @@ async def run_eval_alpha(
Run an evaluation on a benchmark.

Args:
eval_candidate: A model candidate for evaluation.

num_examples: Number of examples to evaluate (useful for testing), if not provided, all
examples in the dataset will be evaluated

scoring_params: Map between scoring function id and parameters for each scoring function you
want to run
benchmark_config: A benchmark configuration for evaluation.

extra_headers: Send extra headers

Expand All @@ -472,12 +423,7 @@ async def run_eval_alpha(
return await self._post(
f"/v1alpha/eval/benchmarks/{benchmark_id}/jobs",
body=await async_maybe_transform(
{
"eval_candidate": eval_candidate,
"num_examples": num_examples,
"scoring_params": scoring_params,
},
eval_run_eval_alpha_params.EvalRunEvalAlphaParams,
{"benchmark_config": benchmark_config}, eval_run_eval_alpha_params.EvalRunEvalAlphaParams
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down
35 changes: 23 additions & 12 deletions src/llama_stack_client/resources/beta/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import typing_extensions
from typing import Dict, Type, Iterable, Optional, cast
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -205,21 +206,26 @@ def iterrows(
def register(
self,
*,
purpose: object,
source: object,
dataset_id: object | Omit = omit,
metadata: object | Omit = omit,
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"],
source: dataset_register_params.Source,
dataset_id: Optional[str] | Omit = omit,
metadata: Optional[Dict[str, object]] | Omit = omit,
# 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,
) -> DatasetRegisterResponse:
"""
Register a new dataset.
"""Register a new dataset.

Args:
purpose: Purpose of the dataset.

Each purpose has a required input data schema.

source: A dataset that can be obtained from a URI.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -452,21 +458,26 @@ async def iterrows(
async def register(
self,
*,
purpose: object,
source: object,
dataset_id: object | Omit = omit,
metadata: object | Omit = omit,
purpose: Literal["post-training/messages", "eval/question-answer", "eval/messages-answer"],
source: dataset_register_params.Source,
dataset_id: Optional[str] | Omit = omit,
metadata: Optional[Dict[str, object]] | Omit = omit,
# 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,
) -> DatasetRegisterResponse:
"""
Register a new dataset.
"""Register a new dataset.

Args:
purpose: Purpose of the dataset.

Each purpose has a required input data schema.

source: A dataset that can be obtained from a URI.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
30 changes: 17 additions & 13 deletions src/llama_stack_client/resources/scoring_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from __future__ import annotations

import typing_extensions
from typing import Type, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -112,12 +112,12 @@ def list(
def register(
self,
*,
description: object,
return_type: object,
scoring_fn_id: object,
params: object | Omit = omit,
provider_id: object | Omit = omit,
provider_scoring_fn_id: object | Omit = omit,
description: str,
return_type: scoring_function_register_params.ReturnType,
scoring_fn_id: str,
params: Optional[scoring_function_register_params.Params] | Omit = omit,
provider_id: Optional[str] | Omit = omit,
provider_scoring_fn_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -129,6 +129,8 @@ def register(
Register a scoring function.

Args:
params: Parameters for LLM-as-judge scoring function configuration.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -273,12 +275,12 @@ async def list(
async def register(
self,
*,
description: object,
return_type: object,
scoring_fn_id: object,
params: object | Omit = omit,
provider_id: object | Omit = omit,
provider_scoring_fn_id: object | Omit = omit,
description: str,
return_type: scoring_function_register_params.ReturnType,
scoring_fn_id: str,
params: Optional[scoring_function_register_params.Params] | Omit = omit,
provider_id: Optional[str] | Omit = omit,
provider_scoring_fn_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -290,6 +292,8 @@ async def register(
Register a scoring function.

Args:
params: Parameters for LLM-as-judge scoring function configuration.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down
Loading
Loading