mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-14 14:42:37 +00:00
use guardrails and run_moderation api
This commit is contained in:
parent
171fb7101d
commit
c10db23d7a
16 changed files with 184 additions and 195 deletions
18
docs/static/deprecated-llama-stack-spec.html
vendored
18
docs/static/deprecated-llama-stack-spec.html
vendored
|
|
@ -2135,7 +2135,7 @@
|
|||
"deprecated": true,
|
||||
"x-llama-stack-extra-body-params": [
|
||||
{
|
||||
"name": "shields",
|
||||
"name": "guardrails",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -2144,12 +2144,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ResponseShieldSpec"
|
||||
"$ref": "#/components/schemas/ResponseGuardrailSpec"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": "List of shields to apply during response generation. Shields provide safety and content moderation.",
|
||||
"description": "List of guardrails to apply during response generation. Guardrails provide safety and content moderation.",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
|
|
@ -3615,13 +3615,13 @@
|
|||
"sampling_params": {
|
||||
"$ref": "#/components/schemas/SamplingParams"
|
||||
},
|
||||
"input_shields": {
|
||||
"input_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"output_shields": {
|
||||
"output_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
|
@ -9606,20 +9606,20 @@
|
|||
"title": "OpenAIResponseUsage",
|
||||
"description": "Usage information for OpenAI response."
|
||||
},
|
||||
"ResponseShieldSpec": {
|
||||
"ResponseGuardrailSpec": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type/identifier of the shield."
|
||||
"description": "The type/identifier of the guardrail."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "ResponseShieldSpec",
|
||||
"description": "Specification for a shield to apply during response generation."
|
||||
"title": "ResponseGuardrailSpec",
|
||||
"description": "Specification for a guardrail to apply during response generation."
|
||||
},
|
||||
"OpenAIResponseInputTool": {
|
||||
"oneOf": [
|
||||
|
|
|
|||
20
docs/static/deprecated-llama-stack-spec.yaml
vendored
20
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -1569,16 +1569,16 @@ paths:
|
|||
required: true
|
||||
deprecated: true
|
||||
x-llama-stack-extra-body-params:
|
||||
- name: shields
|
||||
- name: guardrails
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ResponseShieldSpec'
|
||||
- $ref: '#/components/schemas/ResponseGuardrailSpec'
|
||||
description: >-
|
||||
List of shields to apply during response generation. Shields provide safety
|
||||
and content moderation.
|
||||
List of guardrails to apply during response generation. Guardrails provide
|
||||
safety and content moderation.
|
||||
required: false
|
||||
/v1/openai/v1/responses/{response_id}:
|
||||
get:
|
||||
|
|
@ -2667,11 +2667,11 @@ components:
|
|||
properties:
|
||||
sampling_params:
|
||||
$ref: '#/components/schemas/SamplingParams'
|
||||
input_shields:
|
||||
input_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_shields:
|
||||
output_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
|
@ -7177,18 +7177,18 @@ components:
|
|||
- total_tokens
|
||||
title: OpenAIResponseUsage
|
||||
description: Usage information for OpenAI response.
|
||||
ResponseShieldSpec:
|
||||
ResponseGuardrailSpec:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The type/identifier of the shield.
|
||||
description: The type/identifier of the guardrail.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
title: ResponseShieldSpec
|
||||
title: ResponseGuardrailSpec
|
||||
description: >-
|
||||
Specification for a shield to apply during response generation.
|
||||
Specification for a guardrail to apply during response generation.
|
||||
OpenAIResponseInputTool:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
|
|
|
|||
|
|
@ -2090,13 +2090,13 @@
|
|||
"sampling_params": {
|
||||
"$ref": "#/components/schemas/SamplingParams"
|
||||
},
|
||||
"input_shields": {
|
||||
"input_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"output_shields": {
|
||||
"output_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
|
|
|||
|
|
@ -1500,11 +1500,11 @@ components:
|
|||
properties:
|
||||
sampling_params:
|
||||
$ref: '#/components/schemas/SamplingParams'
|
||||
input_shields:
|
||||
input_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_shields:
|
||||
output_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
|
|
|||
14
docs/static/llama-stack-spec.html
vendored
14
docs/static/llama-stack-spec.html
vendored
|
|
@ -1833,7 +1833,7 @@
|
|||
"deprecated": false,
|
||||
"x-llama-stack-extra-body-params": [
|
||||
{
|
||||
"name": "shields",
|
||||
"name": "guardrails",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -1842,12 +1842,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ResponseShieldSpec"
|
||||
"$ref": "#/components/schemas/ResponseGuardrailSpec"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": "List of shields to apply during response generation. Shields provide safety and content moderation.",
|
||||
"description": "List of guardrails to apply during response generation. Guardrails provide safety and content moderation.",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
|
|
@ -7854,20 +7854,20 @@
|
|||
"title": "OpenAIResponseUsage",
|
||||
"description": "Usage information for OpenAI response."
|
||||
},
|
||||
"ResponseShieldSpec": {
|
||||
"ResponseGuardrailSpec": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type/identifier of the shield."
|
||||
"description": "The type/identifier of the guardrail."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "ResponseShieldSpec",
|
||||
"description": "Specification for a shield to apply during response generation."
|
||||
"title": "ResponseGuardrailSpec",
|
||||
"description": "Specification for a guardrail to apply during response generation."
|
||||
},
|
||||
"OpenAIResponseInputTool": {
|
||||
"oneOf": [
|
||||
|
|
|
|||
16
docs/static/llama-stack-spec.yaml
vendored
16
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -1448,16 +1448,16 @@ paths:
|
|||
required: true
|
||||
deprecated: false
|
||||
x-llama-stack-extra-body-params:
|
||||
- name: shields
|
||||
- name: guardrails
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ResponseShieldSpec'
|
||||
- $ref: '#/components/schemas/ResponseGuardrailSpec'
|
||||
description: >-
|
||||
List of shields to apply during response generation. Shields provide safety
|
||||
and content moderation.
|
||||
List of guardrails to apply during response generation. Guardrails provide
|
||||
safety and content moderation.
|
||||
required: false
|
||||
/v1/responses/{response_id}:
|
||||
get:
|
||||
|
|
@ -5973,18 +5973,18 @@ components:
|
|||
- total_tokens
|
||||
title: OpenAIResponseUsage
|
||||
description: Usage information for OpenAI response.
|
||||
ResponseShieldSpec:
|
||||
ResponseGuardrailSpec:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The type/identifier of the shield.
|
||||
description: The type/identifier of the guardrail.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
title: ResponseShieldSpec
|
||||
title: ResponseGuardrailSpec
|
||||
description: >-
|
||||
Specification for a shield to apply during response generation.
|
||||
Specification for a guardrail to apply during response generation.
|
||||
OpenAIResponseInputTool:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
|
|
|
|||
18
docs/static/stainless-llama-stack-spec.html
vendored
18
docs/static/stainless-llama-stack-spec.html
vendored
|
|
@ -1833,7 +1833,7 @@
|
|||
"deprecated": false,
|
||||
"x-llama-stack-extra-body-params": [
|
||||
{
|
||||
"name": "shields",
|
||||
"name": "guardrails",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -1842,12 +1842,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ResponseShieldSpec"
|
||||
"$ref": "#/components/schemas/ResponseGuardrailSpec"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": "List of shields to apply during response generation. Shields provide safety and content moderation.",
|
||||
"description": "List of guardrails to apply during response generation. Guardrails provide safety and content moderation.",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
|
|
@ -9526,20 +9526,20 @@
|
|||
"title": "OpenAIResponseUsage",
|
||||
"description": "Usage information for OpenAI response."
|
||||
},
|
||||
"ResponseShieldSpec": {
|
||||
"ResponseGuardrailSpec": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The type/identifier of the shield."
|
||||
"description": "The type/identifier of the guardrail."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"title": "ResponseShieldSpec",
|
||||
"description": "Specification for a shield to apply during response generation."
|
||||
"title": "ResponseGuardrailSpec",
|
||||
"description": "Specification for a guardrail to apply during response generation."
|
||||
},
|
||||
"OpenAIResponseInputTool": {
|
||||
"oneOf": [
|
||||
|
|
@ -15192,13 +15192,13 @@
|
|||
"sampling_params": {
|
||||
"$ref": "#/components/schemas/SamplingParams"
|
||||
},
|
||||
"input_shields": {
|
||||
"input_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"output_shields": {
|
||||
"output_guardrails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
|
|
|
|||
20
docs/static/stainless-llama-stack-spec.yaml
vendored
20
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -1451,16 +1451,16 @@ paths:
|
|||
required: true
|
||||
deprecated: false
|
||||
x-llama-stack-extra-body-params:
|
||||
- name: shields
|
||||
- name: guardrails
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ResponseShieldSpec'
|
||||
- $ref: '#/components/schemas/ResponseGuardrailSpec'
|
||||
description: >-
|
||||
List of shields to apply during response generation. Shields provide safety
|
||||
and content moderation.
|
||||
List of guardrails to apply during response generation. Guardrails provide
|
||||
safety and content moderation.
|
||||
required: false
|
||||
/v1/responses/{response_id}:
|
||||
get:
|
||||
|
|
@ -7186,18 +7186,18 @@ components:
|
|||
- total_tokens
|
||||
title: OpenAIResponseUsage
|
||||
description: Usage information for OpenAI response.
|
||||
ResponseShieldSpec:
|
||||
ResponseGuardrailSpec:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The type/identifier of the shield.
|
||||
description: The type/identifier of the guardrail.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
title: ResponseShieldSpec
|
||||
title: ResponseGuardrailSpec
|
||||
description: >-
|
||||
Specification for a shield to apply during response generation.
|
||||
Specification for a guardrail to apply during response generation.
|
||||
OpenAIResponseInputTool:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
|
||||
|
|
@ -11478,11 +11478,11 @@ components:
|
|||
properties:
|
||||
sampling_params:
|
||||
$ref: '#/components/schemas/SamplingParams'
|
||||
input_shields:
|
||||
input_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_shields:
|
||||
output_guardrails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue