From bba6edd06b36604d9ce292475ba4519b575bf3ad Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Thu, 14 Nov 2024 12:51:38 -0800 Subject: [PATCH] Fix OpenAPI generation to have text/event-stream for streamable methods --- docs/openapi_generator/generate.py | 16 - docs/openapi_generator/pyopenapi/generator.py | 14 + docs/resources/llama-stack-spec.html | 620 +++++++++--------- docs/resources/llama-stack-spec.yaml | 542 +++++++-------- 4 files changed, 595 insertions(+), 597 deletions(-) diff --git a/docs/openapi_generator/generate.py b/docs/openapi_generator/generate.py index c41e3d003..97d265aeb 100644 --- a/docs/openapi_generator/generate.py +++ b/docs/openapi_generator/generate.py @@ -34,20 +34,6 @@ from llama_stack.distribution.stack import LlamaStack -# TODO: this should be fixed in the generator itself so it reads appropriate annotations -STREAMING_ENDPOINTS = [ - "/agents/turn/create", - "/inference/chat_completion", -] - - -def patch_sse_stream_responses(spec: Specification): - for path, path_item in spec.document.paths.items(): - if path in STREAMING_ENDPOINTS: - content = path_item.post.responses["200"].content.pop("application/json") - path_item.post.responses["200"].content["text/event-stream"] = content - - def main(output_dir: str): output_dir = Path(output_dir) if not output_dir.exists(): @@ -74,8 +60,6 @@ def main(output_dir: str): ), ) - patch_sse_stream_responses(spec) - with open(output_dir / "llama-stack-spec.yaml", "w", encoding="utf-8") as fp: yaml.dump(spec.get_json(), fp, allow_unicode=True) diff --git a/docs/openapi_generator/pyopenapi/generator.py b/docs/openapi_generator/pyopenapi/generator.py index 0c8dcbdcb..12e3396e4 100644 --- a/docs/openapi_generator/pyopenapi/generator.py +++ b/docs/openapi_generator/pyopenapi/generator.py @@ -4,6 +4,7 @@ # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. +import collections import hashlib import ipaddress import typing @@ -176,9 +177,20 @@ def build_content( ) -> Dict[str, MediaType]: "Creates the content subtree for a request or response." + def has_iterator_type(t): + if typing.get_origin(t) is typing.Union: + return any(has_iterator_type(a) for a in typing.get_args(t)) + else: + # TODO: needs a proper fix where we let all types correctly flow upwards + # and then test against AsyncIterator + return "StreamChunk" in str(t) + if is_generic_list(payload_type): media_type = "application/jsonl" item_type = unwrap_generic_list(payload_type) + elif has_iterator_type(payload_type): + item_type = payload_type + media_type = "text/event-stream" else: media_type = "application/json" item_type = payload_type @@ -671,6 +683,8 @@ def generate(self) -> Document: for extra_tag_group in extra_tag_groups.values(): tags.extend(extra_tag_group) + tags = sorted(tags, key=lambda t: t.name) + tag_groups = [] if operation_tags: tag_groups.append( diff --git a/docs/resources/llama-stack-spec.html b/docs/resources/llama-stack-spec.html index 44554f2ff..a0b4bccca 100644 --- a/docs/resources/llama-stack-spec.html +++ b/docs/resources/llama-stack-spec.html @@ -21,7 +21,7 @@ "info": { "title": "[DRAFT] Llama Stack Specification", "version": "0.0.1", - "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-11-13 21:05:58.323310" + "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-11-14 12:51:12.176325" }, "servers": [ { @@ -195,7 +195,7 @@ "200": { "description": "Completion response. **OR** streamed completion response.", "content": { - "application/json": { + "text/event-stream": { "schema": { "oneOf": [ { @@ -7965,118 +7965,63 @@ ], "tags": [ { - "name": "Agents" - }, - { - "name": "DatasetIO" - }, - { - "name": "Models" - }, - { - "name": "Inference" - }, - { - "name": "BatchInference" - }, - { - "name": "Memory" - }, - { - "name": "Safety" - }, - { - "name": "Inspect" - }, - { - "name": "EvalTasks" - }, - { - "name": "Scoring" - }, - { - "name": "Datasets" - }, - { - "name": "PostTraining" - }, - { - "name": "Eval" - }, - { - "name": "Shields" - }, - { - "name": "Telemetry" - }, - { - "name": "ScoringFunctions" - }, - { - "name": "MemoryBanks" - }, - { - "name": "SyntheticDataGeneration" - }, - { - "name": "BuiltinTool", - "description": "" + "name": "AgentCandidate", + "description": "" }, { - "name": "CompletionMessage", - "description": "" + "name": "AgentConfig", + "description": "" }, { - "name": "ImageMedia", - "description": "" + "name": "AgentCreateResponse", + "description": "" }, { - "name": "SamplingParams", - "description": "" + "name": "AgentSessionCreateResponse", + "description": "" }, { - "name": "SamplingStrategy", - "description": "" + "name": "AgentStepResponse", + "description": "" }, { - "name": "StopReason", - "description": "" + "name": "AgentTurnResponseEvent", + "description": "Streamed agent execution response.\n\n" }, { - "name": "SystemMessage", - "description": "" + "name": "AgentTurnResponseStepCompletePayload", + "description": "" }, { - "name": "ToolCall", - "description": "" + "name": "AgentTurnResponseStepProgressPayload", + "description": "" }, { - "name": "ToolChoice", - "description": "" + "name": "AgentTurnResponseStepStartPayload", + "description": "" }, { - "name": "ToolDefinition", - "description": "" + "name": "AgentTurnResponseStreamChunk", + "description": "streamed agent turn completion response.\n\n" }, { - "name": "ToolParamDefinition", - "description": "" + "name": "AgentTurnResponseTurnCompletePayload", + "description": "" }, { - "name": "ToolPromptFormat", - "description": "This Enum refers to the prompt format for calling custom / zero shot tools\n\n`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli\n\n" + "name": "AgentTurnResponseTurnStartPayload", + "description": "" }, { - "name": "ToolResponseMessage", - "description": "" + "name": "Agents" }, { - "name": "URL", - "description": "" + "name": "AppEvalTaskConfig", + "description": "" }, { - "name": "UserMessage", - "description": "" + "name": "Attachment", + "description": "" }, { "name": "BatchChatCompletionRequest", @@ -8094,6 +8039,17 @@ "name": "BatchCompletionResponse", "description": "" }, + { + "name": "BatchInference" + }, + { + "name": "BenchmarkEvalTaskConfig", + "description": "" + }, + { + "name": "BuiltinTool", + "description": "" + }, { "name": "CancelTrainingJobRequest", "description": "" @@ -8119,16 +8075,16 @@ "description": "SSE-stream of these events.\n\n" }, { - "name": "TokenLogProbs", - "description": "" + "name": "Checkpoint", + "description": "Checkpoint created during training runs\n\n" }, { - "name": "ToolCallDelta", - "description": "" + "name": "CodeInterpreterToolDefinition", + "description": "" }, { - "name": "ToolCallParseStatus", - "description": "" + "name": "CompletionMessage", + "description": "" }, { "name": "CompletionRequest", @@ -8143,240 +8099,210 @@ "description": "streamed completion response.\n\n" }, { - "name": "AgentConfig", - "description": "" + "name": "CreateAgentRequest", + "description": "" }, { - "name": "CodeInterpreterToolDefinition", - "description": "" + "name": "CreateAgentSessionRequest", + "description": "" }, { - "name": "FunctionCallToolDefinition", - "description": "" + "name": "CreateAgentTurnRequest", + "description": "" }, { - "name": "MemoryToolDefinition", - "description": "" + "name": "DPOAlignmentConfig", + "description": "" }, { - "name": "PhotogenToolDefinition", - "description": "" + "name": "Dataset", + "description": "" }, { - "name": "RestAPIExecutionConfig", - "description": "" + "name": "DatasetIO" }, { - "name": "RestAPIMethod", - "description": "" + "name": "Datasets" }, { - "name": "SearchToolDefinition", - "description": "" + "name": "DeleteAgentsRequest", + "description": "" }, { - "name": "WolframAlphaToolDefinition", - "description": "" + "name": "DeleteAgentsSessionRequest", + "description": "" }, { - "name": "CreateAgentRequest", - "description": "" + "name": "DeleteModelRequest", + "description": "" }, { - "name": "AgentCreateResponse", - "description": "" + "name": "DoraFinetuningConfig", + "description": "" }, { - "name": "CreateAgentSessionRequest", - "description": "" + "name": "EmbeddingsRequest", + "description": "" }, { - "name": "AgentSessionCreateResponse", - "description": "" + "name": "EmbeddingsResponse", + "description": "" }, { - "name": "Attachment", - "description": "" + "name": "Eval" }, { - "name": "CreateAgentTurnRequest", - "description": "" + "name": "EvalTask", + "description": "" }, { - "name": "AgentTurnResponseEvent", - "description": "Streamed agent execution response.\n\n" + "name": "EvalTasks" }, { - "name": "AgentTurnResponseStepCompletePayload", - "description": "" + "name": "EvaluateResponse", + "description": "" }, { - "name": "AgentTurnResponseStepProgressPayload", - "description": "" + "name": "EvaluateRowsRequest", + "description": "" }, { - "name": "AgentTurnResponseStepStartPayload", - "description": "" + "name": "FinetuningAlgorithm", + "description": "" }, { - "name": "AgentTurnResponseStreamChunk", - "description": "streamed agent turn completion response.\n\n" + "name": "FunctionCallToolDefinition", + "description": "" }, { - "name": "AgentTurnResponseTurnCompletePayload", - "description": "" + "name": "GetAgentsSessionRequest", + "description": "" }, { - "name": "AgentTurnResponseTurnStartPayload", - "description": "" + "name": "GraphMemoryBank", + "description": "" }, { - "name": "InferenceStep", - "description": "" + "name": "GraphMemoryBankParams", + "description": "" }, { - "name": "MemoryRetrievalStep", - "description": "" + "name": "HealthInfo", + "description": "" }, { - "name": "SafetyViolation", - "description": "" + "name": "ImageMedia", + "description": "" }, { - "name": "ShieldCallStep", - "description": "" + "name": "Inference" }, { - "name": "ToolExecutionStep", - "description": "" + "name": "InferenceStep", + "description": "" }, { - "name": "ToolResponse", - "description": "" + "name": "InsertDocumentsRequest", + "description": "" }, { - "name": "Turn", - "description": "A single turn in an interaction with an Agentic System.\n\n" + "name": "Inspect" }, { - "name": "ViolationLevel", - "description": "" + "name": "Job", + "description": "" }, { - "name": "DeleteAgentsRequest", - "description": "" + "name": "JobCancelRequest", + "description": "" }, { - "name": "DeleteAgentsSessionRequest", - "description": "" - }, - { - "name": "DeleteModelRequest", - "description": "" - }, - { - "name": "EmbeddingsRequest", - "description": "" + "name": "JobStatus", + "description": "" }, { - "name": "EmbeddingsResponse", - "description": "" + "name": "KeyValueMemoryBank", + "description": "" }, { - "name": "AgentCandidate", - "description": "" + "name": "KeyValueMemoryBankParams", + "description": "" }, { - "name": "AppEvalTaskConfig", - "description": "" + "name": "KeywordMemoryBank", + "description": "" }, { - "name": "BenchmarkEvalTaskConfig", - "description": "" + "name": "KeywordMemoryBankParams", + "description": "" }, { "name": "LLMAsJudgeScoringFnParams", "description": "" }, { - "name": "ModelCandidate", - "description": "" - }, - { - "name": "RegexParserScoringFnParams", - "description": "" - }, - { - "name": "EvaluateRowsRequest", - "description": "" + "name": "LogEventRequest", + "description": "" }, { - "name": "EvaluateResponse", - "description": "" + "name": "LogSeverity", + "description": "" }, { - "name": "ScoringResult", - "description": "" + "name": "LoraFinetuningConfig", + "description": "" }, { - "name": "GetAgentsSessionRequest", - "description": "" + "name": "Memory" }, { - "name": "GraphMemoryBank", - "description": "" + "name": "MemoryBankDocument", + "description": "" }, { - "name": "KeyValueMemoryBank", - "description": "" + "name": "MemoryBanks" }, { - "name": "KeywordMemoryBank", - "description": "" + "name": "MemoryRetrievalStep", + "description": "" }, { - "name": "Session", - "description": "A single session of an interaction with an Agentic System.\n\n" + "name": "MemoryToolDefinition", + "description": "" }, { - "name": "VectorMemoryBank", - "description": "" + "name": "MetricEvent", + "description": "" }, { - "name": "AgentStepResponse", - "description": "" + "name": "Model", + "description": "" }, { - "name": "Dataset", - "description": "" + "name": "ModelCandidate", + "description": "" }, { - "name": "EvalTask", - "description": "" + "name": "Models" }, { - "name": "Model", - "description": "" + "name": "OptimizerConfig", + "description": "" }, { "name": "PaginatedRowsResult", "description": "" }, { - "name": "ScoringFn", - "description": "" - }, - { - "name": "Shield", - "description": "A safety shield resource that can be used to check content\n\n" + "name": "PhotogenToolDefinition", + "description": "" }, { - "name": "Trace", - "description": "" + "name": "PostTraining" }, { - "name": "Checkpoint", - "description": "Checkpoint created during training runs\n\n" + "name": "PostTrainingJob", + "description": "" }, { "name": "PostTrainingJobArtifactsResponse", @@ -8395,200 +8321,274 @@ "description": "Status of a finetuning job.\n\n" }, { - "name": "PostTrainingJob", - "description": "" + "name": "PreferenceOptimizeRequest", + "description": "" }, { - "name": "HealthInfo", - "description": "" + "name": "ProviderInfo", + "description": "" }, { - "name": "MemoryBankDocument", - "description": "" + "name": "QLoraFinetuningConfig", + "description": "" }, { - "name": "InsertDocumentsRequest", - "description": "" + "name": "QueryDocumentsRequest", + "description": "" }, { - "name": "JobCancelRequest", - "description": "" + "name": "QueryDocumentsResponse", + "description": "" }, { - "name": "JobStatus", - "description": "" + "name": "RLHFAlgorithm", + "description": "" }, { - "name": "ProviderInfo", - "description": "" + "name": "RegexParserScoringFnParams", + "description": "" + }, + { + "name": "RegisterDatasetRequest", + "description": "" + }, + { + "name": "RegisterEvalTaskRequest", + "description": "" + }, + { + "name": "RegisterMemoryBankRequest", + "description": "" + }, + { + "name": "RegisterModelRequest", + "description": "" + }, + { + "name": "RegisterScoringFunctionRequest", + "description": "" + }, + { + "name": "RegisterShieldRequest", + "description": "" + }, + { + "name": "RestAPIExecutionConfig", + "description": "" + }, + { + "name": "RestAPIMethod", + "description": "" }, { "name": "RouteInfo", "description": "" }, { - "name": "LogSeverity", - "description": "" + "name": "RunEvalRequest", + "description": "" }, { - "name": "MetricEvent", - "description": "" + "name": "RunShieldRequest", + "description": "" }, { - "name": "SpanEndPayload", - "description": "" + "name": "RunShieldResponse", + "description": "" }, { - "name": "SpanStartPayload", - "description": "" + "name": "Safety" }, { - "name": "SpanStatus", - "description": "" + "name": "SafetyViolation", + "description": "" }, { - "name": "StructuredLogEvent", - "description": "" + "name": "SamplingParams", + "description": "" }, { - "name": "UnstructuredLogEvent", - "description": "" + "name": "SamplingStrategy", + "description": "" }, { - "name": "LogEventRequest", - "description": "" + "name": "ScoreBatchRequest", + "description": "" }, { - "name": "DPOAlignmentConfig", - "description": "" + "name": "ScoreBatchResponse", + "description": "" }, { - "name": "OptimizerConfig", - "description": "" + "name": "ScoreRequest", + "description": "" }, { - "name": "RLHFAlgorithm", - "description": "" + "name": "ScoreResponse", + "description": "" }, { - "name": "TrainingConfig", - "description": "" + "name": "Scoring" }, { - "name": "PreferenceOptimizeRequest", - "description": "" + "name": "ScoringFn", + "description": "" }, { - "name": "QueryDocumentsRequest", - "description": "" + "name": "ScoringFunctions" }, { - "name": "QueryDocumentsResponse", - "description": "" + "name": "ScoringResult", + "description": "" }, { - "name": "RegisterDatasetRequest", - "description": "" + "name": "SearchToolDefinition", + "description": "" }, { - "name": "RegisterEvalTaskRequest", - "description": "" + "name": "Session", + "description": "A single session of an interaction with an Agentic System.\n\n" }, { - "name": "GraphMemoryBankParams", - "description": "" + "name": "Shield", + "description": "A safety shield resource that can be used to check content\n\n" }, { - "name": "KeyValueMemoryBankParams", - "description": "" + "name": "ShieldCallStep", + "description": "" }, { - "name": "KeywordMemoryBankParams", - "description": "" + "name": "Shields" }, { - "name": "VectorMemoryBankParams", - "description": "" + "name": "SpanEndPayload", + "description": "" }, { - "name": "RegisterMemoryBankRequest", - "description": "" + "name": "SpanStartPayload", + "description": "" }, { - "name": "RegisterModelRequest", - "description": "" + "name": "SpanStatus", + "description": "" }, { - "name": "RegisterScoringFunctionRequest", - "description": "" + "name": "StopReason", + "description": "" }, { - "name": "RegisterShieldRequest", - "description": "" + "name": "StructuredLogEvent", + "description": "" }, { - "name": "RunEvalRequest", - "description": "" + "name": "SupervisedFineTuneRequest", + "description": "" }, { - "name": "Job", - "description": "" + "name": "SyntheticDataGenerateRequest", + "description": "" }, { - "name": "RunShieldRequest", - "description": "" + "name": "SyntheticDataGeneration" }, { - "name": "RunShieldResponse", - "description": "" + "name": "SyntheticDataGenerationResponse", + "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" }, { - "name": "ScoreRequest", - "description": "" + "name": "SystemMessage", + "description": "" }, { - "name": "ScoreResponse", - "description": "" + "name": "Telemetry" }, { - "name": "ScoreBatchRequest", - "description": "" + "name": "TokenLogProbs", + "description": "" }, { - "name": "ScoreBatchResponse", - "description": "" + "name": "ToolCall", + "description": "" }, { - "name": "DoraFinetuningConfig", - "description": "" + "name": "ToolCallDelta", + "description": "" }, { - "name": "FinetuningAlgorithm", - "description": "" + "name": "ToolCallParseStatus", + "description": "" }, { - "name": "LoraFinetuningConfig", - "description": "" + "name": "ToolChoice", + "description": "" }, { - "name": "QLoraFinetuningConfig", - "description": "" + "name": "ToolDefinition", + "description": "" }, { - "name": "SupervisedFineTuneRequest", - "description": "" + "name": "ToolExecutionStep", + "description": "" }, { - "name": "SyntheticDataGenerateRequest", - "description": "" + "name": "ToolParamDefinition", + "description": "" }, { - "name": "SyntheticDataGenerationResponse", - "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n" + "name": "ToolPromptFormat", + "description": "This Enum refers to the prompt format for calling custom / zero shot tools\n\n`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n (parameters)\n\nThe detailed prompts for each of these formats are added to llama cli\n\n" + }, + { + "name": "ToolResponse", + "description": "" + }, + { + "name": "ToolResponseMessage", + "description": "" + }, + { + "name": "Trace", + "description": "" + }, + { + "name": "TrainingConfig", + "description": "" + }, + { + "name": "Turn", + "description": "A single turn in an interaction with an Agentic System.\n\n" + }, + { + "name": "URL", + "description": "" + }, + { + "name": "UnstructuredLogEvent", + "description": "" }, { "name": "UpdateModelRequest", "description": "" + }, + { + "name": "UserMessage", + "description": "" + }, + { + "name": "VectorMemoryBank", + "description": "" + }, + { + "name": "VectorMemoryBankParams", + "description": "" + }, + { + "name": "ViolationLevel", + "description": "" + }, + { + "name": "WolframAlphaToolDefinition", + "description": "" } ], "x-tagGroups": [ diff --git a/docs/resources/llama-stack-spec.yaml b/docs/resources/llama-stack-spec.yaml index fc28405d7..2ca26f759 100644 --- a/docs/resources/llama-stack-spec.yaml +++ b/docs/resources/llama-stack-spec.yaml @@ -3414,7 +3414,7 @@ info: description: "This is the specification of the llama stack that provides\n \ \ a set of endpoints and their corresponding interfaces that are tailored\ \ to\n best leverage Llama Models. The specification is still in\ - \ draft and subject to change.\n Generated at 2024-11-13 21:05:58.323310" + \ draft and subject to change.\n Generated at 2024-11-14 12:51:12.176325" title: '[DRAFT] Llama Stack Specification' version: 0.0.1 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema @@ -4065,7 +4065,7 @@ paths: responses: '200': content: - application/json: + text/event-stream: schema: oneOf: - $ref: '#/components/schemas/CompletionResponse' @@ -4824,67 +4824,51 @@ security: servers: - url: http://any-hosted-llama-stack.com tags: -- name: Agents -- name: DatasetIO -- name: Models -- name: Inference -- name: BatchInference -- name: Memory -- name: Safety -- name: Inspect -- name: EvalTasks -- name: Scoring -- name: Datasets -- name: PostTraining -- name: Eval -- name: Shields -- name: Telemetry -- name: ScoringFunctions -- name: MemoryBanks -- name: SyntheticDataGeneration -- description: - name: BuiltinTool -- description: + name: AgentCandidate +- description: + name: AgentConfig +- description: - name: CompletionMessage -- description: - name: ImageMedia -- description: - name: SamplingParams -- description: - name: SamplingStrategy -- description: - name: StopReason -- description: - name: SystemMessage -- description: - name: ToolCall -- description: - name: ToolChoice -- description: - name: ToolDefinition -- description: - name: ToolParamDefinition -- description: "This Enum refers to the prompt format for calling custom / zero shot\ - \ tools\n\n`json` --\n Refers to the json format for calling tools.\n The\ - \ json format takes the form like\n {\n \"type\": \"function\",\n \ - \ \"function\" : {\n \"name\": \"function_name\",\n \ - \ \"description\": \"function_description\",\n \"parameters\": {...}\n\ - \ }\n }\n\n`function_tag` --\n This is an example of how you could\ - \ define\n your own user defined format for making tool calls.\n The function_tag\ - \ format looks like this,\n (parameters)\n\ - \nThe detailed prompts for each of these formats are added to llama cli\n\n" - name: ToolPromptFormat -- description: ' + name: AgentTurnResponseEvent +- description: - name: ToolResponseMessage -- description: - name: URL -- description: - name: UserMessage + name: AgentTurnResponseStepCompletePayload +- description: + name: AgentTurnResponseStepProgressPayload +- description: + name: AgentTurnResponseStepStartPayload +- description: 'streamed agent turn completion response. + + + ' + name: AgentTurnResponseStreamChunk +- description: + name: AgentTurnResponseTurnCompletePayload +- description: + name: AgentTurnResponseTurnStartPayload +- name: Agents +- description: + name: AppEvalTaskConfig +- description: + name: Attachment - description: name: BatchChatCompletionRequest @@ -4897,6 +4881,12 @@ tags: - description: name: BatchCompletionResponse +- name: BatchInference +- description: + name: BenchmarkEvalTaskConfig +- description: + name: BuiltinTool - description: name: CancelTrainingJobRequest @@ -4923,13 +4913,17 @@ tags: ' name: ChatCompletionResponseStreamChunk -- description: - name: TokenLogProbs -- description: - name: ToolCallDelta -- description: ' + name: Checkpoint +- description: - name: ToolCallParseStatus + name: CodeInterpreterToolDefinition +- description: + name: CompletionMessage - description: name: CompletionRequest @@ -4944,96 +4938,22 @@ tags: ' name: CompletionResponseStreamChunk -- description: - name: AgentConfig -- description: - name: CodeInterpreterToolDefinition -- description: - name: FunctionCallToolDefinition -- description: - name: MemoryToolDefinition -- description: - name: PhotogenToolDefinition -- description: - name: RestAPIExecutionConfig -- description: - name: RestAPIMethod -- description: - name: SearchToolDefinition -- description: - name: WolframAlphaToolDefinition - description: name: CreateAgentRequest -- description: - name: AgentCreateResponse - description: name: CreateAgentSessionRequest -- description: - name: AgentSessionCreateResponse -- description: - name: Attachment - description: name: CreateAgentTurnRequest -- description: 'Streamed agent execution response. - - - ' - name: AgentTurnResponseEvent -- description: - name: AgentTurnResponseStepCompletePayload -- description: - name: AgentTurnResponseStepProgressPayload -- description: - name: AgentTurnResponseStepStartPayload -- description: 'streamed agent turn completion response. - - - ' - name: AgentTurnResponseStreamChunk -- description: - name: AgentTurnResponseTurnCompletePayload -- description: - name: AgentTurnResponseTurnStartPayload -- description: - name: InferenceStep -- description: - name: MemoryRetrievalStep -- description: - name: SafetyViolation -- description: - name: ShieldCallStep -- description: - name: ToolExecutionStep -- description: - name: ToolResponse -- description: 'A single turn in an interaction with an Agentic System. - - - ' - name: Turn -- description: - name: ViolationLevel + name: DPOAlignmentConfig +- description: + name: Dataset +- name: DatasetIO +- name: Datasets - description: name: DeleteAgentsRequest @@ -5043,82 +4963,112 @@ tags: - description: name: DeleteModelRequest +- description: + name: DoraFinetuningConfig - description: name: EmbeddingsRequest - description: name: EmbeddingsResponse -- description: - name: AgentCandidate -- description: - name: AppEvalTaskConfig -- description: - name: BenchmarkEvalTaskConfig -- description: - name: LLMAsJudgeScoringFnParams -- description: - name: ModelCandidate -- description: + name: EvalTask +- name: EvalTasks +- description: - name: RegexParserScoringFnParams + name: EvaluateResponse - description: name: EvaluateRowsRequest -- description: - name: EvaluateResponse -- description: - name: ScoringResult + name: FinetuningAlgorithm +- description: + name: FunctionCallToolDefinition - description: name: GetAgentsSessionRequest - description: name: GraphMemoryBank -- description: - name: KeyValueMemoryBank -- description: + name: HealthInfo +- description: + name: ImageMedia +- name: Inference +- description: + name: InferenceStep +- description: - name: KeywordMemoryBank -- description: 'A single session of an interaction with an Agentic System. - - - ' - name: Session -- description: + name: Job +- description: - name: VectorMemoryBank -- description: + name: JobStatus +- description: - name: AgentStepResponse -- description: - name: Dataset -- description: - name: EvalTask + name: KeyValueMemoryBank +- description: + name: KeyValueMemoryBankParams +- description: + name: KeywordMemoryBank +- description: + name: KeywordMemoryBankParams +- description: + name: LLMAsJudgeScoringFnParams +- description: + name: LogEventRequest +- description: + name: LogSeverity +- description: + name: LoraFinetuningConfig +- name: Memory +- description: + name: MemoryBankDocument +- name: MemoryBanks +- description: + name: MemoryRetrievalStep +- description: + name: MemoryToolDefinition +- description: + name: MetricEvent - description: name: Model +- description: + name: ModelCandidate +- name: Models +- description: + name: OptimizerConfig - description: name: PaginatedRowsResult -- description: - name: ScoringFn -- description: 'A safety shield resource that can be used to check content - - - ' - name: Shield -- description: - name: Trace -- description: 'Checkpoint created during training runs - - - ' - name: Checkpoint +- description: + name: PhotogenToolDefinition +- name: PostTraining +- description: + name: PostTrainingJob - description: 'Artifacts of a finetuning job. @@ -5139,83 +5089,31 @@ tags: ' name: PostTrainingJobStatusResponse -- description: - name: PostTrainingJob -- description: - name: HealthInfo -- description: - name: MemoryBankDocument -- description: - name: InsertDocumentsRequest -- description: - name: JobCancelRequest -- description: - name: JobStatus + name: PreferenceOptimizeRequest - description: name: ProviderInfo -- description: - name: RouteInfo -- description: - name: LogSeverity -- description: - name: MetricEvent -- description: - name: SpanEndPayload -- description: - name: SpanStartPayload -- description: - name: SpanStatus -- description: - name: StructuredLogEvent -- description: - name: UnstructuredLogEvent -- description: - name: LogEventRequest -- description: - name: DPOAlignmentConfig -- description: - name: OptimizerConfig -- description: - name: RLHFAlgorithm -- description: - name: TrainingConfig -- description: - name: PreferenceOptimizeRequest + name: QLoraFinetuningConfig - description: name: QueryDocumentsRequest - description: name: QueryDocumentsResponse +- description: + name: RLHFAlgorithm +- description: + name: RegexParserScoringFnParams - description: name: RegisterDatasetRequest - description: name: RegisterEvalTaskRequest -- description: - name: GraphMemoryBankParams -- description: - name: KeyValueMemoryBankParams -- description: - name: KeywordMemoryBankParams -- description: - name: VectorMemoryBankParams - description: name: RegisterMemoryBankRequest @@ -5228,44 +5126,81 @@ tags: - description: name: RegisterShieldRequest +- description: + name: RestAPIExecutionConfig +- description: + name: RestAPIMethod +- description: + name: RouteInfo - description: name: RunEvalRequest -- description: - name: Job - description: name: RunShieldRequest - description: name: RunShieldResponse -- description: - name: ScoreRequest -- description: - name: ScoreResponse +- name: Safety +- description: + name: SafetyViolation +- description: + name: SamplingParams +- description: + name: SamplingStrategy - description: name: ScoreBatchRequest - description: name: ScoreBatchResponse -- description: - name: DoraFinetuningConfig -- description: + name: ScoreRequest +- description: + name: ScoreResponse +- name: Scoring +- description: + name: ScoringFn +- name: ScoringFunctions +- description: + name: ScoringResult +- description: - name: FinetuningAlgorithm -- description: ' + name: Session +- description: 'A safety shield resource that can be used to check content + + + ' + name: Shield +- description: + name: ShieldCallStep +- name: Shields +- description: + name: SpanEndPayload +- description: - name: LoraFinetuningConfig -- description: + name: SpanStatus +- description: + name: StopReason +- description: - name: QLoraFinetuningConfig + name: StructuredLogEvent - description: name: SupervisedFineTuneRequest - description: name: SyntheticDataGenerateRequest +- name: SyntheticDataGeneration - description: 'Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. @@ -5273,9 +5208,74 @@ tags: ' name: SyntheticDataGenerationResponse +- description: + name: SystemMessage +- name: Telemetry +- description: + name: TokenLogProbs +- description: + name: ToolCall +- description: + name: ToolCallDelta +- description: + name: ToolCallParseStatus +- description: + name: ToolChoice +- description: + name: ToolDefinition +- description: + name: ToolExecutionStep +- description: + name: ToolParamDefinition +- description: "This Enum refers to the prompt format for calling custom / zero shot\ + \ tools\n\n`json` --\n Refers to the json format for calling tools.\n The\ + \ json format takes the form like\n {\n \"type\": \"function\",\n \ + \ \"function\" : {\n \"name\": \"function_name\",\n \ + \ \"description\": \"function_description\",\n \"parameters\": {...}\n\ + \ }\n }\n\n`function_tag` --\n This is an example of how you could\ + \ define\n your own user defined format for making tool calls.\n The function_tag\ + \ format looks like this,\n (parameters)\n\ + \nThe detailed prompts for each of these formats are added to llama cli\n\n" + name: ToolPromptFormat +- description: + name: ToolResponse +- description: + name: ToolResponseMessage +- description: + name: Trace +- description: + name: TrainingConfig +- description: 'A single turn in an interaction with an Agentic System. + + + ' + name: Turn +- description: + name: URL +- description: + name: UnstructuredLogEvent - description: name: UpdateModelRequest +- description: + name: UserMessage +- description: + name: VectorMemoryBank +- description: + name: VectorMemoryBankParams +- description: + name: ViolationLevel +- description: + name: WolframAlphaToolDefinition x-tagGroups: - name: Operations tags: