mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 10:42:39 +00:00
Update OpenAPI generator to output discriminator
This commit is contained in:
parent
6c205e1d5a
commit
83b6921302
4 changed files with 151 additions and 27 deletions
|
@ -125,6 +125,7 @@ class JsonSchemaAnyOf(JsonSchemaNode):
|
||||||
@dataclass
|
@dataclass
|
||||||
class JsonSchemaOneOf(JsonSchemaNode):
|
class JsonSchemaOneOf(JsonSchemaNode):
|
||||||
oneOf: List["JsonSchemaAny"]
|
oneOf: List["JsonSchemaAny"]
|
||||||
|
discriminator: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
JsonSchemaAny = Union[
|
JsonSchemaAny = Union[
|
||||||
|
|
|
@ -36,6 +36,7 @@ from typing import (
|
||||||
)
|
)
|
||||||
|
|
||||||
import jsonschema
|
import jsonschema
|
||||||
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
from . import docstring
|
from . import docstring
|
||||||
from .auxiliary import (
|
from .auxiliary import (
|
||||||
|
@ -329,7 +330,6 @@ class JsonSchemaGenerator:
|
||||||
if metadata is not None:
|
if metadata is not None:
|
||||||
# type is Annotated[T, ...]
|
# type is Annotated[T, ...]
|
||||||
typ = typing.get_args(data_type)[0]
|
typ = typing.get_args(data_type)[0]
|
||||||
|
|
||||||
schema = self._simple_type_to_schema(typ)
|
schema = self._simple_type_to_schema(typ)
|
||||||
if schema is not None:
|
if schema is not None:
|
||||||
# recognize well-known auxiliary types
|
# recognize well-known auxiliary types
|
||||||
|
@ -446,12 +446,20 @@ class JsonSchemaGenerator:
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
elif origin_type is Union:
|
elif origin_type is Union:
|
||||||
return {
|
discriminator = None
|
||||||
|
if typing.get_origin(data_type) is Annotated:
|
||||||
|
discriminator = typing.get_args(data_type)[1].discriminator
|
||||||
|
ret = {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
self.type_to_schema(union_type)
|
self.type_to_schema(union_type)
|
||||||
for union_type in typing.get_args(typ)
|
for union_type in typing.get_args(typ)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
if discriminator:
|
||||||
|
ret["discriminator"] = {
|
||||||
|
"propertyName": discriminator,
|
||||||
|
}
|
||||||
|
return ret
|
||||||
elif origin_type is Literal:
|
elif origin_type is Literal:
|
||||||
(literal_value,) = typing.get_args(typ) # unpack value of literal type
|
(literal_value,) = typing.get_args(typ) # unpack value of literal type
|
||||||
schema = self.type_to_schema(type(literal_value))
|
schema = self.type_to_schema(type(literal_value))
|
||||||
|
|
|
@ -3810,7 +3810,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/TextContentItem"
|
"$ref": "#/components/schemas/TextContentItem"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Message": {
|
"Message": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
@ -3826,7 +3829,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/CompletionMessage"
|
"$ref": "#/components/schemas/CompletionMessage"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "role"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"SamplingParams": {
|
"SamplingParams": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -3842,7 +3848,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/TopKSamplingStrategy"
|
"$ref": "#/components/schemas/TopKSamplingStrategy"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"max_tokens": {
|
"max_tokens": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
@ -4386,7 +4395,10 @@
|
||||||
"bnf"
|
"bnf"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ChatCompletionRequest": {
|
"ChatCompletionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -4515,7 +4527,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/ToolCallDelta"
|
"$ref": "#/components/schemas/ToolCallDelta"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ImageDelta": {
|
"ImageDelta": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -5019,7 +5034,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
|
"$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "event_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -5062,7 +5080,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "step_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -5462,7 +5483,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "step_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"output_message": {
|
"output_message": {
|
||||||
|
@ -5612,7 +5636,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AgentCandidate"
|
"$ref": "#/components/schemas/AgentCandidate"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"scoring_params": {
|
"scoring_params": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -5627,7 +5654,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"num_examples": {
|
"num_examples": {
|
||||||
|
@ -5677,7 +5707,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AgentCandidate"
|
"$ref": "#/components/schemas/AgentCandidate"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"num_examples": {
|
"num_examples": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -5818,7 +5851,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -5981,7 +6017,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
"$ref": "#/components/schemas/MemoryRetrievalStep"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "step_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -6196,7 +6235,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AgentTurnInputType"
|
"$ref": "#/components/schemas/AgentTurnInputType"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"StringType": {
|
"StringType": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -6456,7 +6498,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -7542,7 +7587,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/SpanEndPayload"
|
"$ref": "#/components/schemas/SpanEndPayload"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -7628,7 +7676,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/StructuredLogEvent"
|
"$ref": "#/components/schemas/StructuredLogEvent"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ttl_seconds": {
|
"ttl_seconds": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -7958,7 +8009,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/LLMRAGQueryGeneratorConfig"
|
"$ref": "#/components/schemas/LLMRAGQueryGeneratorConfig"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"QueryRequest": {
|
"QueryRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -8350,7 +8404,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -8483,7 +8540,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -8632,7 +8692,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
|
@ -8683,7 +8746,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
|
@ -8860,7 +8926,10 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/QATFinetuningConfig"
|
"$ref": "#/components/schemas/QATFinetuningConfig"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|
|
@ -76,6 +76,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
step:
|
step:
|
||||||
|
discriminator:
|
||||||
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
- $ref: '#/components/schemas/ToolExecutionStep'
|
- $ref: '#/components/schemas/ToolExecutionStep'
|
||||||
|
@ -119,6 +121,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
payload:
|
payload:
|
||||||
|
discriminator:
|
||||||
|
propertyName: event_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
|
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
|
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
|
||||||
|
@ -137,6 +141,8 @@ components:
|
||||||
default: step_complete
|
default: step_complete
|
||||||
type: string
|
type: string
|
||||||
step_details:
|
step_details:
|
||||||
|
discriminator:
|
||||||
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
- $ref: '#/components/schemas/ToolExecutionStep'
|
- $ref: '#/components/schemas/ToolExecutionStep'
|
||||||
|
@ -258,6 +264,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
eval_candidate:
|
eval_candidate:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ModelCandidate'
|
- $ref: '#/components/schemas/ModelCandidate'
|
||||||
- $ref: '#/components/schemas/AgentCandidate'
|
- $ref: '#/components/schemas/AgentCandidate'
|
||||||
|
@ -265,6 +273,8 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
scoring_params:
|
scoring_params:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
|
@ -402,6 +412,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
eval_candidate:
|
eval_candidate:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ModelCandidate'
|
- $ref: '#/components/schemas/ModelCandidate'
|
||||||
- $ref: '#/components/schemas/AgentCandidate'
|
- $ref: '#/components/schemas/AgentCandidate'
|
||||||
|
@ -619,6 +631,8 @@ components:
|
||||||
title: streamed completion response.
|
title: streamed completion response.
|
||||||
type: object
|
type: object
|
||||||
ContentDelta:
|
ContentDelta:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/TextDelta'
|
- $ref: '#/components/schemas/TextDelta'
|
||||||
- $ref: '#/components/schemas/ImageDelta'
|
- $ref: '#/components/schemas/ImageDelta'
|
||||||
|
@ -897,6 +911,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
task_config:
|
task_config:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
||||||
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
||||||
|
@ -1038,6 +1054,8 @@ components:
|
||||||
$ref: '#/components/schemas/InterleavedContentItem'
|
$ref: '#/components/schemas/InterleavedContentItem'
|
||||||
type: array
|
type: array
|
||||||
InterleavedContentItem:
|
InterleavedContentItem:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ImageContentItem'
|
- $ref: '#/components/schemas/ImageContentItem'
|
||||||
- $ref: '#/components/schemas/TextContentItem'
|
- $ref: '#/components/schemas/TextContentItem'
|
||||||
|
@ -1244,6 +1262,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
event:
|
event:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
||||||
- $ref: '#/components/schemas/MetricEvent'
|
- $ref: '#/components/schemas/MetricEvent'
|
||||||
|
@ -1325,6 +1345,8 @@ components:
|
||||||
- inserted_context
|
- inserted_context
|
||||||
type: object
|
type: object
|
||||||
Message:
|
Message:
|
||||||
|
discriminator:
|
||||||
|
propertyName: role
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/UserMessage'
|
- $ref: '#/components/schemas/UserMessage'
|
||||||
- $ref: '#/components/schemas/SystemMessage'
|
- $ref: '#/components/schemas/SystemMessage'
|
||||||
|
@ -1495,6 +1517,8 @@ components:
|
||||||
- total_count
|
- total_count
|
||||||
type: object
|
type: object
|
||||||
ParamType:
|
ParamType:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/StringType'
|
- $ref: '#/components/schemas/StringType'
|
||||||
- $ref: '#/components/schemas/NumberType'
|
- $ref: '#/components/schemas/NumberType'
|
||||||
|
@ -1805,6 +1829,8 @@ components:
|
||||||
- max_chunks
|
- max_chunks
|
||||||
type: object
|
type: object
|
||||||
RAGQueryGeneratorConfig:
|
RAGQueryGeneratorConfig:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
|
- $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
|
||||||
- $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig'
|
- $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig'
|
||||||
|
@ -1922,6 +1948,8 @@ components:
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
params:
|
params:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
|
@ -2002,6 +2030,8 @@ components:
|
||||||
- embedding_model
|
- embedding_model
|
||||||
type: object
|
type: object
|
||||||
ResponseFormat:
|
ResponseFormat:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- additionalProperties: false
|
- additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2063,6 +2093,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
task_config:
|
task_config:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
||||||
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
||||||
|
@ -2130,6 +2162,8 @@ components:
|
||||||
default: 1.0
|
default: 1.0
|
||||||
type: number
|
type: number
|
||||||
strategy:
|
strategy:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/GreedySamplingStrategy'
|
- $ref: '#/components/schemas/GreedySamplingStrategy'
|
||||||
- $ref: '#/components/schemas/TopPSamplingStrategy'
|
- $ref: '#/components/schemas/TopPSamplingStrategy'
|
||||||
|
@ -2167,7 +2201,9 @@ components:
|
||||||
scoring_functions:
|
scoring_functions:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
oneOf:
|
oneOf:
|
||||||
- oneOf:
|
- discriminator:
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
- $ref: '#/components/schemas/BasicScoringFnParams'
|
||||||
|
@ -2208,7 +2244,9 @@ components:
|
||||||
scoring_functions:
|
scoring_functions:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
oneOf:
|
oneOf:
|
||||||
- oneOf:
|
- discriminator:
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
- $ref: '#/components/schemas/BasicScoringFnParams'
|
||||||
|
@ -2246,6 +2284,8 @@ components:
|
||||||
- type: object
|
- type: object
|
||||||
type: object
|
type: object
|
||||||
params:
|
params:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
|
@ -2503,6 +2543,8 @@ components:
|
||||||
- type: object
|
- type: object
|
||||||
type: object
|
type: object
|
||||||
payload:
|
payload:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/SpanStartPayload'
|
- $ref: '#/components/schemas/SpanStartPayload'
|
||||||
- $ref: '#/components/schemas/SpanEndPayload'
|
- $ref: '#/components/schemas/SpanEndPayload'
|
||||||
|
@ -2528,6 +2570,8 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
algorithm_config:
|
algorithm_config:
|
||||||
|
discriminator:
|
||||||
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/LoraFinetuningConfig'
|
- $ref: '#/components/schemas/LoraFinetuningConfig'
|
||||||
- $ref: '#/components/schemas/QATFinetuningConfig'
|
- $ref: '#/components/schemas/QATFinetuningConfig'
|
||||||
|
@ -3115,6 +3159,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
steps:
|
steps:
|
||||||
items:
|
items:
|
||||||
|
discriminator:
|
||||||
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
- $ref: '#/components/schemas/ToolExecutionStep'
|
- $ref: '#/components/schemas/ToolExecutionStep'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue