diff --git a/docs/resources/llama-stack-spec.html b/docs/resources/llama-stack-spec.html index 5a26c3ef4..8156039a9 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-07 22:57:18.550543" + "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-11 13:59:59.544511" }, "servers": [ { @@ -839,7 +839,7 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ModelDefWithProvider" + "$ref": "#/components/schemas/Model" }, { "type": "null" @@ -991,7 +991,7 @@ "schema": { "oneOf": [ { - "$ref": "#/components/schemas/ShieldDefWithProvider" + "$ref": "#/components/schemas/Shield" }, { "type": "null" @@ -1514,7 +1514,7 @@ "content": { "application/jsonl": { "schema": { - "$ref": "#/components/schemas/ModelDefWithProvider" + "$ref": "#/components/schemas/Model" } } } @@ -1643,7 +1643,7 @@ "content": { "application/jsonl": { "schema": { - "$ref": "#/components/schemas/ShieldDefWithProvider" + "$ref": "#/components/schemas/Shield" } } } @@ -1881,7 +1881,14 @@ "post": { "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + } } }, "tags": [ @@ -1947,7 +1954,14 @@ "post": { "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Shield" + } + } + } } }, "tags": [ @@ -5366,15 +5380,23 @@ "provider_id" ] }, - "ModelDefWithProvider": { + "Model": { "type": "object", "properties": { "identifier": { "type": "string" }, - "llama_model": { + "provider_resource_id": { "type": "string" }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "model", + "default": "model" + }, "metadata": { "type": "object", "additionalProperties": { @@ -5399,23 +5421,15 @@ } ] } - }, - "type": { - "type": "string", - "const": "model", - "default": "model" - }, - "provider_id": { - "type": "string" } }, "additionalProperties": false, "required": [ "identifier", - "llama_model", - "metadata", + "provider_resource_id", + "provider_id", "type", - "provider_id" + "metadata" ] }, "PaginatedRowsResult": { @@ -5668,15 +5682,26 @@ "provider_id" ] }, - "ShieldDefWithProvider": { + "Shield": { "type": "object", "properties": { "identifier": { "type": "string" }, - "shield_type": { + "provider_resource_id": { "type": "string" }, + "provider_id": { + "type": "string" + }, + "type": { + "type": "string", + "const": "shield", + "default": "shield" + }, + "shield_type": { + "$ref": "#/components/schemas/ShieldType" + }, "params": { "type": "object", "additionalProperties": { @@ -5701,23 +5726,26 @@ } ] } - }, - "type": { - "type": "string", - "const": "shield", - "default": "shield" - }, - "provider_id": { - "type": "string" } }, "additionalProperties": false, "required": [ "identifier", - "shield_type", - "params", + "provider_resource_id", + "provider_id", "type", - "provider_id" + "shield_type", + "params" + ], + "title": "A safety shield resource that can be used to check content" + }, + "ShieldType": { + "type": "string", + "enum": [ + "generic_content_shield", + "llama_guard", + "code_scanner", + "prompt_guard" ] }, "Trace": { @@ -6666,13 +6694,44 @@ "RegisterModelRequest": { "type": "object", "properties": { - "model": { - "$ref": "#/components/schemas/ModelDefWithProvider" + "model_id": { + "type": "string" + }, + "provider_model_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } } }, "additionalProperties": false, "required": [ - "model" + "model_id" ] }, "RegisterScoringFunctionRequest": { @@ -6690,13 +6749,48 @@ "RegisterShieldRequest": { "type": "object", "properties": { - "shield": { - "$ref": "#/components/schemas/ShieldDefWithProvider" + "shield_id": { + "type": "string" + }, + "shield_type": { + "$ref": "#/components/schemas/ShieldType" + }, + "provider_shield_id": { + "type": "string" + }, + "provider_id": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] + } } }, "additionalProperties": false, "required": [ - "shield" + "shield_id", + "shield_type" ] }, "RunEvalRequest": { @@ -6737,7 +6831,7 @@ "RunShieldRequest": { "type": "object", "properties": { - "identifier": { + "shield_id": { "type": "string" }, "messages": { @@ -6787,7 +6881,7 @@ }, "additionalProperties": false, "required": [ - "identifier", + "shield_id", "messages", "params" ] @@ -7250,35 +7344,26 @@ ], "tags": [ { - "name": "Inspect" + "name": "ScoringFunctions" }, { - "name": "MemoryBanks" + "name": "Datasets" + }, + { + "name": "Inspect" }, { "name": "Safety" }, + { + "name": "Eval" + }, + { + "name": "Inference" + }, { "name": "BatchInference" }, - { - "name": "Telemetry" - }, - { - "name": "DatasetIO" - }, - { - "name": "Models" - }, - { - "name": "Shields" - }, - { - "name": "Scoring" - }, - { - "name": "Datasets" - }, { "name": "Agents" }, @@ -7286,22 +7371,31 @@ "name": "PostTraining" }, { - "name": "Eval" - }, - { - "name": "ScoringFunctions" - }, - { - "name": "EvalTasks" + "name": "Shields" }, { "name": "Memory" }, + { + "name": "Scoring" + }, { "name": "SyntheticDataGeneration" }, { - "name": "Inference" + "name": "EvalTasks" + }, + { + "name": "MemoryBanks" + }, + { + "name": "DatasetIO" + }, + { + "name": "Models" + }, + { + "name": "Telemetry" }, { "name": "BuiltinTool", @@ -7636,8 +7730,8 @@ "description": "" }, { - "name": "ModelDefWithProvider", - "description": "" + "name": "Model", + "description": "" }, { "name": "PaginatedRowsResult", @@ -7648,8 +7742,12 @@ "description": "" }, { - "name": "ShieldDefWithProvider", - "description": "" + "name": "Shield", + "description": "A safety shield resource that can be used to check content\n\n" + }, + { + "name": "ShieldType", + "description": "" }, { "name": "Trace", @@ -7945,8 +8043,8 @@ "MemoryRetrievalStep", "MemoryToolDefinition", "MetricEvent", + "Model", "ModelCandidate", - "ModelDefWithProvider", "OptimizerConfig", "PaginatedRowsResult", "PhotogenToolDefinition", @@ -7985,8 +8083,9 @@ "ScoringResult", "SearchToolDefinition", "Session", + "Shield", "ShieldCallStep", - "ShieldDefWithProvider", + "ShieldType", "SpanEndPayload", "SpanStartPayload", "SpanStatus", diff --git a/docs/resources/llama-stack-spec.yaml b/docs/resources/llama-stack-spec.yaml index d165cedcf..0e6571301 100644 --- a/docs/resources/llama-stack-spec.yaml +++ b/docs/resources/llama-stack-spec.yaml @@ -1493,6 +1493,36 @@ components: - value - unit type: object + Model: + additionalProperties: false + properties: + identifier: + type: string + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + type: + const: model + default: model + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - metadata + type: object ModelCandidate: additionalProperties: false properties: @@ -1511,36 +1541,6 @@ components: - model - sampling_params type: object - ModelDefWithProvider: - additionalProperties: false - properties: - identifier: - type: string - llama_model: - type: string - metadata: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - provider_id: - type: string - type: - const: model - default: model - type: string - required: - - identifier - - llama_model - - metadata - - type - - provider_id - type: object OptimizerConfig: additionalProperties: false properties: @@ -1879,10 +1879,24 @@ components: RegisterModelRequest: additionalProperties: false properties: - model: - $ref: '#/components/schemas/ModelDefWithProvider' + metadata: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + model_id: + type: string + provider_id: + type: string + provider_model_id: + type: string required: - - model + - model_id type: object RegisterScoringFunctionRequest: additionalProperties: false @@ -1895,10 +1909,27 @@ components: RegisterShieldRequest: additionalProperties: false properties: - shield: - $ref: '#/components/schemas/ShieldDefWithProvider' + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_shield_id: + type: string + shield_id: + type: string + shield_type: + $ref: '#/components/schemas/ShieldType' required: - - shield + - shield_id + - shield_type type: object RestAPIExecutionConfig: additionalProperties: false @@ -1980,8 +2011,6 @@ components: RunShieldRequest: additionalProperties: false properties: - identifier: - type: string messages: items: oneOf: @@ -2000,8 +2029,10 @@ components: - type: array - type: object type: object + shield_id: + type: string required: - - identifier + - shield_id - messages - params type: object @@ -2343,6 +2374,40 @@ components: - started_at title: A single session of an interaction with an Agentic System. type: object + Shield: + additionalProperties: false + properties: + identifier: + type: string + params: + additionalProperties: + oneOf: + - type: 'null' + - type: boolean + - type: number + - type: string + - type: array + - type: object + type: object + provider_id: + type: string + provider_resource_id: + type: string + shield_type: + $ref: '#/components/schemas/ShieldType' + type: + const: shield + default: shield + type: string + required: + - identifier + - provider_resource_id + - provider_id + - type + - shield_type + - params + title: A safety shield resource that can be used to check content + type: object ShieldCallStep: additionalProperties: false properties: @@ -2367,36 +2432,13 @@ components: - step_id - step_type type: object - ShieldDefWithProvider: - additionalProperties: false - properties: - identifier: - type: string - params: - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - type: object - provider_id: - type: string - shield_type: - type: string - type: - const: shield - default: shield - type: string - required: - - identifier - - shield_type - - params - - type - - provider_id - type: object + ShieldType: + enum: + - generic_content_shield + - llama_guard + - code_scanner + - prompt_guard + type: string SpanEndPayload: additionalProperties: false properties: @@ -3026,7 +3068,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-07 22:57:18.550543" + \ draft and subject to change.\n Generated at 2024-11-11 13:59:59.544511" title: '[DRAFT] Llama Stack Specification' version: 0.0.1 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema @@ -3851,7 +3893,7 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/ModelDefWithProvider' + - $ref: '#/components/schemas/Model' - type: 'null' description: OK tags: @@ -3871,7 +3913,7 @@ paths: content: application/jsonl: schema: - $ref: '#/components/schemas/ModelDefWithProvider' + $ref: '#/components/schemas/Model' description: OK tags: - Models @@ -3893,6 +3935,10 @@ paths: required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Model' description: OK tags: - Models @@ -4264,7 +4310,7 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/ShieldDefWithProvider' + - $ref: '#/components/schemas/Shield' - type: 'null' description: OK tags: @@ -4284,7 +4330,7 @@ paths: content: application/jsonl: schema: - $ref: '#/components/schemas/ShieldDefWithProvider' + $ref: '#/components/schemas/Shield' description: OK tags: - Shields @@ -4306,6 +4352,10 @@ paths: required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' description: OK tags: - Shields @@ -4384,24 +4434,24 @@ security: servers: - url: http://any-hosted-llama-stack.com tags: -- name: Inspect -- name: MemoryBanks -- name: Safety -- name: BatchInference -- name: Telemetry -- name: DatasetIO -- name: Models -- name: Shields -- name: Scoring +- name: ScoringFunctions - name: Datasets +- name: Inspect +- name: Safety +- name: Eval +- name: Inference +- name: BatchInference - name: Agents - name: PostTraining -- name: Eval -- name: ScoringFunctions -- name: EvalTasks +- name: Shields - name: Memory +- name: Scoring - name: SyntheticDataGeneration -- name: Inference +- name: EvalTasks +- name: MemoryBanks +- name: DatasetIO +- name: Models +- name: Telemetry - description: name: BuiltinTool - description: name: EvalTaskDefWithProvider -- description: - name: ModelDefWithProvider +- description: + name: Model - description: name: PaginatedRowsResult - description: name: ScoringFnDefWithProvider -- description: - name: ShieldDefWithProvider +- description: 'A safety shield resource that can be used to check content + + + ' + name: Shield +- description: + name: ShieldType - description: name: Trace - description: 'Checkpoint created during training runs @@ -4909,8 +4962,8 @@ x-tagGroups: - MemoryRetrievalStep - MemoryToolDefinition - MetricEvent + - Model - ModelCandidate - - ModelDefWithProvider - OptimizerConfig - PaginatedRowsResult - PhotogenToolDefinition @@ -4949,8 +5002,9 @@ x-tagGroups: - ScoringResult - SearchToolDefinition - Session + - Shield - ShieldCallStep - - ShieldDefWithProvider + - ShieldType - SpanEndPayload - SpanStartPayload - SpanStatus