mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
chore!: remove SDG API (#4035)
# What does this PR do? This API hasn't received any traction and close to zero interest from the community. Let's revisit in the future if things change. Signed-off-by: Sébastien Han <seb@redhat.com> Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
This commit is contained in:
parent
44096512b5
commit
4a5ef65286
8 changed files with 395 additions and 1290 deletions
414
docs/static/llama-stack-spec.html
vendored
414
docs/static/llama-stack-spec.html
vendored
|
|
@ -2650,51 +2650,6 @@
|
|||
"deprecated": false
|
||||
}
|
||||
},
|
||||
"/v1/synthetic-data-generation/generate": {
|
||||
"post": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Response containing filtered synthetic data samples and optional statistics",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SyntheticDataGenerationResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest400"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/TooManyRequests429"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalServerError500"
|
||||
},
|
||||
"default": {
|
||||
"$ref": "#/components/responses/DefaultError"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"SyntheticDataGeneration (Coming Soon)"
|
||||
],
|
||||
"summary": "Generate synthetic data based on input dialogs and apply filtering.",
|
||||
"description": "Generate synthetic data based on input dialogs and apply filtering.",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SyntheticDataGenerateRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"deprecated": false
|
||||
}
|
||||
},
|
||||
"/v1/tool-runtime/invoke": {
|
||||
"post": {
|
||||
"responses": {
|
||||
|
|
@ -11478,44 +11433,46 @@
|
|||
],
|
||||
"title": "RegisterShieldRequest"
|
||||
},
|
||||
"CompletionMessage": {
|
||||
"InvokeToolRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"role": {
|
||||
"tool_name": {
|
||||
"type": "string",
|
||||
"const": "assistant",
|
||||
"default": "assistant",
|
||||
"description": "Must be \"assistant\" to identify this as the model's response"
|
||||
"description": "The name of the tool to invoke."
|
||||
},
|
||||
"content": {
|
||||
"$ref": "#/components/schemas/InterleavedContent",
|
||||
"description": "The content of the model's response"
|
||||
},
|
||||
"stop_reason": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"end_of_turn",
|
||||
"end_of_message",
|
||||
"out_of_tokens"
|
||||
],
|
||||
"description": "Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget."
|
||||
},
|
||||
"tool_calls": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ToolCall"
|
||||
"kwargs": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "List of tool calls. Each tool call is a ToolCall object."
|
||||
"description": "A dictionary of arguments to pass to the tool."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"role",
|
||||
"content",
|
||||
"stop_reason"
|
||||
"tool_name",
|
||||
"kwargs"
|
||||
],
|
||||
"title": "CompletionMessage",
|
||||
"description": "A message containing the model's (assistant) response in a chat conversation."
|
||||
"title": "InvokeToolRequest"
|
||||
},
|
||||
"ImageContentItem": {
|
||||
"type": "object",
|
||||
|
|
@ -11584,53 +11541,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Message": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/UserMessage"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SystemMessage"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ToolResponseMessage"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/CompletionMessage"
|
||||
}
|
||||
],
|
||||
"discriminator": {
|
||||
"propertyName": "role",
|
||||
"mapping": {
|
||||
"user": "#/components/schemas/UserMessage",
|
||||
"system": "#/components/schemas/SystemMessage",
|
||||
"tool": "#/components/schemas/ToolResponseMessage",
|
||||
"assistant": "#/components/schemas/CompletionMessage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SystemMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"role": {
|
||||
"type": "string",
|
||||
"const": "system",
|
||||
"default": "system",
|
||||
"description": "Must be \"system\" to identify this as a system message"
|
||||
},
|
||||
"content": {
|
||||
"$ref": "#/components/schemas/InterleavedContent",
|
||||
"description": "The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"role",
|
||||
"content"
|
||||
],
|
||||
"title": "SystemMessage",
|
||||
"description": "A system message providing instructions or context to the model."
|
||||
},
|
||||
"TextContentItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -11653,250 +11563,6 @@
|
|||
"title": "TextContentItem",
|
||||
"description": "A text content item"
|
||||
},
|
||||
"ToolCall": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"call_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"tool_name": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"brave_search",
|
||||
"wolfram_alpha",
|
||||
"photogen",
|
||||
"code_interpreter"
|
||||
],
|
||||
"title": "BuiltinTool"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"arguments": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"call_id",
|
||||
"tool_name",
|
||||
"arguments"
|
||||
],
|
||||
"title": "ToolCall"
|
||||
},
|
||||
"ToolResponseMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"role": {
|
||||
"type": "string",
|
||||
"const": "tool",
|
||||
"default": "tool",
|
||||
"description": "Must be \"tool\" to identify this as a tool response"
|
||||
},
|
||||
"call_id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the tool call this response is for"
|
||||
},
|
||||
"content": {
|
||||
"$ref": "#/components/schemas/InterleavedContent",
|
||||
"description": "The response content from the tool"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"role",
|
||||
"call_id",
|
||||
"content"
|
||||
],
|
||||
"title": "ToolResponseMessage",
|
||||
"description": "A message representing the result of a tool invocation."
|
||||
},
|
||||
"URL": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"description": "The URL string pointing to the resource"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"uri"
|
||||
],
|
||||
"title": "URL",
|
||||
"description": "A URL reference to external content."
|
||||
},
|
||||
"UserMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"role": {
|
||||
"type": "string",
|
||||
"const": "user",
|
||||
"default": "user",
|
||||
"description": "Must be \"user\" to identify this as a user message"
|
||||
},
|
||||
"content": {
|
||||
"$ref": "#/components/schemas/InterleavedContent",
|
||||
"description": "The content of the message, which can include text and other media"
|
||||
},
|
||||
"context": {
|
||||
"$ref": "#/components/schemas/InterleavedContent",
|
||||
"description": "(Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"role",
|
||||
"content"
|
||||
],
|
||||
"title": "UserMessage",
|
||||
"description": "A message from the user in a chat conversation."
|
||||
},
|
||||
"SyntheticDataGenerateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dialogs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Message"
|
||||
},
|
||||
"description": "List of conversation messages to use as input for synthetic data generation"
|
||||
},
|
||||
"filtering_function": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"random",
|
||||
"top_k",
|
||||
"top_p",
|
||||
"top_k_top_p",
|
||||
"sigmoid"
|
||||
],
|
||||
"description": "Type of filtering to apply to generated synthetic data samples"
|
||||
},
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "(Optional) The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"dialogs",
|
||||
"filtering_function"
|
||||
],
|
||||
"title": "SyntheticDataGenerateRequest"
|
||||
},
|
||||
"SyntheticDataGenerationResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"synthetic_data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": "List of generated synthetic data samples that passed the filtering criteria"
|
||||
},
|
||||
"statistics": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "(Optional) Statistical information about the generation process and filtering results"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"synthetic_data"
|
||||
],
|
||||
"title": "SyntheticDataGenerationResponse",
|
||||
"description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
|
||||
},
|
||||
"InvokeToolRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tool_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the tool to invoke."
|
||||
},
|
||||
"kwargs": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "A dictionary of arguments to pass to the tool."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"tool_name",
|
||||
"kwargs"
|
||||
],
|
||||
"title": "InvokeToolRequest"
|
||||
},
|
||||
"ToolInvocationResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -11943,6 +11609,21 @@
|
|||
"title": "ToolInvocationResult",
|
||||
"description": "Result of a tool invocation."
|
||||
},
|
||||
"URL": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"description": "The URL string pointing to the resource"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"uri"
|
||||
],
|
||||
"title": "URL",
|
||||
"description": "A URL reference to external content."
|
||||
},
|
||||
"ToolDef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -13993,10 +13674,6 @@
|
|||
"name": "Shields",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "SyntheticDataGeneration (Coming Soon)",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "ToolGroups",
|
||||
"description": ""
|
||||
|
|
@ -14027,7 +13704,6 @@
|
|||
"Scoring",
|
||||
"ScoringFunctions",
|
||||
"Shields",
|
||||
"SyntheticDataGeneration (Coming Soon)",
|
||||
"ToolGroups",
|
||||
"ToolRuntime",
|
||||
"VectorIO"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue