From 31a5ba52683a8ca50ec22e4ce2c93242320078c2 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Wed, 19 Feb 2025 13:26:39 -0800 Subject: [PATCH] Add title to the json schemas --- docs/_static/llama-stack-spec.html | 524 +++++++++++++++++++--------- docs/_static/llama-stack-spec.yaml | 194 ++++++++++ llama_stack/strong_typing/schema.py | 4 +- 3 files changed, 556 insertions(+), 166 deletions(-) diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index 65a1bdd6b..82abc947b 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -2661,7 +2661,8 @@ "required": [ "type", "config" - ] + ], + "title": "AgentCandidate" }, "AgentConfig": { "type": "object", @@ -2700,6 +2701,7 @@ "required", "none" ], + "title": "ToolChoice", "description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model." }, "tool_prompt_format": { @@ -2709,6 +2711,7 @@ "function_tag", "python_list" ], + "title": "ToolPromptFormat", "description": "Prompt format for calling custom / zero shot tools." }, "tool_config": { @@ -2736,7 +2739,8 @@ "required": [ "model", "instructions" - ] + ], + "title": "AgentConfig" }, "AgentTool": { "oneOf": [ @@ -2779,7 +2783,8 @@ "required": [ "name", "args" - ] + ], + "title": "AgentToolGroupWithArgs" } ] }, @@ -2790,7 +2795,8 @@ "median", "categorical_count", "accuracy" - ] + ], + "title": "AggregationFunctionType" }, "BasicScoringFnParams": { "type": "object", @@ -2810,7 +2816,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "BasicScoringFnParams" }, "BenchmarkConfig": { "type": "object", @@ -2838,7 +2845,8 @@ "type", "eval_candidate", "scoring_params" - ] + ], + "title": "BenchmarkConfig" }, "EvalCandidate": { "oneOf": [ @@ -2898,6 +2906,7 @@ "type", "bnf" ], + "title": "GrammarResponseFormat", "description": "Configuration for grammar-guided response generation." }, "GreedySamplingStrategy": { @@ -2912,7 +2921,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "GreedySamplingStrategy" }, "ImageContentItem": { "type": "object", @@ -2945,6 +2955,7 @@ "type", "image" ], + "title": "ImageContentItem", "description": "A image content item" }, "InterleavedContent": { @@ -3021,6 +3032,7 @@ "type", "json_schema" ], + "title": "JsonSchemaResponseFormat", "description": "Configuration for JSON schema-guided response generation." }, "LLMAsJudgeScoringFnParams": { @@ -3054,7 +3066,8 @@ "required": [ "type", "judge_model" - ] + ], + "title": "LLMAsJudgeScoringFnParams" }, "ModelCandidate": { "type": "object", @@ -3079,7 +3092,8 @@ "type", "model", "sampling_params" - ] + ], + "title": "ModelCandidate" }, "RegexParserScoringFnParams": { "type": "object", @@ -3105,7 +3119,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "RegexParserScoringFnParams" }, "ResponseFormat": { "oneOf": [ @@ -3142,7 +3157,8 @@ "additionalProperties": false, "required": [ "strategy" - ] + ], + "title": "SamplingParams" }, "SamplingStrategy": { "oneOf": [ @@ -3205,6 +3221,7 @@ "role", "content" ], + "title": "SystemMessage", "description": "A system message providing instructions or context to the model." }, "TextContentItem": { @@ -3226,6 +3243,7 @@ "type", "text" ], + "title": "TextContentItem", "description": "A text content item" }, "ToolConfig": { @@ -3240,6 +3258,7 @@ "required", "none" ], + "title": "ToolChoice", "description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model." }, { @@ -3269,6 +3288,7 @@ } }, "additionalProperties": false, + "title": "ToolConfig", "description": "Configuration for tool use." }, "ToolDef": { @@ -3315,7 +3335,8 @@ "additionalProperties": false, "required": [ "name" - ] + ], + "title": "ToolDef" }, "ToolParameter": { "type": "object", @@ -3362,7 +3383,8 @@ "parameter_type", "description", "required" - ] + ], + "title": "ToolParameter" }, "TopKSamplingStrategy": { "type": "object", @@ -3380,7 +3402,8 @@ "required": [ "type", "top_k" - ] + ], + "title": "TopKSamplingStrategy" }, "TopPSamplingStrategy": { "type": "object", @@ -3401,7 +3424,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "TopPSamplingStrategy" }, "URL": { "type": "object", @@ -3413,7 +3437,8 @@ "additionalProperties": false, "required": [ "uri" - ] + ], + "title": "URL" }, "DeprecatedEvaluateRowsRequest": { "type": "object", @@ -3461,7 +3486,8 @@ "input_rows", "scoring_functions", "task_config" - ] + ], + "title": "DeprecatedEvaluateRowsRequest" }, "EvaluateResponse": { "type": "object", @@ -3505,7 +3531,8 @@ "required": [ "generations", "scores" - ] + ], + "title": "EvaluateResponse" }, "ScoringResult": { "type": "object", @@ -3568,7 +3595,8 @@ "required": [ "score_rows", "aggregated_results" - ] + ], + "title": "ScoringResult" }, "Benchmark": { "type": "object", @@ -3631,7 +3659,8 @@ "dataset_id", "scoring_functions", "metadata" - ] + ], + "title": "Benchmark" }, "JobStatus": { "type": "string", @@ -3640,7 +3669,8 @@ "in_progress", "failed", "scheduled" - ] + ], + "title": "JobStatus" }, "ListBenchmarksResponse": { "type": "object", @@ -3655,7 +3685,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListBenchmarksResponse" }, "DeprecatedRegisterEvalTaskRequest": { "type": "object", @@ -3709,7 +3740,8 @@ "eval_task_id", "dataset_id", "scoring_functions" - ] + ], + "title": "DeprecatedRegisterEvalTaskRequest" }, "DeprecatedRunEvalRequest": { "type": "object", @@ -3721,7 +3753,8 @@ "additionalProperties": false, "required": [ "task_config" - ] + ], + "title": "DeprecatedRunEvalRequest" }, "Job": { "type": "object", @@ -3733,7 +3766,8 @@ "additionalProperties": false, "required": [ "job_id" - ] + ], + "title": "Job" }, "AppendRowsRequest": { "type": "object", @@ -3774,7 +3808,8 @@ "required": [ "dataset_id", "rows" - ] + ], + "title": "AppendRowsRequest" }, "CompletionMessage": { "type": "object", @@ -3812,6 +3847,7 @@ "content", "stop_reason" ], + "title": "CompletionMessage", "description": "A message containing the model's (assistant) response in a chat conversation." }, "Message": { @@ -3854,7 +3890,8 @@ "wolfram_alpha", "photogen", "code_interpreter" - ] + ], + "title": "BuiltinTool" }, { "type": "string" @@ -3933,7 +3970,8 @@ "call_id", "tool_name", "arguments" - ] + ], + "title": "ToolCall" }, "ToolDefinition": { "type": "object", @@ -3947,7 +3985,8 @@ "wolfram_alpha", "photogen", "code_interpreter" - ] + ], + "title": "BuiltinTool" }, { "type": "string" @@ -3967,7 +4006,8 @@ "additionalProperties": false, "required": [ "tool_name" - ] + ], + "title": "ToolDefinition" }, "ToolParamDefinition": { "type": "object", @@ -4008,7 +4048,8 @@ "additionalProperties": false, "required": [ "param_type" - ] + ], + "title": "ToolParamDefinition" }, "ToolResponseMessage": { "type": "object", @@ -4032,7 +4073,8 @@ "wolfram_alpha", "photogen", "code_interpreter" - ] + ], + "title": "BuiltinTool" }, { "type": "string" @@ -4052,6 +4094,7 @@ "tool_name", "content" ], + "title": "ToolResponseMessage", "description": "A message representing the result of a tool invocation." }, "UserMessage": { @@ -4077,6 +4120,7 @@ "role", "content" ], + "title": "UserMessage", "description": "A message from the user in a chat conversation." }, "BatchChatCompletionRequest": { @@ -4110,6 +4154,7 @@ "required", "none" ], + "title": "ToolChoice", "description": "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model." }, "tool_prompt_format": { @@ -4119,6 +4164,7 @@ "function_tag", "python_list" ], + "title": "ToolPromptFormat", "description": "Prompt format for calling custom / zero shot tools." }, "response_format": { @@ -4133,14 +4179,16 @@ "description": "How many tokens (for each position) to return log probabilities for." } }, - "additionalProperties": false + "additionalProperties": false, + "title": "LogProbConfig" } }, "additionalProperties": false, "required": [ "model", "messages_batch" - ] + ], + "title": "BatchChatCompletionRequest" }, "BatchChatCompletionResponse": { "type": "object", @@ -4155,7 +4203,8 @@ "additionalProperties": false, "required": [ "batch" - ] + ], + "title": "BatchChatCompletionResponse" }, "ChatCompletionResponse": { "type": "object", @@ -4182,6 +4231,7 @@ "required": [ "completion_message" ], + "title": "ChatCompletionResponse", "description": "Response from a chat completion request." }, "MetricEvent": { @@ -4250,7 +4300,8 @@ "metric", "value", "unit" - ] + ], + "title": "MetricEvent" }, "TokenLogProbs": { "type": "object", @@ -4267,6 +4318,7 @@ "required": [ "logprobs_by_token" ], + "title": "TokenLogProbs", "description": "Log probabilities for generated tokens." }, "BatchCompletionRequest": { @@ -4296,14 +4348,16 @@ "description": "How many tokens (for each position) to return log probabilities for." } }, - "additionalProperties": false + "additionalProperties": false, + "title": "LogProbConfig" } }, "additionalProperties": false, "required": [ "model", "content_batch" - ] + ], + "title": "BatchCompletionRequest" }, "BatchCompletionResponse": { "type": "object", @@ -4318,7 +4372,8 @@ "additionalProperties": false, "required": [ "batch" - ] + ], + "title": "BatchCompletionResponse" }, "CompletionResponse": { "type": "object", @@ -4349,6 +4404,7 @@ "content", "stop_reason" ], + "title": "CompletionResponse", "description": "Response from a completion request." }, "CancelTrainingJobRequest": { @@ -4361,7 +4417,8 @@ "additionalProperties": false, "required": [ "job_uuid" - ] + ], + "title": "CancelTrainingJobRequest" }, "ChatCompletionRequest": { "type": "object", @@ -4435,7 +4492,8 @@ "required": [ "model_id", "messages" - ] + ], + "title": "ChatCompletionRequest" }, "ChatCompletionResponseEvent": { "type": "object", @@ -4475,6 +4533,7 @@ "event_type", "delta" ], + "title": "ChatCompletionResponseEvent", "description": "An event during chat completion generation." }, "ChatCompletionResponseStreamChunk": { @@ -4495,6 +4554,7 @@ "required": [ "event" ], + "title": "ChatCompletionResponseStreamChunk", "description": "A chunk of a streamed chat completion response." }, "ContentDelta": { @@ -4535,7 +4595,8 @@ "required": [ "type", "image" - ] + ], + "title": "ImageDelta" }, "TextDelta": { "type": "object", @@ -4553,7 +4614,8 @@ "required": [ "type", "text" - ] + ], + "title": "TextDelta" }, "ToolCallDelta": { "type": "object", @@ -4580,7 +4642,8 @@ "in_progress", "failed", "succeeded" - ] + ], + "title": "ToolCallParseStatus" } }, "additionalProperties": false, @@ -4588,7 +4651,8 @@ "type", "tool_call", "parse_status" - ] + ], + "title": "ToolCallDelta" }, "CompletionRequest": { "type": "object", @@ -4630,7 +4694,8 @@ "required": [ "model_id", "content" - ] + ], + "title": "CompletionRequest" }, "CompletionResponseStreamChunk": { "type": "object", @@ -4660,6 +4725,7 @@ "required": [ "delta" ], + "title": "CompletionResponseStreamChunk", "description": "A chunk of a streamed completion response." }, "CreateAgentRequest": { @@ -4672,7 +4738,8 @@ "additionalProperties": false, "required": [ "agent_config" - ] + ], + "title": "CreateAgentRequest" }, "AgentCreateResponse": { "type": "object", @@ -4684,7 +4751,8 @@ "additionalProperties": false, "required": [ "agent_id" - ] + ], + "title": "AgentCreateResponse" }, "CreateAgentSessionRequest": { "type": "object", @@ -4696,7 +4764,8 @@ "additionalProperties": false, "required": [ "session_name" - ] + ], + "title": "CreateAgentSessionRequest" }, "AgentSessionCreateResponse": { "type": "object", @@ -4708,7 +4777,8 @@ "additionalProperties": false, "required": [ "session_id" - ] + ], + "title": "AgentSessionCreateResponse" }, "CreateAgentTurnRequest": { "type": "object", @@ -4761,7 +4831,8 @@ "required": [ "content", "mime_type" - ] + ], + "title": "Document" } }, "toolgroups": { @@ -4777,7 +4848,8 @@ "additionalProperties": false, "required": [ "messages" - ] + ], + "title": "CreateAgentTurnRequest" }, "InferenceStep": { "type": "object", @@ -4811,7 +4883,8 @@ "step_id", "step_type", "model_response" - ] + ], + "title": "InferenceStep" }, "MemoryRetrievalStep": { "type": "object", @@ -4849,7 +4922,8 @@ "step_type", "vector_db_ids", "inserted_context" - ] + ], + "title": "MemoryRetrievalStep" }, "SafetyViolation": { "type": "object", @@ -4890,7 +4964,8 @@ "required": [ "violation_level", "metadata" - ] + ], + "title": "SafetyViolation" }, "ShieldCallStep": { "type": "object", @@ -4923,7 +4998,8 @@ "turn_id", "step_id", "step_type" - ] + ], + "title": "ShieldCallStep" }, "ToolExecutionStep": { "type": "object", @@ -4967,7 +5043,8 @@ "step_type", "tool_calls", "tool_responses" - ] + ], + "title": "ToolExecutionStep" }, "ToolResponse": { "type": "object", @@ -4984,7 +5061,8 @@ "wolfram_alpha", "photogen", "code_interpreter" - ] + ], + "title": "BuiltinTool" }, { "type": "string" @@ -5000,7 +5078,8 @@ "call_id", "tool_name", "content" - ] + ], + "title": "ToolResponse" }, "Turn": { "type": "object", @@ -5087,7 +5166,8 @@ "required": [ "content", "mime_type" - ] + ], + "title": "Attachment" } }, "started_at": { @@ -5108,6 +5188,7 @@ "output_message", "started_at" ], + "title": "Turn", "description": "A single turn in an interaction with an Agentic System." }, "ViolationLevel": { @@ -5116,7 +5197,8 @@ "info", "warn", "error" - ] + ], + "title": "ViolationLevel" }, "AgentTurnResponseEvent": { "type": "object", @@ -5128,7 +5210,8 @@ "additionalProperties": false, "required": [ "payload" - ] + ], + "title": "AgentTurnResponseEvent" }, "AgentTurnResponseEventPayload": { "oneOf": [ @@ -5174,7 +5257,8 @@ "tool_execution", "shield_call", "memory_retrieval" - ] + ], + "title": "StepType" }, "step_id": { "type": "string" @@ -5211,7 +5295,8 @@ "step_type", "step_id", "step_details" - ] + ], + "title": "AgentTurnResponseStepCompletePayload" }, "AgentTurnResponseStepProgressPayload": { "type": "object", @@ -5228,7 +5313,8 @@ "tool_execution", "shield_call", "memory_retrieval" - ] + ], + "title": "StepType" }, "step_id": { "type": "string" @@ -5243,7 +5329,8 @@ "step_type", "step_id", "delta" - ] + ], + "title": "AgentTurnResponseStepProgressPayload" }, "AgentTurnResponseStepStartPayload": { "type": "object", @@ -5260,7 +5347,8 @@ "tool_execution", "shield_call", "memory_retrieval" - ] + ], + "title": "StepType" }, "step_id": { "type": "string" @@ -5296,7 +5384,8 @@ "event_type", "step_type", "step_id" - ] + ], + "title": "AgentTurnResponseStepStartPayload" }, "AgentTurnResponseStreamChunk": { "type": "object", @@ -5309,6 +5398,7 @@ "required": [ "event" ], + "title": "AgentTurnResponseStreamChunk", "description": "streamed agent turn completion response." }, "AgentTurnResponseTurnCompletePayload": { @@ -5327,7 +5417,8 @@ "required": [ "event_type", "turn" - ] + ], + "title": "AgentTurnResponseTurnCompletePayload" }, "AgentTurnResponseTurnStartPayload": { "type": "object", @@ -5345,7 +5436,8 @@ "required": [ "event_type", "turn_id" - ] + ], + "title": "AgentTurnResponseTurnStartPayload" }, "EmbeddingsRequest": { "type": "object", @@ -5366,7 +5458,8 @@ "required": [ "model_id", "contents" - ] + ], + "title": "EmbeddingsRequest" }, "EmbeddingsResponse": { "type": "object", @@ -5386,6 +5479,7 @@ "required": [ "embeddings" ], + "title": "EmbeddingsResponse", "description": "Response containing generated embeddings." }, "EvaluateRowsRequest": { @@ -5434,7 +5528,8 @@ "input_rows", "scoring_functions", "task_config" - ] + ], + "title": "EvaluateRowsRequest" }, "Session": { "type": "object", @@ -5463,6 +5558,7 @@ "turns", "started_at" ], + "title": "Session", "description": "A single session of an interaction with an Agentic System." }, "AgentStepResponse": { @@ -5497,7 +5593,8 @@ "additionalProperties": false, "required": [ "step" - ] + ], + "title": "AgentStepResponse" }, "AgentTurnInputType": { "type": "object", @@ -5511,7 +5608,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "AgentTurnInputType" }, "ArrayType": { "type": "object", @@ -5525,7 +5623,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "ArrayType" }, "BooleanType": { "type": "object", @@ -5539,7 +5638,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "BooleanType" }, "ChatCompletionInputType": { "type": "object", @@ -5553,7 +5653,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "ChatCompletionInputType" }, "CompletionInputType": { "type": "object", @@ -5567,7 +5668,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "CompletionInputType" }, "Dataset": { "type": "object", @@ -5630,7 +5732,8 @@ "dataset_schema", "url", "metadata" - ] + ], + "title": "Dataset" }, "JsonType": { "type": "object", @@ -5644,7 +5747,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "JsonType" }, "NumberType": { "type": "object", @@ -5658,7 +5762,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "NumberType" }, "ObjectType": { "type": "object", @@ -5672,7 +5777,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "ObjectType" }, "ParamType": { "oneOf": [ @@ -5735,7 +5841,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "StringType" }, "UnionType": { "type": "object", @@ -5749,7 +5856,8 @@ "additionalProperties": false, "required": [ "type" - ] + ], + "title": "UnionType" }, "Model": { "type": "object", @@ -5806,14 +5914,16 @@ "type", "metadata", "model_type" - ] + ], + "title": "Model" }, "ModelType": { "type": "string", "enum": [ "llm", "embedding" - ] + ], + "title": "ModelType" }, "PaginatedRowsResult": { "type": "object", @@ -5857,7 +5967,8 @@ "required": [ "rows", "total_count" - ] + ], + "title": "PaginatedRowsResult" }, "ScoringFn": { "type": "object", @@ -5919,7 +6030,8 @@ "type", "metadata", "return_type" - ] + ], + "title": "ScoringFn" }, "Shield": { "type": "object", @@ -5971,6 +6083,7 @@ "provider_id", "type" ], + "title": "Shield", "description": "A safety shield resource that can be used to check content" }, "Span": { @@ -6028,14 +6141,16 @@ "trace_id", "name", "start_time" - ] + ], + "title": "Span" }, "SpanStatus": { "type": "string", "enum": [ "ok", "error" - ] + ], + "title": "SpanStatus" }, "SpanWithStatus": { "type": "object", @@ -6095,7 +6210,8 @@ "trace_id", "name", "start_time" - ] + ], + "title": "SpanWithStatus" }, "QuerySpanTreeResponse": { "type": "object", @@ -6110,7 +6226,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "QuerySpanTreeResponse" }, "Tool": { "type": "object", @@ -6180,7 +6297,8 @@ "tool_host", "description", "parameters" - ] + ], + "title": "Tool" }, "ToolHost": { "type": "string", @@ -6188,7 +6306,8 @@ "distribution", "client", "model_context_protocol" - ] + ], + "title": "ToolHost" }, "ToolGroup": { "type": "object", @@ -6242,7 +6361,8 @@ "provider_resource_id", "provider_id", "type" - ] + ], + "title": "ToolGroup" }, "Trace": { "type": "object", @@ -6267,10 +6387,12 @@ "trace_id", "root_span_id", "start_time" - ] + ], + "title": "Trace" }, "Checkpoint": { - "description": "Checkpoint created during training runs" + "description": "Checkpoint created during training runs", + "title": "Checkpoint" }, "PostTrainingJobArtifactsResponse": { "type": "object", @@ -6290,6 +6412,7 @@ "job_uuid", "checkpoints" ], + "title": "PostTrainingJobArtifactsResponse", "description": "Artifacts of a finetuning job." }, "PostTrainingJobStatusResponse": { @@ -6351,6 +6474,7 @@ "status", "checkpoints" ], + "title": "PostTrainingJobStatusResponse", "description": "Status of a finetuning job." }, "ListPostTrainingJobsResponse": { @@ -6368,14 +6492,16 @@ "additionalProperties": false, "required": [ "job_uuid" - ] + ], + "title": "PostTrainingJob" } } }, "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListPostTrainingJobsResponse" }, "VectorDB": { "type": "object", @@ -6409,7 +6535,8 @@ "type", "embedding_model", "embedding_dimension" - ] + ], + "title": "VectorDB" }, "HealthInfo": { "type": "object", @@ -6421,7 +6548,8 @@ "additionalProperties": false, "required": [ "status" - ] + ], + "title": "HealthInfo" }, "RAGDocument": { "type": "object", @@ -6482,7 +6610,8 @@ "document_id", "content", "metadata" - ] + ], + "title": "RAGDocument" }, "InsertRequest": { "type": "object", @@ -6505,7 +6634,8 @@ "documents", "vector_db_id", "chunk_size_in_tokens" - ] + ], + "title": "InsertRequest" }, "InsertChunksRequest": { "type": "object", @@ -6551,7 +6681,8 @@ "required": [ "content", "metadata" - ] + ], + "title": "Chunk" } }, "ttl_seconds": { @@ -6562,7 +6693,8 @@ "required": [ "vector_db_id", "chunks" - ] + ], + "title": "InsertChunksRequest" }, "InvokeToolRequest": { "type": "object", @@ -6600,7 +6732,8 @@ "required": [ "tool_name", "kwargs" - ] + ], + "title": "InvokeToolRequest" }, "ToolInvocationResult": { "type": "object", @@ -6618,7 +6751,8 @@ "additionalProperties": false, "required": [ "content" - ] + ], + "title": "ToolInvocationResult" }, "ListDatasetsResponse": { "type": "object", @@ -6633,7 +6767,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListDatasetsResponse" }, "ListModelsResponse": { "type": "object", @@ -6648,7 +6783,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListModelsResponse" }, "ProviderInfo": { "type": "object", @@ -6668,7 +6804,8 @@ "api", "provider_id", "provider_type" - ] + ], + "title": "ProviderInfo" }, "ListProvidersResponse": { "type": "object", @@ -6683,7 +6820,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListProvidersResponse" }, "RouteInfo": { "type": "object", @@ -6706,7 +6844,8 @@ "route", "method", "provider_types" - ] + ], + "title": "RouteInfo" }, "ListRoutesResponse": { "type": "object", @@ -6721,7 +6860,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListRoutesResponse" }, "ListScoringFunctionsResponse": { "type": "object", @@ -6736,7 +6876,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListScoringFunctionsResponse" }, "ListShieldsResponse": { "type": "object", @@ -6751,7 +6892,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListShieldsResponse" }, "ListToolGroupsResponse": { "type": "object", @@ -6766,7 +6908,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListToolGroupsResponse" }, "ListToolsResponse": { "type": "object", @@ -6781,7 +6924,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListToolsResponse" }, "ListVectorDBsResponse": { "type": "object", @@ -6796,7 +6940,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "ListVectorDBsResponse" }, "Event": { "oneOf": [ @@ -6828,7 +6973,8 @@ "warn", "error", "critical" - ] + ], + "title": "LogSeverity" }, "SpanEndPayload": { "type": "object", @@ -6846,7 +6992,8 @@ "required": [ "type", "status" - ] + ], + "title": "SpanEndPayload" }, "SpanStartPayload": { "type": "object", @@ -6867,7 +7014,8 @@ "required": [ "type", "name" - ] + ], + "title": "SpanStartPayload" }, "StructuredLogEvent": { "type": "object", @@ -6920,7 +7068,8 @@ "timestamp", "type", "payload" - ] + ], + "title": "StructuredLogEvent" }, "StructuredLogPayload": { "oneOf": [ @@ -6994,7 +7143,8 @@ "type", "message", "severity" - ] + ], + "title": "UnstructuredLogEvent" }, "LogEventRequest": { "type": "object", @@ -7010,7 +7160,8 @@ "required": [ "event", "ttl_seconds" - ] + ], + "title": "LogEventRequest" }, "DPOAlignmentConfig": { "type": "object", @@ -7034,7 +7185,8 @@ "reward_clip", "epsilon", "gamma" - ] + ], + "title": "DPOAlignmentConfig" }, "DataConfig": { "type": "object", @@ -7069,14 +7221,16 @@ "batch_size", "shuffle", "data_format" - ] + ], + "title": "DataConfig" }, "DatasetFormat": { "type": "string", "enum": [ "instruct", "dialog" - ] + ], + "title": "DatasetFormat" }, "EfficiencyConfig": { "type": "object", @@ -7098,7 +7252,8 @@ "default": false } }, - "additionalProperties": false + "additionalProperties": false, + "title": "EfficiencyConfig" }, "OptimizerConfig": { "type": "object", @@ -7122,7 +7277,8 @@ "lr", "weight_decay", "num_warmup_steps" - ] + ], + "title": "OptimizerConfig" }, "OptimizerType": { "type": "string", @@ -7130,7 +7286,8 @@ "adam", "adamw", "sgd" - ] + ], + "title": "OptimizerType" }, "TrainingConfig": { "type": "object", @@ -7169,7 +7326,8 @@ "max_validation_steps", "data_config", "optimizer_config" - ] + ], + "title": "TrainingConfig" }, "PreferenceOptimizeRequest": { "type": "object", @@ -7245,7 +7403,8 @@ "training_config", "hyperparam_search_config", "logger_config" - ] + ], + "title": "PreferenceOptimizeRequest" }, "PostTrainingJob": { "type": "object", @@ -7257,7 +7416,8 @@ "additionalProperties": false, "required": [ "job_uuid" - ] + ], + "title": "PostTrainingJob" }, "DefaultRAGQueryGeneratorConfig": { "type": "object", @@ -7276,7 +7436,8 @@ "required": [ "type", "separator" - ] + ], + "title": "DefaultRAGQueryGeneratorConfig" }, "LLMRAGQueryGeneratorConfig": { "type": "object", @@ -7298,7 +7459,8 @@ "type", "model", "template" - ] + ], + "title": "LLMRAGQueryGeneratorConfig" }, "RAGQueryConfig": { "type": "object", @@ -7320,7 +7482,8 @@ "query_generator_config", "max_tokens_in_context", "max_chunks" - ] + ], + "title": "RAGQueryConfig" }, "RAGQueryGeneratorConfig": { "oneOf": [ @@ -7359,7 +7522,8 @@ "required": [ "content", "vector_db_ids" - ] + ], + "title": "QueryRequest" }, "RAGQueryResult": { "type": "object", @@ -7368,7 +7532,8 @@ "$ref": "#/components/schemas/InterleavedContent" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "RAGQueryResult" }, "QueryChunksRequest": { "type": "object", @@ -7409,7 +7574,8 @@ "required": [ "vector_db_id", "query" - ] + ], + "title": "QueryChunksRequest" }, "QueryChunksResponse": { "type": "object", @@ -7452,7 +7618,8 @@ "required": [ "content", "metadata" - ] + ], + "title": "Chunk" } }, "scores": { @@ -7466,7 +7633,8 @@ "required": [ "chunks", "scores" - ] + ], + "title": "QueryChunksResponse" }, "QueryCondition": { "type": "object", @@ -7505,7 +7673,8 @@ "key", "op", "value" - ] + ], + "title": "QueryCondition" }, "QueryConditionOp": { "type": "string", @@ -7514,7 +7683,8 @@ "ne", "gt", "lt" - ] + ], + "title": "QueryConditionOp" }, "QuerySpansResponse": { "type": "object", @@ -7529,7 +7699,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "QuerySpansResponse" }, "QueryTracesResponse": { "type": "object", @@ -7544,7 +7715,8 @@ "additionalProperties": false, "required": [ "data" - ] + ], + "title": "QueryTracesResponse" }, "RegisterBenchmarkRequest": { "type": "object", @@ -7598,7 +7770,8 @@ "benchmark_id", "dataset_id", "scoring_functions" - ] + ], + "title": "RegisterBenchmarkRequest" }, "RegisterDatasetRequest": { "type": "object", @@ -7652,7 +7825,8 @@ "dataset_id", "dataset_schema", "url" - ] + ], + "title": "RegisterDatasetRequest" }, "RegisterModelRequest": { "type": "object", @@ -7698,7 +7872,8 @@ "additionalProperties": false, "required": [ "model_id" - ] + ], + "title": "RegisterModelRequest" }, "RegisterScoringFunctionRequest": { "type": "object", @@ -7727,7 +7902,8 @@ "scoring_fn_id", "description", "return_type" - ] + ], + "title": "RegisterScoringFunctionRequest" }, "RegisterShieldRequest": { "type": "object", @@ -7770,7 +7946,8 @@ "additionalProperties": false, "required": [ "shield_id" - ] + ], + "title": "RegisterShieldRequest" }, "RegisterToolGroupRequest": { "type": "object", @@ -7814,7 +7991,8 @@ "required": [ "toolgroup_id", "provider_id" - ] + ], + "title": "RegisterToolGroupRequest" }, "RegisterVectorDbRequest": { "type": "object", @@ -7839,7 +8017,8 @@ "required": [ "vector_db_id", "embedding_model" - ] + ], + "title": "RegisterVectorDbRequest" }, "RunEvalRequest": { "type": "object", @@ -7851,7 +8030,8 @@ "additionalProperties": false, "required": [ "task_config" - ] + ], + "title": "RunEvalRequest" }, "RunShieldRequest": { "type": "object", @@ -7896,7 +8076,8 @@ "shield_id", "messages", "params" - ] + ], + "title": "RunShieldRequest" }, "RunShieldResponse": { "type": "object", @@ -7905,7 +8086,8 @@ "$ref": "#/components/schemas/SafetyViolation" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "RunShieldResponse" }, "SaveSpansToDatasetRequest": { "type": "object", @@ -7934,7 +8116,8 @@ "attribute_filters", "attributes_to_save", "dataset_id" - ] + ], + "title": "SaveSpansToDatasetRequest" }, "ScoreRequest": { "type": "object", @@ -7985,7 +8168,8 @@ "required": [ "input_rows", "scoring_functions" - ] + ], + "title": "ScoreRequest" }, "ScoreResponse": { "type": "object", @@ -8000,7 +8184,8 @@ "additionalProperties": false, "required": [ "results" - ] + ], + "title": "ScoreResponse" }, "ScoreBatchRequest": { "type": "object", @@ -8030,7 +8215,8 @@ "dataset_id", "scoring_functions", "save_results_dataset" - ] + ], + "title": "ScoreBatchRequest" }, "ScoreBatchResponse": { "type": "object", @@ -8048,7 +8234,8 @@ "additionalProperties": false, "required": [ "results" - ] + ], + "title": "ScoreBatchResponse" }, "AlgorithmConfig": { "oneOf": [ @@ -8110,7 +8297,8 @@ "apply_lora_to_output", "rank", "alpha" - ] + ], + "title": "LoraFinetuningConfig" }, "QATFinetuningConfig": { "type": "object", @@ -8132,7 +8320,8 @@ "type", "quantizer_name", "group_size" - ] + ], + "title": "QATFinetuningConfig" }, "SupervisedFineTuneRequest": { "type": "object", @@ -8210,7 +8399,8 @@ "hyperparam_search_config", "logger_config", "model" - ] + ], + "title": "SupervisedFineTuneRequest" }, "SyntheticDataGenerateRequest": { "type": "object", @@ -8231,6 +8421,7 @@ "top_k_top_p", "sigmoid" ], + "title": "FilteringFunction", "description": "The type of filtering function." }, "model": { @@ -8241,7 +8432,8 @@ "required": [ "dialogs", "filtering_function" - ] + ], + "title": "SyntheticDataGenerateRequest" }, "SyntheticDataGenerationResponse": { "type": "object", @@ -8304,6 +8496,7 @@ "required": [ "synthetic_data" ], + "title": "SyntheticDataGenerationResponse", "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold." }, "VersionInfo": { @@ -8316,7 +8509,8 @@ "additionalProperties": false, "required": [ "version" - ] + ], + "title": "VersionInfo" } }, "responses": {} diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index 60b777e91..4d13ca565 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -1611,6 +1611,7 @@ components: required: - type - config + title: AgentCandidate AgentConfig: type: object properties: @@ -1638,6 +1639,7 @@ components: - auto - required - none + title: ToolChoice description: >- Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities @@ -1648,6 +1650,7 @@ components: - json - function_tag - python_list + title: ToolPromptFormat description: >- Prompt format for calling custom / zero shot tools. tool_config: @@ -1668,6 +1671,7 @@ components: required: - model - instructions + title: AgentConfig AgentTool: oneOf: - type: string @@ -1689,6 +1693,7 @@ components: required: - name - args + title: AgentToolGroupWithArgs AggregationFunctionType: type: string enum: @@ -1696,6 +1701,7 @@ components: - median - categorical_count - accuracy + title: AggregationFunctionType BasicScoringFnParams: type: object properties: @@ -1710,6 +1716,7 @@ components: additionalProperties: false required: - type + title: BasicScoringFnParams BenchmarkConfig: type: object properties: @@ -1730,6 +1737,7 @@ components: - type - eval_candidate - scoring_params + title: BenchmarkConfig EvalCandidate: oneOf: - $ref: '#/components/schemas/ModelCandidate' @@ -1764,6 +1772,7 @@ components: required: - type - bnf + title: GrammarResponseFormat description: >- Configuration for grammar-guided response generation. GreedySamplingStrategy: @@ -1776,6 +1785,7 @@ components: additionalProperties: false required: - type + title: GreedySamplingStrategy ImageContentItem: type: object properties: @@ -1804,6 +1814,7 @@ components: required: - type - image + title: ImageContentItem description: A image content item InterleavedContent: oneOf: @@ -1847,6 +1858,7 @@ components: required: - type - json_schema + title: JsonSchemaResponseFormat description: >- Configuration for JSON schema-guided response generation. LLMAsJudgeScoringFnParams: @@ -1872,6 +1884,7 @@ components: required: - type - judge_model + title: LLMAsJudgeScoringFnParams ModelCandidate: type: object properties: @@ -1890,6 +1903,7 @@ components: - type - model - sampling_params + title: ModelCandidate RegexParserScoringFnParams: type: object properties: @@ -1908,6 +1922,7 @@ components: additionalProperties: false required: - type + title: RegexParserScoringFnParams ResponseFormat: oneOf: - $ref: '#/components/schemas/JsonSchemaResponseFormat' @@ -1931,6 +1946,7 @@ components: additionalProperties: false required: - strategy + title: SamplingParams SamplingStrategy: oneOf: - $ref: '#/components/schemas/GreedySamplingStrategy' @@ -1972,6 +1988,7 @@ components: required: - role - content + title: SystemMessage description: >- A system message providing instructions or context to the model. TextContentItem: @@ -1990,6 +2007,7 @@ components: required: - type - text + title: TextContentItem description: A text content item ToolConfig: type: object @@ -2001,6 +2019,7 @@ components: - auto - required - none + title: ToolChoice description: >- Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following @@ -2036,6 +2055,7 @@ components: where the function definitions should be inserted. default: append additionalProperties: false + title: ToolConfig description: Configuration for tool use. ToolDef: type: object @@ -2061,6 +2081,7 @@ components: additionalProperties: false required: - name + title: ToolDef ToolParameter: type: object properties: @@ -2087,6 +2108,7 @@ components: - parameter_type - description - required + title: ToolParameter TopKSamplingStrategy: type: object properties: @@ -2100,6 +2122,7 @@ components: required: - type - top_k + title: TopKSamplingStrategy TopPSamplingStrategy: type: object properties: @@ -2115,6 +2138,7 @@ components: additionalProperties: false required: - type + title: TopPSamplingStrategy URL: type: object properties: @@ -2123,6 +2147,7 @@ components: additionalProperties: false required: - uri + title: URL DeprecatedEvaluateRowsRequest: type: object properties: @@ -2149,6 +2174,7 @@ components: - input_rows - scoring_functions - task_config + title: DeprecatedEvaluateRowsRequest EvaluateResponse: type: object properties: @@ -2172,6 +2198,7 @@ components: required: - generations - scores + title: EvaluateResponse ScoringResult: type: object properties: @@ -2201,6 +2228,7 @@ components: required: - score_rows - aggregated_results + title: ScoringResult Benchmark: type: object properties: @@ -2239,6 +2267,7 @@ components: - dataset_id - scoring_functions - metadata + title: Benchmark JobStatus: type: string enum: @@ -2246,6 +2275,7 @@ components: - in_progress - failed - scheduled + title: JobStatus ListBenchmarksResponse: type: object properties: @@ -2256,6 +2286,7 @@ components: additionalProperties: false required: - data + title: ListBenchmarksResponse DeprecatedRegisterEvalTaskRequest: type: object properties: @@ -2286,6 +2317,7 @@ components: - eval_task_id - dataset_id - scoring_functions + title: DeprecatedRegisterEvalTaskRequest DeprecatedRunEvalRequest: type: object properties: @@ -2294,6 +2326,7 @@ components: additionalProperties: false required: - task_config + title: DeprecatedRunEvalRequest Job: type: object properties: @@ -2302,6 +2335,7 @@ components: additionalProperties: false required: - job_id + title: Job AppendRowsRequest: type: object properties: @@ -2323,6 +2357,7 @@ components: required: - dataset_id - rows + title: AppendRowsRequest CompletionMessage: type: object properties: @@ -2359,6 +2394,7 @@ components: - role - content - stop_reason + title: CompletionMessage description: >- A message containing the model's (assistant) response in a chat conversation. Message: @@ -2387,6 +2423,7 @@ components: - wolfram_alpha - photogen - code_interpreter + title: BuiltinTool - type: string arguments: type: object @@ -2418,6 +2455,7 @@ components: - call_id - tool_name - arguments + title: ToolCall ToolDefinition: type: object properties: @@ -2429,6 +2467,7 @@ components: - wolfram_alpha - photogen - code_interpreter + title: BuiltinTool - type: string description: type: string @@ -2439,6 +2478,7 @@ components: additionalProperties: false required: - tool_name + title: ToolDefinition ToolParamDefinition: type: object properties: @@ -2460,6 +2500,7 @@ components: additionalProperties: false required: - param_type + title: ToolParamDefinition ToolResponseMessage: type: object properties: @@ -2481,6 +2522,7 @@ components: - wolfram_alpha - photogen - code_interpreter + title: BuiltinTool - type: string description: Name of the tool that was called content: @@ -2492,6 +2534,7 @@ components: - call_id - tool_name - content + title: ToolResponseMessage description: >- A message representing the result of a tool invocation. UserMessage: @@ -2516,6 +2559,7 @@ components: required: - role - content + title: UserMessage description: >- A message from the user in a chat conversation. BatchChatCompletionRequest: @@ -2541,6 +2585,7 @@ components: - auto - required - none + title: ToolChoice description: >- Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities @@ -2551,6 +2596,7 @@ components: - json - function_tag - python_list + title: ToolPromptFormat description: >- Prompt format for calling custom / zero shot tools. response_format: @@ -2564,10 +2610,12 @@ components: description: >- How many tokens (for each position) to return log probabilities for. additionalProperties: false + title: LogProbConfig additionalProperties: false required: - model - messages_batch + title: BatchChatCompletionRequest BatchChatCompletionResponse: type: object properties: @@ -2578,6 +2626,7 @@ components: additionalProperties: false required: - batch + title: BatchChatCompletionResponse ChatCompletionResponse: type: object properties: @@ -2597,6 +2646,7 @@ components: additionalProperties: false required: - completion_message + title: ChatCompletionResponse description: Response from a chat completion request. MetricEvent: type: object @@ -2638,6 +2688,7 @@ components: - metric - value - unit + title: MetricEvent TokenLogProbs: type: object properties: @@ -2650,6 +2701,7 @@ components: additionalProperties: false required: - logprobs_by_token + title: TokenLogProbs description: Log probabilities for generated tokens. BatchCompletionRequest: type: object @@ -2673,10 +2725,12 @@ components: description: >- How many tokens (for each position) to return log probabilities for. additionalProperties: false + title: LogProbConfig additionalProperties: false required: - model - content_batch + title: BatchCompletionRequest BatchCompletionResponse: type: object properties: @@ -2687,6 +2741,7 @@ components: additionalProperties: false required: - batch + title: BatchCompletionResponse CompletionResponse: type: object properties: @@ -2710,6 +2765,7 @@ components: required: - content - stop_reason + title: CompletionResponse description: Response from a completion request. CancelTrainingJobRequest: type: object @@ -2719,6 +2775,7 @@ components: additionalProperties: false required: - job_uuid + title: CancelTrainingJobRequest ChatCompletionRequest: type: object properties: @@ -2796,6 +2853,7 @@ components: required: - model_id - messages + title: ChatCompletionRequest ChatCompletionResponseEvent: type: object properties: @@ -2829,6 +2887,7 @@ components: required: - event_type - delta + title: ChatCompletionResponseEvent description: >- An event during chat completion generation. ChatCompletionResponseStreamChunk: @@ -2844,6 +2903,7 @@ components: additionalProperties: false required: - event + title: ChatCompletionResponseStreamChunk description: >- A chunk of a streamed chat completion response. ContentDelta: @@ -2871,6 +2931,7 @@ components: required: - type - image + title: ImageDelta TextDelta: type: object properties: @@ -2884,6 +2945,7 @@ components: required: - type - text + title: TextDelta ToolCallDelta: type: object properties: @@ -2902,11 +2964,13 @@ components: - in_progress - failed - succeeded + title: ToolCallParseStatus additionalProperties: false required: - type - tool_call - parse_status + title: ToolCallDelta CompletionRequest: type: object properties: @@ -2947,6 +3011,7 @@ components: required: - model_id - content + title: CompletionRequest CompletionResponseStreamChunk: type: object properties: @@ -2971,6 +3036,7 @@ components: additionalProperties: false required: - delta + title: CompletionResponseStreamChunk description: >- A chunk of a streamed completion response. CreateAgentRequest: @@ -2981,6 +3047,7 @@ components: additionalProperties: false required: - agent_config + title: CreateAgentRequest AgentCreateResponse: type: object properties: @@ -2989,6 +3056,7 @@ components: additionalProperties: false required: - agent_id + title: AgentCreateResponse CreateAgentSessionRequest: type: object properties: @@ -2997,6 +3065,7 @@ components: additionalProperties: false required: - session_name + title: CreateAgentSessionRequest AgentSessionCreateResponse: type: object properties: @@ -3005,6 +3074,7 @@ components: additionalProperties: false required: - session_id + title: AgentSessionCreateResponse CreateAgentTurnRequest: type: object properties: @@ -3035,6 +3105,7 @@ components: required: - content - mime_type + title: Document toolgroups: type: array items: @@ -3044,6 +3115,7 @@ components: additionalProperties: false required: - messages + title: CreateAgentTurnRequest InferenceStep: type: object properties: @@ -3069,6 +3141,7 @@ components: - step_id - step_type - model_response + title: InferenceStep MemoryRetrievalStep: type: object properties: @@ -3097,6 +3170,7 @@ components: - step_type - vector_db_ids - inserted_context + title: MemoryRetrievalStep SafetyViolation: type: object properties: @@ -3118,6 +3192,7 @@ components: required: - violation_level - metadata + title: SafetyViolation ShieldCallStep: type: object properties: @@ -3142,6 +3217,7 @@ components: - turn_id - step_id - step_type + title: ShieldCallStep ToolExecutionStep: type: object properties: @@ -3174,6 +3250,7 @@ components: - step_type - tool_calls - tool_responses + title: ToolExecutionStep ToolResponse: type: object properties: @@ -3187,6 +3264,7 @@ components: - wolfram_alpha - photogen - code_interpreter + title: BuiltinTool - type: string content: $ref: '#/components/schemas/InterleavedContent' @@ -3195,6 +3273,7 @@ components: - call_id - tool_name - content + title: ToolResponse Turn: type: object properties: @@ -3244,6 +3323,7 @@ components: required: - content - mime_type + title: Attachment started_at: type: string format: date-time @@ -3258,6 +3338,7 @@ components: - steps - output_message - started_at + title: Turn description: >- A single turn in an interaction with an Agentic System. ViolationLevel: @@ -3266,6 +3347,7 @@ components: - info - warn - error + title: ViolationLevel AgentTurnResponseEvent: type: object properties: @@ -3274,6 +3356,7 @@ components: additionalProperties: false required: - payload + title: AgentTurnResponseEvent AgentTurnResponseEventPayload: oneOf: - $ref: '#/components/schemas/AgentTurnResponseStepStartPayload' @@ -3303,6 +3386,7 @@ components: - tool_execution - shield_call - memory_retrieval + title: StepType step_id: type: string step_details: @@ -3324,6 +3408,7 @@ components: - step_type - step_id - step_details + title: AgentTurnResponseStepCompletePayload AgentTurnResponseStepProgressPayload: type: object properties: @@ -3338,6 +3423,7 @@ components: - tool_execution - shield_call - memory_retrieval + title: StepType step_id: type: string delta: @@ -3348,6 +3434,7 @@ components: - step_type - step_id - delta + title: AgentTurnResponseStepProgressPayload AgentTurnResponseStepStartPayload: type: object properties: @@ -3362,6 +3449,7 @@ components: - tool_execution - shield_call - memory_retrieval + title: StepType step_id: type: string metadata: @@ -3379,6 +3467,7 @@ components: - event_type - step_type - step_id + title: AgentTurnResponseStepStartPayload AgentTurnResponseStreamChunk: type: object properties: @@ -3387,6 +3476,7 @@ components: additionalProperties: false required: - event + title: AgentTurnResponseStreamChunk description: streamed agent turn completion response. AgentTurnResponseTurnCompletePayload: type: object @@ -3401,6 +3491,7 @@ components: required: - event_type - turn + title: AgentTurnResponseTurnCompletePayload AgentTurnResponseTurnStartPayload: type: object properties: @@ -3414,6 +3505,7 @@ components: required: - event_type - turn_id + title: AgentTurnResponseTurnStartPayload EmbeddingsRequest: type: object properties: @@ -3434,6 +3526,7 @@ components: required: - model_id - contents + title: EmbeddingsRequest EmbeddingsResponse: type: object properties: @@ -3450,6 +3543,7 @@ components: additionalProperties: false required: - embeddings + title: EmbeddingsResponse description: >- Response containing generated embeddings. EvaluateRowsRequest: @@ -3478,6 +3572,7 @@ components: - input_rows - scoring_functions - task_config + title: EvaluateRowsRequest Session: type: object properties: @@ -3498,6 +3593,7 @@ components: - session_name - turns - started_at + title: Session description: >- A single session of an interaction with an Agentic System. AgentStepResponse: @@ -3519,6 +3615,7 @@ components: additionalProperties: false required: - step + title: AgentStepResponse AgentTurnInputType: type: object properties: @@ -3529,6 +3626,7 @@ components: additionalProperties: false required: - type + title: AgentTurnInputType ArrayType: type: object properties: @@ -3539,6 +3637,7 @@ components: additionalProperties: false required: - type + title: ArrayType BooleanType: type: object properties: @@ -3549,6 +3648,7 @@ components: additionalProperties: false required: - type + title: BooleanType ChatCompletionInputType: type: object properties: @@ -3559,6 +3659,7 @@ components: additionalProperties: false required: - type + title: ChatCompletionInputType CompletionInputType: type: object properties: @@ -3569,6 +3670,7 @@ components: additionalProperties: false required: - type + title: CompletionInputType Dataset: type: object properties: @@ -3607,6 +3709,7 @@ components: - dataset_schema - url - metadata + title: Dataset JsonType: type: object properties: @@ -3617,6 +3720,7 @@ components: additionalProperties: false required: - type + title: JsonType NumberType: type: object properties: @@ -3627,6 +3731,7 @@ components: additionalProperties: false required: - type + title: NumberType ObjectType: type: object properties: @@ -3637,6 +3742,7 @@ components: additionalProperties: false required: - type + title: ObjectType ParamType: oneOf: - $ref: '#/components/schemas/StringType' @@ -3672,6 +3778,7 @@ components: additionalProperties: false required: - type + title: StringType UnionType: type: object properties: @@ -3682,6 +3789,7 @@ components: additionalProperties: false required: - type + title: UnionType Model: type: object properties: @@ -3716,11 +3824,13 @@ components: - type - metadata - model_type + title: Model ModelType: type: string enum: - llm - embedding + title: ModelType PaginatedRowsResult: type: object properties: @@ -3744,6 +3854,7 @@ components: required: - rows - total_count + title: PaginatedRowsResult ScoringFn: type: object properties: @@ -3781,6 +3892,7 @@ components: - type - metadata - return_type + title: ScoringFn Shield: type: object properties: @@ -3810,6 +3922,7 @@ components: - provider_resource_id - provider_id - type + title: Shield description: >- A safety shield resource that can be used to check content Span: @@ -3845,11 +3958,13 @@ components: - trace_id - name - start_time + title: Span SpanStatus: type: string enum: - ok - error + title: SpanStatus SpanWithStatus: type: object properties: @@ -3885,6 +4000,7 @@ components: - trace_id - name - start_time + title: SpanWithStatus QuerySpanTreeResponse: type: object properties: @@ -3895,6 +4011,7 @@ components: additionalProperties: false required: - data + title: QuerySpanTreeResponse Tool: type: object properties: @@ -3938,12 +4055,14 @@ components: - tool_host - description - parameters + title: Tool ToolHost: type: string enum: - distribution - client - model_context_protocol + title: ToolHost ToolGroup: type: object properties: @@ -3975,6 +4094,7 @@ components: - provider_resource_id - provider_id - type + title: ToolGroup Trace: type: object properties: @@ -3993,8 +4113,10 @@ components: - trace_id - root_span_id - start_time + title: Trace Checkpoint: description: Checkpoint created during training runs + title: Checkpoint PostTrainingJobArtifactsResponse: type: object properties: @@ -4008,6 +4130,7 @@ components: required: - job_uuid - checkpoints + title: PostTrainingJobArtifactsResponse description: Artifacts of a finetuning job. PostTrainingJobStatusResponse: type: object @@ -4044,6 +4167,7 @@ components: - job_uuid - status - checkpoints + title: PostTrainingJobStatusResponse description: Status of a finetuning job. ListPostTrainingJobsResponse: type: object @@ -4058,9 +4182,11 @@ components: additionalProperties: false required: - job_uuid + title: PostTrainingJob additionalProperties: false required: - data + title: ListPostTrainingJobsResponse VectorDB: type: object properties: @@ -4086,6 +4212,7 @@ components: - type - embedding_model - embedding_dimension + title: VectorDB HealthInfo: type: object properties: @@ -4094,6 +4221,7 @@ components: additionalProperties: false required: - status + title: HealthInfo RAGDocument: type: object properties: @@ -4124,6 +4252,7 @@ components: - document_id - content - metadata + title: RAGDocument InsertRequest: type: object properties: @@ -4140,6 +4269,7 @@ components: - documents - vector_db_id - chunk_size_in_tokens + title: InsertRequest InsertChunksRequest: type: object properties: @@ -4166,12 +4296,14 @@ components: required: - content - metadata + title: Chunk ttl_seconds: type: integer additionalProperties: false required: - vector_db_id - chunks + title: InsertChunksRequest InvokeToolRequest: type: object properties: @@ -4191,6 +4323,7 @@ components: required: - tool_name - kwargs + title: InvokeToolRequest ToolInvocationResult: type: object properties: @@ -4203,6 +4336,7 @@ components: additionalProperties: false required: - content + title: ToolInvocationResult ListDatasetsResponse: type: object properties: @@ -4213,6 +4347,7 @@ components: additionalProperties: false required: - data + title: ListDatasetsResponse ListModelsResponse: type: object properties: @@ -4223,6 +4358,7 @@ components: additionalProperties: false required: - data + title: ListModelsResponse ProviderInfo: type: object properties: @@ -4237,6 +4373,7 @@ components: - api - provider_id - provider_type + title: ProviderInfo ListProvidersResponse: type: object properties: @@ -4247,6 +4384,7 @@ components: additionalProperties: false required: - data + title: ListProvidersResponse RouteInfo: type: object properties: @@ -4263,6 +4401,7 @@ components: - route - method - provider_types + title: RouteInfo ListRoutesResponse: type: object properties: @@ -4273,6 +4412,7 @@ components: additionalProperties: false required: - data + title: ListRoutesResponse ListScoringFunctionsResponse: type: object properties: @@ -4283,6 +4423,7 @@ components: additionalProperties: false required: - data + title: ListScoringFunctionsResponse ListShieldsResponse: type: object properties: @@ -4293,6 +4434,7 @@ components: additionalProperties: false required: - data + title: ListShieldsResponse ListToolGroupsResponse: type: object properties: @@ -4303,6 +4445,7 @@ components: additionalProperties: false required: - data + title: ListToolGroupsResponse ListToolsResponse: type: object properties: @@ -4313,6 +4456,7 @@ components: additionalProperties: false required: - data + title: ListToolsResponse ListVectorDBsResponse: type: object properties: @@ -4323,6 +4467,7 @@ components: additionalProperties: false required: - data + title: ListVectorDBsResponse Event: oneOf: - $ref: '#/components/schemas/UnstructuredLogEvent' @@ -4343,6 +4488,7 @@ components: - warn - error - critical + title: LogSeverity SpanEndPayload: type: object properties: @@ -4356,6 +4502,7 @@ components: required: - type - status + title: SpanEndPayload SpanStartPayload: type: object properties: @@ -4371,6 +4518,7 @@ components: required: - type - name + title: SpanStartPayload StructuredLogEvent: type: object properties: @@ -4403,6 +4551,7 @@ components: - timestamp - type - payload + title: StructuredLogEvent StructuredLogPayload: oneOf: - $ref: '#/components/schemas/SpanStartPayload' @@ -4447,6 +4596,7 @@ components: - type - message - severity + title: UnstructuredLogEvent LogEventRequest: type: object properties: @@ -4458,6 +4608,7 @@ components: required: - event - ttl_seconds + title: LogEventRequest DPOAlignmentConfig: type: object properties: @@ -4475,6 +4626,7 @@ components: - reward_clip - epsilon - gamma + title: DPOAlignmentConfig DataConfig: type: object properties: @@ -4500,11 +4652,13 @@ components: - batch_size - shuffle - data_format + title: DataConfig DatasetFormat: type: string enum: - instruct - dialog + title: DatasetFormat EfficiencyConfig: type: object properties: @@ -4521,6 +4675,7 @@ components: type: boolean default: false additionalProperties: false + title: EfficiencyConfig OptimizerConfig: type: object properties: @@ -4538,12 +4693,14 @@ components: - lr - weight_decay - num_warmup_steps + title: OptimizerConfig OptimizerType: type: string enum: - adam - adamw - sgd + title: OptimizerType TrainingConfig: type: object properties: @@ -4572,6 +4729,7 @@ components: - max_validation_steps - data_config - optimizer_config + title: TrainingConfig PreferenceOptimizeRequest: type: object properties: @@ -4611,6 +4769,7 @@ components: - training_config - hyperparam_search_config - logger_config + title: PreferenceOptimizeRequest PostTrainingJob: type: object properties: @@ -4619,6 +4778,7 @@ components: additionalProperties: false required: - job_uuid + title: PostTrainingJob DefaultRAGQueryGeneratorConfig: type: object properties: @@ -4633,6 +4793,7 @@ components: required: - type - separator + title: DefaultRAGQueryGeneratorConfig LLMRAGQueryGeneratorConfig: type: object properties: @@ -4649,6 +4810,7 @@ components: - type - model - template + title: LLMRAGQueryGeneratorConfig RAGQueryConfig: type: object properties: @@ -4665,6 +4827,7 @@ components: - query_generator_config - max_tokens_in_context - max_chunks + title: RAGQueryConfig RAGQueryGeneratorConfig: oneOf: - $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig' @@ -4689,12 +4852,14 @@ components: required: - content - vector_db_ids + title: QueryRequest RAGQueryResult: type: object properties: content: $ref: '#/components/schemas/InterleavedContent' additionalProperties: false + title: RAGQueryResult QueryChunksRequest: type: object properties: @@ -4716,6 +4881,7 @@ components: required: - vector_db_id - query + title: QueryChunksRequest QueryChunksResponse: type: object properties: @@ -4740,6 +4906,7 @@ components: required: - content - metadata + title: Chunk scores: type: array items: @@ -4748,6 +4915,7 @@ components: required: - chunks - scores + title: QueryChunksResponse QueryCondition: type: object properties: @@ -4768,6 +4936,7 @@ components: - key - op - value + title: QueryCondition QueryConditionOp: type: string enum: @@ -4775,6 +4944,7 @@ components: - ne - gt - lt + title: QueryConditionOp QuerySpansResponse: type: object properties: @@ -4785,6 +4955,7 @@ components: additionalProperties: false required: - data + title: QuerySpansResponse QueryTracesResponse: type: object properties: @@ -4795,6 +4966,7 @@ components: additionalProperties: false required: - data + title: QueryTracesResponse RegisterBenchmarkRequest: type: object properties: @@ -4825,6 +4997,7 @@ components: - benchmark_id - dataset_id - scoring_functions + title: RegisterBenchmarkRequest RegisterDatasetRequest: type: object properties: @@ -4855,6 +5028,7 @@ components: - dataset_id - dataset_schema - url + title: RegisterDatasetRequest RegisterModelRequest: type: object properties: @@ -4879,6 +5053,7 @@ components: additionalProperties: false required: - model_id + title: RegisterModelRequest RegisterScoringFunctionRequest: type: object properties: @@ -4899,6 +5074,7 @@ components: - scoring_fn_id - description - return_type + title: RegisterScoringFunctionRequest RegisterShieldRequest: type: object properties: @@ -4921,6 +5097,7 @@ components: additionalProperties: false required: - shield_id + title: RegisterShieldRequest RegisterToolGroupRequest: type: object properties: @@ -4944,6 +5121,7 @@ components: required: - toolgroup_id - provider_id + title: RegisterToolGroupRequest RegisterVectorDbRequest: type: object properties: @@ -4961,6 +5139,7 @@ components: required: - vector_db_id - embedding_model + title: RegisterVectorDbRequest RunEvalRequest: type: object properties: @@ -4969,6 +5148,7 @@ components: additionalProperties: false required: - task_config + title: RunEvalRequest RunShieldRequest: type: object properties: @@ -4993,12 +5173,14 @@ components: - shield_id - messages - params + title: RunShieldRequest RunShieldResponse: type: object properties: violation: $ref: '#/components/schemas/SafetyViolation' additionalProperties: false + title: RunShieldResponse SaveSpansToDatasetRequest: type: object properties: @@ -5019,6 +5201,7 @@ components: - attribute_filters - attributes_to_save - dataset_id + title: SaveSpansToDatasetRequest ScoreRequest: type: object properties: @@ -5044,6 +5227,7 @@ components: required: - input_rows - scoring_functions + title: ScoreRequest ScoreResponse: type: object properties: @@ -5054,6 +5238,7 @@ components: additionalProperties: false required: - results + title: ScoreResponse ScoreBatchRequest: type: object properties: @@ -5072,6 +5257,7 @@ components: - dataset_id - scoring_functions - save_results_dataset + title: ScoreBatchRequest ScoreBatchResponse: type: object properties: @@ -5084,6 +5270,7 @@ components: additionalProperties: false required: - results + title: ScoreBatchResponse AlgorithmConfig: oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' @@ -5126,6 +5313,7 @@ components: - apply_lora_to_output - rank - alpha + title: LoraFinetuningConfig QATFinetuningConfig: type: object properties: @@ -5142,6 +5330,7 @@ components: - type - quantizer_name - group_size + title: QATFinetuningConfig SupervisedFineTuneRequest: type: object properties: @@ -5182,6 +5371,7 @@ components: - hyperparam_search_config - logger_config - model + title: SupervisedFineTuneRequest SyntheticDataGenerateRequest: type: object properties: @@ -5198,6 +5388,7 @@ components: - top_p - top_k_top_p - sigmoid + title: FilteringFunction description: The type of filtering function. model: type: string @@ -5205,6 +5396,7 @@ components: required: - dialogs - filtering_function + title: SyntheticDataGenerateRequest SyntheticDataGenerationResponse: type: object properties: @@ -5233,6 +5425,7 @@ components: additionalProperties: false required: - synthetic_data + title: SyntheticDataGenerationResponse description: >- Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. @@ -5244,6 +5437,7 @@ components: additionalProperties: false required: - version + title: VersionInfo responses: {} security: - Default: [] diff --git a/llama_stack/strong_typing/schema.py b/llama_stack/strong_typing/schema.py index ddff7cf82..45c7130ba 100644 --- a/llama_stack/strong_typing/schema.py +++ b/llama_stack/strong_typing/schema.py @@ -108,7 +108,9 @@ def get_class_property_docstrings( def docstring_to_schema(data_type: type) -> Schema: short_description, long_description = get_class_docstrings(data_type) - schema: Schema = {} + schema: Schema = { + "title": python_type_to_name(data_type), + } description = "\n".join(filter(None, [short_description, long_description])) if description: