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
6 changes: 6 additions & 0 deletions src/llama_stack_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
from ._utils._logs import setup_logging as _setup_logging

from .lib.agents.agent import Agent
from .lib.agents.event_logger import EventLogger as AgentEventLogger
from .lib.inference.event_logger import EventLogger as InferenceEventLogger
from .types.agents.turn_create_params import Document
from .types.shared_params.document import Document as RAGDocument

__all__ = [
"types",
"__version__",
Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, List, Type, Union, Iterable, Optional, cast
from typing import Dict, List, Type, Union, Iterable, cast

import httpx

Expand Down Expand Up @@ -58,7 +58,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Benchmark]:
) -> Benchmark:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -178,7 +178,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Benchmark]:
) -> Benchmark:
"""
Args:
extra_headers: Send extra headers
Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

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

import httpx
Expand Down Expand Up @@ -61,7 +61,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[DatasetRetrieveResponse]:
) -> DatasetRetrieveResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -286,7 +286,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[DatasetRetrieveResponse]:
) -> DatasetRetrieveResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down
6 changes: 2 additions & 4 deletions src/llama_stack_client/resources/eval/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from __future__ import annotations

from typing import Optional

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
Expand Down Expand Up @@ -126,7 +124,7 @@ def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobStatusResponse]:
) -> JobStatusResponse:
"""
Get the status of a job.

Expand Down Expand Up @@ -256,7 +254,7 @@ async def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobStatusResponse]:
) -> JobStatusResponse:
"""
Get the status of a job.

Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

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

import httpx
Expand Down Expand Up @@ -59,7 +59,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Model]:
) -> Model:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -208,7 +208,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Model]:
) -> Model:
"""
Args:
extra_headers: Send extra headers
Expand Down
10 changes: 5 additions & 5 deletions src/llama_stack_client/resources/post_training/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Optional, cast
from typing import List, Type, cast

import httpx

Expand Down Expand Up @@ -81,7 +81,7 @@ def artifacts(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobArtifactsResponse]:
) -> JobArtifactsResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -145,7 +145,7 @@ def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobStatusResponse]:
) -> JobStatusResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -221,7 +221,7 @@ async def artifacts(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobArtifactsResponse]:
) -> JobArtifactsResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -285,7 +285,7 @@ async def status(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[JobStatusResponse]:
) -> JobStatusResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down
10 changes: 3 additions & 7 deletions src/llama_stack_client/resources/post_training/post_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
JobResourceWithStreamingResponse,
AsyncJobResourceWithStreamingResponse,
)
from ...types import (
post_training_preference_optimize_params,
post_training_supervised_fine_tune_params,
)
from ...types import post_training_preference_optimize_params, post_training_supervised_fine_tune_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
Expand All @@ -33,7 +30,6 @@
)
from ..._base_client import make_request_options
from ...types.post_training_job import PostTrainingJob
from ...types.algorithm_config_param import AlgorithmConfigParam

__all__ = ["PostTrainingResource", "AsyncPostTrainingResource"]

Expand Down Expand Up @@ -115,7 +111,7 @@ def supervised_fine_tune(
logger_config: Dict[str, Union[bool, float, str, Iterable[object], object, None]],
model: str,
training_config: post_training_supervised_fine_tune_params.TrainingConfig,
algorithm_config: AlgorithmConfigParam | NotGiven = NOT_GIVEN,
algorithm_config: post_training_supervised_fine_tune_params.AlgorithmConfig | NotGiven = NOT_GIVEN,
checkpoint_dir: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -232,7 +228,7 @@ async def supervised_fine_tune(
logger_config: Dict[str, Union[bool, float, str, Iterable[object], object, None]],
model: str,
training_config: post_training_supervised_fine_tune_params.TrainingConfig,
algorithm_config: AlgorithmConfigParam | NotGiven = NOT_GIVEN,
algorithm_config: post_training_supervised_fine_tune_params.AlgorithmConfig | NotGiven = NOT_GIVEN,
checkpoint_dir: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/scoring_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

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

import httpx

Expand Down Expand Up @@ -60,7 +60,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[ScoringFn]:
) -> ScoringFn:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -180,7 +180,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[ScoringFn]:
) -> ScoringFn:
"""
Args:
extra_headers: Send extra headers
Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/shields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, Type, Union, Iterable, Optional, cast
from typing import Dict, Type, Union, Iterable, cast

import httpx

Expand Down Expand Up @@ -58,7 +58,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Shield]:
) -> Shield:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -173,7 +173,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[Shield]:
) -> Shield:
"""
Args:
extra_headers: Send extra headers
Expand Down
6 changes: 3 additions & 3 deletions src/llama_stack_client/resources/vector_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

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

import httpx

Expand Down Expand Up @@ -59,7 +59,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[VectorDBRetrieveResponse]:
) -> VectorDBRetrieveResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -208,7 +208,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[VectorDBRetrieveResponse]:
) -> VectorDBRetrieveResponse:
"""
Args:
extra_headers: Send extra headers
Expand Down
1 change: 0 additions & 1 deletion src/llama_stack_client/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
from .model_register_params import ModelRegisterParams as ModelRegisterParams
from .query_chunks_response import QueryChunksResponse as QueryChunksResponse
from .query_condition_param import QueryConditionParam as QueryConditionParam
from .algorithm_config_param import AlgorithmConfigParam as AlgorithmConfigParam
from .benchmark_config_param import BenchmarkConfigParam as BenchmarkConfigParam
from .list_datasets_response import ListDatasetsResponse as ListDatasetsResponse
from .provider_list_response import ProviderListResponse as ProviderListResponse
Expand Down
37 changes: 0 additions & 37 deletions src/llama_stack_client/types/algorithm_config_param.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/llama_stack_client/types/eval/job_status_response.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal, TypeAlias

__all__ = ["JobStatusResponse"]

JobStatusResponse: TypeAlias = Optional[Literal["completed", "in_progress", "failed", "scheduled"]]
JobStatusResponse: TypeAlias = Literal["completed", "in_progress", "failed", "scheduled"]
Loading