diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index c8db0a46e..17263c0af 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7180,6 +7180,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7630,6 +7641,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -9612,6 +9635,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -9701,6 +9735,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9935,6 +9989,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9963,6 +10029,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -10092,6 +10170,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -10142,6 +10242,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index c3cc89ea1..3f7054be0 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -4923,6 +4923,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -5373,6 +5384,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -7355,6 +7378,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -7444,6 +7478,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -7678,6 +7732,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -7706,6 +7772,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -7835,6 +7913,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -7885,6 +7985,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index 9f7f48ae7..c4aa9fbb1 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -4775,6 +4775,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -5225,6 +5236,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -7207,6 +7230,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -7296,6 +7330,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -7530,6 +7584,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -7558,6 +7624,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -7687,6 +7765,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -7737,6 +7837,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index cabc65275..a9e813616 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -6336,6 +6336,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -6786,6 +6797,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -8768,6 +8791,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -8857,6 +8891,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9091,6 +9145,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9119,6 +9185,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -9248,6 +9326,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -9298,6 +9398,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index c8db0a46e..17263c0af 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -7180,6 +7180,17 @@ components: - scoring_functions title: Benchmark type: object + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + title: Data + type: array + required: + - data + title: ListBenchmarksResponse + type: object ImageDelta: description: An image content delta for streaming responses. properties: @@ -7630,6 +7641,18 @@ components: - source title: Dataset type: object + ListDatasetsResponse: + description: Response from listing datasets. + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + title: Data + type: array + required: + - data + title: ListDatasetsResponse + type: object Error: description: Error response from the API. Roughly follows RFC 7807. properties: @@ -9612,6 +9635,17 @@ components: - owned_by title: OpenAIModel type: object + OpenAIListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/OpenAIModel' + title: Data + type: array + required: + - data + title: OpenAIListModelsResponse + type: object DPOLossType: enum: - sigmoid @@ -9701,6 +9735,26 @@ components: default: false title: EfficiencyConfig type: object + PostTrainingJob: + properties: + job_uuid: + title: Job Uuid + type: string + required: + - job_uuid + title: PostTrainingJob + type: object + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + title: Data + type: array + required: + - data + title: ListPostTrainingJobsResponse + type: object OptimizerType: description: Available optimizer algorithms for training. enum: @@ -9935,6 +9989,18 @@ components: - prompt_id title: Prompt type: object + ListPromptsResponse: + description: Response model to list prompts. + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + title: Data + type: array + required: + - data + title: ListPromptsResponse + type: object ProviderInfo: description: Information about a registered provider including its configuration and health status. properties: @@ -9963,6 +10029,18 @@ components: - health title: ProviderInfo type: object + ListProvidersResponse: + description: Response containing a list of all available providers. + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + title: Data + type: array + required: + - data + title: ListProvidersResponse + type: object ModerationObjectResults: description: A moderation object. properties: @@ -10092,6 +10170,28 @@ components: - results title: ScoreResponse type: object + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn' + title: Data + type: array + required: + - data + title: ListScoringFunctionsResponse + type: object + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + title: Data + type: array + required: + - data + title: ListShieldsResponse + type: object ToolDef: description: Tool definition used in runtime contexts. properties: @@ -10142,6 +10242,18 @@ components: - data title: ListToolDefsResponse type: object + ListToolGroupsResponse: + description: Response containing a list of tool groups. + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + title: Data + type: array + required: + - data + title: ListToolGroupsResponse + type: object ToolGroupInput: description: Input data for registering a tool group. properties: diff --git a/src/llama_stack_api/benchmarks.py b/src/llama_stack_api/benchmarks.py index e9ac3a8b8..fdb2ccad4 100644 --- a/src/llama_stack_api/benchmarks.py +++ b/src/llama_stack_api/benchmarks.py @@ -48,6 +48,7 @@ class BenchmarkInput(CommonBenchmarkFields, BaseModel): provider_benchmark_id: str | None = None +@json_schema_type class ListBenchmarksResponse(BaseModel): data: list[Benchmark] diff --git a/src/llama_stack_api/datasets.py b/src/llama_stack_api/datasets.py index 76d787078..6d707aa8e 100644 --- a/src/llama_stack_api/datasets.py +++ b/src/llama_stack_api/datasets.py @@ -136,6 +136,7 @@ class DatasetInput(CommonDatasetFields, BaseModel): dataset_id: str +@json_schema_type class ListDatasetsResponse(BaseModel): """Response from listing datasets. diff --git a/src/llama_stack_api/models.py b/src/llama_stack_api/models.py index 833864ec2..98c16b6c2 100644 --- a/src/llama_stack_api/models.py +++ b/src/llama_stack_api/models.py @@ -100,6 +100,7 @@ class OpenAIModel(BaseModel): custom_metadata: dict[str, Any] | None = None +@json_schema_type class OpenAIListModelsResponse(BaseModel): data: list[OpenAIModel] diff --git a/src/llama_stack_api/post_training.py b/src/llama_stack_api/post_training.py index 0cc9277d9..505c8bfd7 100644 --- a/src/llama_stack_api/post_training.py +++ b/src/llama_stack_api/post_training.py @@ -236,6 +236,7 @@ class PostTrainingRLHFRequest(BaseModel): logger_config: dict[str, Any] +@json_schema_type class PostTrainingJob(BaseModel): job_uuid: str @@ -265,6 +266,7 @@ class PostTrainingJobStatusResponse(BaseModel): checkpoints: list[Checkpoint] = Field(default_factory=list) +@json_schema_type class ListPostTrainingJobsResponse(BaseModel): data: list[PostTrainingJob] diff --git a/src/llama_stack_api/prompts.py b/src/llama_stack_api/prompts.py index 651d03e61..8562e4704 100644 --- a/src/llama_stack_api/prompts.py +++ b/src/llama_stack_api/prompts.py @@ -85,6 +85,7 @@ class Prompt(BaseModel): return f"pmpt_{hex_string}" +@json_schema_type class ListPromptsResponse(BaseModel): """Response model to list prompts.""" diff --git a/src/llama_stack_api/providers.py b/src/llama_stack_api/providers.py index 5b555b82f..88c66f261 100644 --- a/src/llama_stack_api/providers.py +++ b/src/llama_stack_api/providers.py @@ -31,6 +31,7 @@ class ProviderInfo(BaseModel): health: HealthResponse +@json_schema_type class ListProvidersResponse(BaseModel): """Response containing a list of all available providers. diff --git a/src/llama_stack_api/scoring_functions.py b/src/llama_stack_api/scoring_functions.py index f75336e54..12051c20c 100644 --- a/src/llama_stack_api/scoring_functions.py +++ b/src/llama_stack_api/scoring_functions.py @@ -155,6 +155,7 @@ class ScoringFnInput(CommonScoringFnFields, BaseModel): provider_scoring_fn_id: str | None = None +@json_schema_type class ListScoringFunctionsResponse(BaseModel): data: list[ScoringFn] diff --git a/src/llama_stack_api/shields.py b/src/llama_stack_api/shields.py index 2aeb83333..19e412a5a 100644 --- a/src/llama_stack_api/shields.py +++ b/src/llama_stack_api/shields.py @@ -43,6 +43,7 @@ class ShieldInput(CommonShieldFields): provider_shield_id: str | None = None +@json_schema_type class ListShieldsResponse(BaseModel): data: list[Shield] diff --git a/src/llama_stack_api/tools.py b/src/llama_stack_api/tools.py index ad5edb2b0..9440dd031 100644 --- a/src/llama_stack_api/tools.py +++ b/src/llama_stack_api/tools.py @@ -88,6 +88,7 @@ class ToolStore(Protocol): async def get_tool_group(self, toolgroup_id: str) -> ToolGroup: ... +@json_schema_type class ListToolGroupsResponse(BaseModel): """Response containing a list of tool groups.