Merge branch 'main' into inference_refactor

This commit is contained in:
Botao Chen 2024-12-18 14:14:14 -08:00
commit 75c881770a
8 changed files with 272 additions and 676 deletions

View file

@ -2598,6 +2598,22 @@
}
]
},
"Message": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
},
"SamplingParams": {
"type": "object",
"properties": {
@ -2893,9 +2909,16 @@
]
},
"URL": {
"type": "string",
"format": "uri",
"pattern": "^(https?://|file://|data:)"
"type": "object",
"properties": {
"uri": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"uri"
]
},
"UserMessage": {
"type": "object",
@ -2929,20 +2952,7 @@
"items": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
"$ref": "#/components/schemas/Message"
}
}
},
@ -3052,6 +3062,90 @@
"job_uuid"
]
},
"ResponseFormat": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "json_schema",
"default": "json_schema"
},
"json_schema": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"json_schema"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grammar",
"default": "grammar"
},
"bnf": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"bnf"
]
}
]
},
"ChatCompletionRequest": {
"type": "object",
"properties": {
@ -3061,20 +3155,7 @@
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
"$ref": "#/components/schemas/Message"
}
},
"sampling_params": {
@ -3093,88 +3174,7 @@
"$ref": "#/components/schemas/ToolPromptFormat"
},
"response_format": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "json_schema",
"default": "json_schema"
},
"json_schema": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"json_schema"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grammar",
"default": "grammar"
},
"bnf": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"bnf"
]
}
]
"$ref": "#/components/schemas/ResponseFormat"
},
"stream": {
"type": "boolean"
@ -3329,88 +3329,7 @@
"$ref": "#/components/schemas/SamplingParams"
},
"response_format": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "json_schema",
"default": "json_schema"
},
"json_schema": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"json_schema"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grammar",
"default": "grammar"
},
"bnf": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"type",
"bnf"
]
}
]
"$ref": "#/components/schemas/ResponseFormat"
},
"stream": {
"type": "boolean"
@ -7278,20 +7197,7 @@
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
"$ref": "#/components/schemas/Message"
}
},
"params": {
@ -7657,20 +7563,7 @@
"dialogs": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
"$ref": "#/components/schemas/Message"
}
},
"filtering_function": {
@ -8129,6 +8022,10 @@
"name": "MemoryToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryToolDefinition\" />"
},
{
"name": "Message",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Message\" />"
},
{
"name": "MetricEvent",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MetricEvent\" />"
@ -8247,6 +8144,10 @@
"name": "RegisterShieldRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterShieldRequest\" />"
},
{
"name": "ResponseFormat",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ResponseFormat\" />"
},
{
"name": "RestAPIExecutionConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RestAPIExecutionConfig\" />"
@ -8591,6 +8492,7 @@
"MemoryBankDocument",
"MemoryRetrievalStep",
"MemoryToolDefinition",
"Message",
"MetricEvent",
"Model",
"ModelCandidate",
@ -8619,6 +8521,7 @@
"RegisterModelRequest",
"RegisterScoringFunctionRequest",
"RegisterShieldRequest",
"ResponseFormat",
"RestAPIExecutionConfig",
"RestAPIMethod",
"RouteInfo",

View file

@ -313,11 +313,7 @@ components:
messages_batch:
items:
items:
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
$ref: '#/components/schemas/Message'
type: array
type: array
model:
@ -422,56 +418,12 @@ components:
type: object
messages:
items:
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
$ref: '#/components/schemas/Message'
type: array
model_id:
type: string
response_format:
oneOf:
- additionalProperties: false
properties:
json_schema:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: json_schema
default: json_schema
type: string
required:
- type
- json_schema
type: object
- additionalProperties: false
properties:
bnf:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: grammar
default: grammar
type: string
required:
- type
- bnf
type: object
$ref: '#/components/schemas/ResponseFormat'
sampling_params:
$ref: '#/components/schemas/SamplingParams'
stream:
@ -598,47 +550,7 @@ components:
model_id:
type: string
response_format:
oneOf:
- additionalProperties: false
properties:
json_schema:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: json_schema
default: json_schema
type: string
required:
- type
- json_schema
type: object
- additionalProperties: false
properties:
bnf:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: grammar
default: grammar
type: string
required:
- type
- bnf
type: object
$ref: '#/components/schemas/ResponseFormat'
sampling_params:
$ref: '#/components/schemas/SamplingParams'
stream:
@ -1467,6 +1379,12 @@ components:
- max_tokens_in_context
- max_chunks
type: object
Message:
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
MetricEvent:
additionalProperties: false
properties:
@ -2121,6 +2039,48 @@ components:
required:
- shield_id
type: object
ResponseFormat:
oneOf:
- additionalProperties: false
properties:
json_schema:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: json_schema
default: json_schema
type: string
required:
- type
- json_schema
type: object
- additionalProperties: false
properties:
bnf:
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
type: object
type:
const: grammar
default: grammar
type: string
required:
- type
- bnf
type: object
RestAPIExecutionConfig:
additionalProperties: false
properties:
@ -2203,11 +2163,7 @@ components:
properties:
messages:
items:
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
$ref: '#/components/schemas/Message'
type: array
params:
additionalProperties:
@ -2744,11 +2700,7 @@ components:
properties:
dialogs:
items:
oneOf:
- $ref: '#/components/schemas/UserMessage'
- $ref: '#/components/schemas/SystemMessage'
- $ref: '#/components/schemas/ToolResponseMessage'
- $ref: '#/components/schemas/CompletionMessage'
$ref: '#/components/schemas/Message'
type: array
filtering_function:
enum:
@ -3105,9 +3057,13 @@ components:
title: A single turn in an interaction with an Agentic System.
type: object
URL:
format: uri
pattern: ^(https?://|file://|data:)
type: string
additionalProperties: false
properties:
uri:
type: string
required:
- uri
type: object
UnregisterDatasetRequest:
additionalProperties: false
properties:
@ -5020,6 +4976,8 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/MemoryToolDefinition"
/>
name: MemoryToolDefinition
- description: <SchemaDefinition schemaRef="#/components/schemas/Message" />
name: Message
- description: <SchemaDefinition schemaRef="#/components/schemas/MetricEvent" />
name: MetricEvent
- description: <SchemaDefinition schemaRef="#/components/schemas/Model" />
@ -5104,6 +5062,8 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/RegisterShieldRequest"
/>
name: RegisterShieldRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/ResponseFormat" />
name: ResponseFormat
- description: <SchemaDefinition schemaRef="#/components/schemas/RestAPIExecutionConfig"
/>
name: RestAPIExecutionConfig
@ -5367,6 +5327,7 @@ x-tagGroups:
- MemoryBankDocument
- MemoryRetrievalStep
- MemoryToolDefinition
- Message
- MetricEvent
- Model
- ModelCandidate
@ -5395,6 +5356,7 @@ x-tagGroups:
- RegisterModelRequest
- RegisterScoringFunctionRequest
- RegisterShieldRequest
- ResponseFormat
- RestAPIExecutionConfig
- RestAPIMethod
- RouteInfo