llama-stack-mirror/docs/docs/references/python_sdk_reference/index.md
Matthew Farrellee 60484c5c4e
Some checks failed
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 1s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 0s
Vector IO Integration Tests / test-matrix (push) Failing after 4s
Test Llama Stack Build / build-custom-container-distribution (push) Failing after 4s
Test Llama Stack Build / build-ubi9-container-distribution (push) Failing after 3s
Unit Tests / unit-tests (3.12) (push) Failing after 3s
Unit Tests / unit-tests (3.13) (push) Failing after 3s
Test Llama Stack Build / build (push) Failing after 3s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 1s
Integration Tests (Replay) / Integration Tests (, , , client=, ) (push) Failing after 3s
Test Llama Stack Build / generate-matrix (push) Successful in 3s
Test External Providers Installed via Module / test-external-providers-from-module (venv) (push) Has been skipped
Test Llama Stack Build / build-single-provider (push) Failing after 4s
Python Package Build Test / build (3.12) (push) Failing after 1s
API Conformance Tests / check-schema-compatibility (push) Successful in 7s
Python Package Build Test / build (3.13) (push) Failing after 1s
Test External API and Providers / test-external (venv) (push) Failing after 4s
UI Tests / ui-tests (22) (push) Successful in 39s
Pre-commit / pre-commit (push) Successful in 1m18s
chore(api): remove batch inference (#3261)
# What does this PR do?

APIs removed:
 - POST /v1/batch-inference/completion
 - POST /v1/batch-inference/chat-completion
 - POST /v1/inference/batch-completion
 - POST /v1/inference/batch-chat-completion

note -
- batch-completion & batch-chat-completion were only implemented for
inference=inline::meta-reference
 - batch-inference were not implemented
2025-09-26 14:35:34 -07:00

34 KiB

Python SDK Reference

Shared Types

from llama_stack_client.types import (
    AgentConfig,
    BatchCompletion,
    CompletionMessage,
    ContentDelta,
    Document,
    InterleavedContent,
    InterleavedContentItem,
    Message,
    ParamType,
    QueryConfig,
    QueryResult,
    ReturnType,
    SafetyViolation,
    SamplingParams,
    ScoringResult,
    SystemMessage,
    ToolCall,
    ToolParamDefinition,
    ToolResponseMessage,
    URL,
    UserMessage,
)

Toolgroups

Types:

from llama_stack_client.types import (
    ListToolGroupsResponse,
    ToolGroup,
    ToolgroupListResponse,
)

Methods:

Tools

Types:

from llama_stack_client.types import ListToolsResponse, Tool, ToolListResponse

Methods:

ToolRuntime

Types:

from llama_stack_client.types import ToolDef, ToolInvocationResult

Methods:

RagTool

Methods:

Agents

Types:

from llama_stack_client.types import (
    InferenceStep,
    MemoryRetrievalStep,
    ShieldCallStep,
    ToolExecutionStep,
    ToolResponse,
    AgentCreateResponse,
)

Methods:

Session

Types:

from llama_stack_client.types.agents import Session, SessionCreateResponse

Methods:

Steps

Types:

from llama_stack_client.types.agents import StepRetrieveResponse

Methods:

Turn

Types:

from llama_stack_client.types.agents import Turn, TurnCreateResponse

Methods:

Datasets

Types:

from llama_stack_client.types import (
    ListDatasetsResponse,
    DatasetRetrieveResponse,
    DatasetListResponse,
)

Methods:

Eval

Types:

from llama_stack_client.types import EvaluateResponse, Job

Methods:

Jobs

Types:

from llama_stack_client.types.eval import JobStatusResponse

Methods:

  • client.eval.jobs.retrieve(job_id, *, benchmark_id) -> EvaluateResponse
  • client.eval.jobs.cancel(job_id, *, benchmark_id) -> None
  • client.eval.jobs.status(job_id, *, benchmark_id) -> Optional[JobStatusResponse]

Inspect

Types:

from llama_stack_client.types import HealthInfo, ProviderInfo, RouteInfo, VersionInfo

Methods:

Inference

Types:

from llama_stack_client.types import (
    CompletionResponse,
    EmbeddingsResponse,
    TokenLogProbs,
    InferenceChatCompletionResponse,
    InferenceCompletionResponse,
)

Methods:

VectorIo

Types:

from llama_stack_client.types import QueryChunksResponse

Methods:

VectorDBs

Types:

from llama_stack_client.types import (
    ListVectorDBsResponse,
    VectorDBRetrieveResponse,
    VectorDBListResponse,
    VectorDBRegisterResponse,
)

Methods:

Models

Types:

from llama_stack_client.types import ListModelsResponse, Model, ModelListResponse

Methods:

PostTraining

Types:

from llama_stack_client.types import ListPostTrainingJobsResponse, PostTrainingJob

Methods:

Job

Types:

from llama_stack_client.types.post_training import (
    JobListResponse,
    JobArtifactsResponse,
    JobStatusResponse,
)

Methods:

Providers

Types:

from llama_stack_client.types import ListProvidersResponse, ProviderListResponse

Methods:

Routes

Types:

from llama_stack_client.types import ListRoutesResponse, RouteListResponse

Methods:

Safety

Types:

from llama_stack_client.types import RunShieldResponse

Methods:

Shields

Types:

from llama_stack_client.types import ListShieldsResponse, Shield, ShieldListResponse

Methods:

SyntheticDataGeneration

Types:

from llama_stack_client.types import SyntheticDataGenerationResponse

Methods:

Telemetry

Types:

from llama_stack_client.types import (
    QuerySpansResponse,
    SpanWithStatus,
    Trace,
    TelemetryGetSpanResponse,
    TelemetryGetSpanTreeResponse,
    TelemetryQuerySpansResponse,
    TelemetryQueryTracesResponse,
)

Methods:

Datasetio

Types:

from llama_stack_client.types import PaginatedRowsResult

Methods:

Scoring

Types:

from llama_stack_client.types import ScoringScoreResponse, ScoringScoreBatchResponse

Methods:

ScoringFunctions

Types:

from llama_stack_client.types import (
    ListScoringFunctionsResponse,
    ScoringFn,
    ScoringFunctionListResponse,
)

Methods:

Benchmarks

Types:

from llama_stack_client.types import (
    Benchmark,
    ListBenchmarksResponse,
    BenchmarkListResponse,
)

Methods: