mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Update discriminator to have the correct mapping
(#881)
See https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/#discriminator When specifying discriminators, mapping must be specified unless the value of the discriminator is the subtype itself (which in our case is not.) The changes in the YAML are self-explanatory.
This commit is contained in:
parent
a6d20e0f53
commit
e5936a8df8
10 changed files with 642 additions and 420 deletions
|
@ -122,10 +122,16 @@ class JsonSchemaAnyOf(JsonSchemaNode):
|
||||||
anyOf: List["JsonSchemaAny"]
|
anyOf: List["JsonSchemaAny"]
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Discriminator:
|
||||||
|
propertyName: str
|
||||||
|
mapping: Dict[str, str]
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class JsonSchemaOneOf(JsonSchemaNode):
|
class JsonSchemaOneOf(JsonSchemaNode):
|
||||||
oneOf: List["JsonSchemaAny"]
|
oneOf: List["JsonSchemaAny"]
|
||||||
discriminator: Optional[str]
|
discriminator: Optional[Discriminator]
|
||||||
|
|
||||||
|
|
||||||
JsonSchemaAny = Union[
|
JsonSchemaAny = Union[
|
||||||
|
|
|
@ -456,8 +456,19 @@ class JsonSchemaGenerator:
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if discriminator:
|
if discriminator:
|
||||||
|
# for each union type, we need to read the value of the discriminator
|
||||||
|
mapping = {}
|
||||||
|
for union_type in typing.get_args(typ):
|
||||||
|
props = self.type_to_schema(union_type, force_expand=True)[
|
||||||
|
"properties"
|
||||||
|
]
|
||||||
|
mapping[props[discriminator]["default"]] = self.type_to_schema(
|
||||||
|
union_type
|
||||||
|
)["$ref"]
|
||||||
|
|
||||||
ret["discriminator"] = {
|
ret["discriminator"] = {
|
||||||
"propertyName": discriminator,
|
"propertyName": discriminator,
|
||||||
|
"mapping": mapping,
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
elif origin_type is Literal:
|
elif origin_type is Literal:
|
||||||
|
|
|
@ -3812,7 +3812,11 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"image": "#/components/schemas/ImageContentItem",
|
||||||
|
"text": "#/components/schemas/TextContentItem"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Message": {
|
"Message": {
|
||||||
|
@ -3831,7 +3835,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "role"
|
"propertyName": "role",
|
||||||
|
"mapping": {
|
||||||
|
"user": "#/components/schemas/UserMessage",
|
||||||
|
"system": "#/components/schemas/SystemMessage",
|
||||||
|
"tool": "#/components/schemas/ToolResponseMessage",
|
||||||
|
"assistant": "#/components/schemas/CompletionMessage"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"SamplingParams": {
|
"SamplingParams": {
|
||||||
|
@ -3850,7 +3860,12 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"greedy": "#/components/schemas/GreedySamplingStrategy",
|
||||||
|
"top_p": "#/components/schemas/TopPSamplingStrategy",
|
||||||
|
"top_k": "#/components/schemas/TopKSamplingStrategy"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"max_tokens": {
|
"max_tokens": {
|
||||||
|
@ -4313,91 +4328,101 @@
|
||||||
"job_uuid"
|
"job_uuid"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"GrammarResponseFormat": {
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"JsonSchemaResponseFormat": {
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
},
|
||||||
"ResponseFormat": {
|
"ResponseFormat": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"type": "object",
|
"$ref": "#/components/schemas/JsonSchemaResponseFormat"
|
||||||
"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",
|
"$ref": "#/components/schemas/GrammarResponseFormat"
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"json_schema": "#/components/schemas/JsonSchemaResponseFormat",
|
||||||
|
"grammar": "#/components/schemas/GrammarResponseFormat"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ChatCompletionRequest": {
|
"ChatCompletionRequest": {
|
||||||
|
@ -4529,7 +4554,12 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"text": "#/components/schemas/TextDelta",
|
||||||
|
"image": "#/components/schemas/ImageDelta",
|
||||||
|
"tool_call": "#/components/schemas/ToolCallDelta"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ImageDelta": {
|
"ImageDelta": {
|
||||||
|
@ -4737,8 +4767,7 @@
|
||||||
"default": "auto"
|
"default": "auto"
|
||||||
},
|
},
|
||||||
"tool_prompt_format": {
|
"tool_prompt_format": {
|
||||||
"$ref": "#/components/schemas/ToolPromptFormat",
|
"$ref": "#/components/schemas/ToolPromptFormat"
|
||||||
"default": "json"
|
|
||||||
},
|
},
|
||||||
"max_infer_iters": {
|
"max_infer_iters": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
@ -5018,33 +5047,42 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"payload": {
|
"payload": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/AgentTurnResponseEventPayload"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseStepStartPayload"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseStepProgressPayload"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseStepCompletePayload"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseTurnStartPayload"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "event_type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"payload"
|
"payload"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"AgentTurnResponseEventPayload": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseStepStartPayload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseStepProgressPayload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseStepCompletePayload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseTurnStartPayload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"title": "Streamed agent execution response."
|
"discriminator": {
|
||||||
|
"propertyName": "event_type",
|
||||||
|
"mapping": {
|
||||||
|
"step_start": "#/components/schemas/AgentTurnResponseStepStartPayload",
|
||||||
|
"step_progress": "#/components/schemas/AgentTurnResponseStepProgressPayload",
|
||||||
|
"step_complete": "#/components/schemas/AgentTurnResponseStepCompletePayload",
|
||||||
|
"turn_start": "#/components/schemas/AgentTurnResponseTurnStartPayload",
|
||||||
|
"turn_complete": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"AgentTurnResponseStepCompletePayload": {
|
"AgentTurnResponseStepCompletePayload": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -5082,7 +5120,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "step_type"
|
"propertyName": "step_type",
|
||||||
|
"mapping": {
|
||||||
|
"inference": "#/components/schemas/InferenceStep",
|
||||||
|
"tool_execution": "#/components/schemas/ToolExecutionStep",
|
||||||
|
"shield_call": "#/components/schemas/ShieldCallStep",
|
||||||
|
"memory_retrieval": "#/components/schemas/MemoryRetrievalStep"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5485,7 +5529,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "step_type"
|
"propertyName": "step_type",
|
||||||
|
"mapping": {
|
||||||
|
"inference": "#/components/schemas/InferenceStep",
|
||||||
|
"tool_execution": "#/components/schemas/ToolExecutionStep",
|
||||||
|
"shield_call": "#/components/schemas/ShieldCallStep",
|
||||||
|
"memory_retrieval": "#/components/schemas/MemoryRetrievalStep"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5629,35 +5679,12 @@
|
||||||
"default": "app"
|
"default": "app"
|
||||||
},
|
},
|
||||||
"eval_candidate": {
|
"eval_candidate": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/EvalCandidate"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ModelCandidate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentCandidate"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"scoring_params": {
|
"scoring_params": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/ScoringFnParams"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"num_examples": {
|
"num_examples": {
|
||||||
|
@ -5700,17 +5727,7 @@
|
||||||
"default": "benchmark"
|
"default": "benchmark"
|
||||||
},
|
},
|
||||||
"eval_candidate": {
|
"eval_candidate": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/EvalCandidate"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ModelCandidate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AgentCandidate"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"num_examples": {
|
"num_examples": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -5722,6 +5739,40 @@
|
||||||
"eval_candidate"
|
"eval_candidate"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"EvalCandidate": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/ModelCandidate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AgentCandidate"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"model": "#/components/schemas/ModelCandidate",
|
||||||
|
"agent": "#/components/schemas/AgentCandidate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"EvalTaskConfig": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BenchmarkEvalTaskConfig"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"benchmark": "#/components/schemas/BenchmarkEvalTaskConfig",
|
||||||
|
"app": "#/components/schemas/AppEvalTaskConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"LLMAsJudgeScoringFnParams": {
|
"LLMAsJudgeScoringFnParams": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -5806,6 +5857,27 @@
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"ScoringFnParams": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BasicScoringFnParams"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"llm_as_judge": "#/components/schemas/LLMAsJudgeScoringFnParams",
|
||||||
|
"regex_parser": "#/components/schemas/RegexParserScoringFnParams",
|
||||||
|
"basic": "#/components/schemas/BasicScoringFnParams"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"EvaluateRowsRequest": {
|
"EvaluateRowsRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -5844,17 +5916,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"task_config": {
|
"task_config": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/EvalTaskConfig"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BenchmarkEvalTaskConfig"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -6019,7 +6081,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "step_type"
|
"propertyName": "step_type",
|
||||||
|
"mapping": {
|
||||||
|
"inference": "#/components/schemas/InferenceStep",
|
||||||
|
"tool_execution": "#/components/schemas/ToolExecutionStep",
|
||||||
|
"shield_call": "#/components/schemas/ShieldCallStep",
|
||||||
|
"memory_retrieval": "#/components/schemas/MemoryRetrievalStep"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -6237,7 +6305,19 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"string": "#/components/schemas/StringType",
|
||||||
|
"number": "#/components/schemas/NumberType",
|
||||||
|
"boolean": "#/components/schemas/BooleanType",
|
||||||
|
"array": "#/components/schemas/ArrayType",
|
||||||
|
"object": "#/components/schemas/ObjectType",
|
||||||
|
"json": "#/components/schemas/JsonType",
|
||||||
|
"union": "#/components/schemas/UnionType",
|
||||||
|
"chat_completion_input": "#/components/schemas/ChatCompletionInputType",
|
||||||
|
"completion_input": "#/components/schemas/CompletionInputType",
|
||||||
|
"agent_turn_input": "#/components/schemas/AgentTurnInputType"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StringType": {
|
"StringType": {
|
||||||
|
@ -6488,20 +6568,7 @@
|
||||||
"$ref": "#/components/schemas/ParamType"
|
"$ref": "#/components/schemas/ParamType"
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/ScoringFnParams"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -7415,6 +7482,27 @@
|
||||||
"data"
|
"data"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"Event": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/UnstructuredLogEvent"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/MetricEvent"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/StructuredLogEvent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"unstructured_log": "#/components/schemas/UnstructuredLogEvent",
|
||||||
|
"metric": "#/components/schemas/MetricEvent",
|
||||||
|
"structured_log": "#/components/schemas/StructuredLogEvent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"LogSeverity": {
|
"LogSeverity": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
@ -7580,17 +7668,7 @@
|
||||||
"default": "structured_log"
|
"default": "structured_log"
|
||||||
},
|
},
|
||||||
"payload": {
|
"payload": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/StructuredLogPayload"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/SpanStartPayload"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/SpanEndPayload"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -7602,6 +7680,23 @@
|
||||||
"payload"
|
"payload"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"StructuredLogPayload": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/SpanStartPayload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/SpanEndPayload"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"span_start": "#/components/schemas/SpanStartPayload",
|
||||||
|
"span_end": "#/components/schemas/SpanEndPayload"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"UnstructuredLogEvent": {
|
"UnstructuredLogEvent": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -7666,20 +7761,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"event": {
|
"event": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/Event"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/UnstructuredLogEvent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/MetricEvent"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/StructuredLogEvent"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"ttl_seconds": {
|
"ttl_seconds": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
|
@ -8011,7 +8093,11 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"default": "#/components/schemas/DefaultRAGQueryGeneratorConfig",
|
||||||
|
"llm": "#/components/schemas/LLMRAGQueryGeneratorConfig"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"QueryRequest": {
|
"QueryRequest": {
|
||||||
|
@ -8394,20 +8480,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/ScoringFnParams"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -8533,17 +8606,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"task_config": {
|
"task_config": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/EvalTaskConfig"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BenchmarkEvalTaskConfig"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AppEvalTaskConfig"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -8682,20 +8745,7 @@
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/ScoringFnParams"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
|
@ -8736,20 +8786,7 @@
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/ScoringFnParams"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LLMAsJudgeScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/RegexParserScoringFnParams"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BasicScoringFnParams"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
|
@ -8786,6 +8823,23 @@
|
||||||
"results"
|
"results"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"AlgorithmConfig": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/LoraFinetuningConfig"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/QATFinetuningConfig"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"discriminator": {
|
||||||
|
"propertyName": "type",
|
||||||
|
"mapping": {
|
||||||
|
"LoRA": "#/components/schemas/LoraFinetuningConfig",
|
||||||
|
"QAT": "#/components/schemas/QATFinetuningConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"LoraFinetuningConfig": {
|
"LoraFinetuningConfig": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -8919,17 +8973,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"algorithm_config": {
|
"algorithm_config": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/AlgorithmConfig"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/LoraFinetuningConfig"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/QATFinetuningConfig"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "type"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -9086,7 +9130,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "AgentTurnResponseEvent",
|
"name": "AgentTurnResponseEvent",
|
||||||
"description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseEvent\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseEvent\" />"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AgentTurnResponseEventPayload",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseEventPayload\" />"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "AgentTurnResponseStepCompletePayload",
|
"name": "AgentTurnResponseStepCompletePayload",
|
||||||
|
@ -9119,6 +9167,10 @@
|
||||||
"name": "AggregationFunctionType",
|
"name": "AggregationFunctionType",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AggregationFunctionType\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AggregationFunctionType\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "AlgorithmConfig",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AlgorithmConfig\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "AppEvalTaskConfig",
|
"name": "AppEvalTaskConfig",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AppEvalTaskConfig\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AppEvalTaskConfig\" />"
|
||||||
|
@ -9275,10 +9327,18 @@
|
||||||
{
|
{
|
||||||
"name": "Eval"
|
"name": "Eval"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "EvalCandidate",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvalCandidate\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "EvalTask",
|
"name": "EvalTask",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvalTask\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvalTask\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "EvalTaskConfig",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvalTaskConfig\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "EvalTasks"
|
"name": "EvalTasks"
|
||||||
},
|
},
|
||||||
|
@ -9290,6 +9350,14 @@
|
||||||
"name": "EvaluateRowsRequest",
|
"name": "EvaluateRowsRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateRowsRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateRowsRequest\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Event",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Event\" />"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GrammarResponseFormat",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GrammarResponseFormat\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "GreedySamplingStrategy",
|
"name": "GreedySamplingStrategy",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GreedySamplingStrategy\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GreedySamplingStrategy\" />"
|
||||||
|
@ -9344,6 +9412,10 @@
|
||||||
"name": "JobStatus",
|
"name": "JobStatus",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/JobStatus\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/JobStatus\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "JsonSchemaResponseFormat",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/JsonSchemaResponseFormat\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "JsonType",
|
"name": "JsonType",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/JsonType\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/JsonType\" />"
|
||||||
|
@ -9628,6 +9700,10 @@
|
||||||
"name": "ScoringFn",
|
"name": "ScoringFn",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFn\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFn\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ScoringFnParams",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoringFnParams\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ScoringFunctions"
|
"name": "ScoringFunctions"
|
||||||
},
|
},
|
||||||
|
@ -9682,6 +9758,10 @@
|
||||||
"name": "StructuredLogEvent",
|
"name": "StructuredLogEvent",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StructuredLogEvent\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StructuredLogEvent\" />"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "StructuredLogPayload",
|
||||||
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StructuredLogPayload\" />"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "SupervisedFineTuneRequest",
|
"name": "SupervisedFineTuneRequest",
|
||||||
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SupervisedFineTuneRequest\" />"
|
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SupervisedFineTuneRequest\" />"
|
||||||
|
@ -9878,6 +9958,7 @@
|
||||||
"AgentTool",
|
"AgentTool",
|
||||||
"AgentTurnInputType",
|
"AgentTurnInputType",
|
||||||
"AgentTurnResponseEvent",
|
"AgentTurnResponseEvent",
|
||||||
|
"AgentTurnResponseEventPayload",
|
||||||
"AgentTurnResponseStepCompletePayload",
|
"AgentTurnResponseStepCompletePayload",
|
||||||
"AgentTurnResponseStepProgressPayload",
|
"AgentTurnResponseStepProgressPayload",
|
||||||
"AgentTurnResponseStepStartPayload",
|
"AgentTurnResponseStepStartPayload",
|
||||||
|
@ -9885,6 +9966,7 @@
|
||||||
"AgentTurnResponseTurnCompletePayload",
|
"AgentTurnResponseTurnCompletePayload",
|
||||||
"AgentTurnResponseTurnStartPayload",
|
"AgentTurnResponseTurnStartPayload",
|
||||||
"AggregationFunctionType",
|
"AggregationFunctionType",
|
||||||
|
"AlgorithmConfig",
|
||||||
"AppEvalTaskConfig",
|
"AppEvalTaskConfig",
|
||||||
"AppendRowsRequest",
|
"AppendRowsRequest",
|
||||||
"ArrayType",
|
"ArrayType",
|
||||||
|
@ -9921,9 +10003,13 @@
|
||||||
"EfficiencyConfig",
|
"EfficiencyConfig",
|
||||||
"EmbeddingsRequest",
|
"EmbeddingsRequest",
|
||||||
"EmbeddingsResponse",
|
"EmbeddingsResponse",
|
||||||
|
"EvalCandidate",
|
||||||
"EvalTask",
|
"EvalTask",
|
||||||
|
"EvalTaskConfig",
|
||||||
"EvaluateResponse",
|
"EvaluateResponse",
|
||||||
"EvaluateRowsRequest",
|
"EvaluateRowsRequest",
|
||||||
|
"Event",
|
||||||
|
"GrammarResponseFormat",
|
||||||
"GreedySamplingStrategy",
|
"GreedySamplingStrategy",
|
||||||
"HealthInfo",
|
"HealthInfo",
|
||||||
"ImageContentItem",
|
"ImageContentItem",
|
||||||
|
@ -9936,6 +10022,7 @@
|
||||||
"InvokeToolRequest",
|
"InvokeToolRequest",
|
||||||
"Job",
|
"Job",
|
||||||
"JobStatus",
|
"JobStatus",
|
||||||
|
"JsonSchemaResponseFormat",
|
||||||
"JsonType",
|
"JsonType",
|
||||||
"LLMAsJudgeScoringFnParams",
|
"LLMAsJudgeScoringFnParams",
|
||||||
"LLMRAGQueryGeneratorConfig",
|
"LLMRAGQueryGeneratorConfig",
|
||||||
|
@ -10004,6 +10091,7 @@
|
||||||
"ScoreRequest",
|
"ScoreRequest",
|
||||||
"ScoreResponse",
|
"ScoreResponse",
|
||||||
"ScoringFn",
|
"ScoringFn",
|
||||||
|
"ScoringFnParams",
|
||||||
"ScoringResult",
|
"ScoringResult",
|
||||||
"Session",
|
"Session",
|
||||||
"Shield",
|
"Shield",
|
||||||
|
@ -10016,6 +10104,7 @@
|
||||||
"StopReason",
|
"StopReason",
|
||||||
"StringType",
|
"StringType",
|
||||||
"StructuredLogEvent",
|
"StructuredLogEvent",
|
||||||
|
"StructuredLogPayload",
|
||||||
"SupervisedFineTuneRequest",
|
"SupervisedFineTuneRequest",
|
||||||
"SyntheticDataGenerateRequest",
|
"SyntheticDataGenerateRequest",
|
||||||
"SyntheticDataGenerationResponse",
|
"SyntheticDataGenerationResponse",
|
||||||
|
|
|
@ -45,7 +45,6 @@ components:
|
||||||
default: auto
|
default: auto
|
||||||
tool_prompt_format:
|
tool_prompt_format:
|
||||||
$ref: '#/components/schemas/ToolPromptFormat'
|
$ref: '#/components/schemas/ToolPromptFormat'
|
||||||
default: json
|
|
||||||
toolgroups:
|
toolgroups:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/AgentTool'
|
$ref: '#/components/schemas/AgentTool'
|
||||||
|
@ -77,6 +76,11 @@ components:
|
||||||
properties:
|
properties:
|
||||||
step:
|
step:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
inference: '#/components/schemas/InferenceStep'
|
||||||
|
memory_retrieval: '#/components/schemas/MemoryRetrievalStep'
|
||||||
|
shield_call: '#/components/schemas/ShieldCallStep'
|
||||||
|
tool_execution: '#/components/schemas/ToolExecutionStep'
|
||||||
propertyName: step_type
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
|
@ -121,18 +125,25 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
payload:
|
payload:
|
||||||
discriminator:
|
$ref: '#/components/schemas/AgentTurnResponseEventPayload'
|
||||||
propertyName: event_type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
|
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
|
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseStepCompletePayload'
|
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseTurnStartPayload'
|
|
||||||
- $ref: '#/components/schemas/AgentTurnResponseTurnCompletePayload'
|
|
||||||
required:
|
required:
|
||||||
- payload
|
- payload
|
||||||
title: Streamed agent execution response.
|
|
||||||
type: object
|
type: object
|
||||||
|
AgentTurnResponseEventPayload:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
step_complete: '#/components/schemas/AgentTurnResponseStepCompletePayload'
|
||||||
|
step_progress: '#/components/schemas/AgentTurnResponseStepProgressPayload'
|
||||||
|
step_start: '#/components/schemas/AgentTurnResponseStepStartPayload'
|
||||||
|
turn_complete: '#/components/schemas/AgentTurnResponseTurnCompletePayload'
|
||||||
|
turn_start: '#/components/schemas/AgentTurnResponseTurnStartPayload'
|
||||||
|
propertyName: event_type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/AgentTurnResponseStepStartPayload'
|
||||||
|
- $ref: '#/components/schemas/AgentTurnResponseStepProgressPayload'
|
||||||
|
- $ref: '#/components/schemas/AgentTurnResponseStepCompletePayload'
|
||||||
|
- $ref: '#/components/schemas/AgentTurnResponseTurnStartPayload'
|
||||||
|
- $ref: '#/components/schemas/AgentTurnResponseTurnCompletePayload'
|
||||||
AgentTurnResponseStepCompletePayload:
|
AgentTurnResponseStepCompletePayload:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -142,6 +153,11 @@ components:
|
||||||
type: string
|
type: string
|
||||||
step_details:
|
step_details:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
inference: '#/components/schemas/InferenceStep'
|
||||||
|
memory_retrieval: '#/components/schemas/MemoryRetrievalStep'
|
||||||
|
shield_call: '#/components/schemas/ShieldCallStep'
|
||||||
|
tool_execution: '#/components/schemas/ToolExecutionStep'
|
||||||
propertyName: step_type
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
|
@ -260,25 +276,25 @@ components:
|
||||||
- categorical_count
|
- categorical_count
|
||||||
- accuracy
|
- accuracy
|
||||||
type: string
|
type: string
|
||||||
|
AlgorithmConfig:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
LoRA: '#/components/schemas/LoraFinetuningConfig'
|
||||||
|
QAT: '#/components/schemas/QATFinetuningConfig'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/LoraFinetuningConfig'
|
||||||
|
- $ref: '#/components/schemas/QATFinetuningConfig'
|
||||||
AppEvalTaskConfig:
|
AppEvalTaskConfig:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
eval_candidate:
|
eval_candidate:
|
||||||
discriminator:
|
$ref: '#/components/schemas/EvalCandidate'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/ModelCandidate'
|
|
||||||
- $ref: '#/components/schemas/AgentCandidate'
|
|
||||||
num_examples:
|
num_examples:
|
||||||
type: integer
|
type: integer
|
||||||
scoring_params:
|
scoring_params:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
discriminator:
|
$ref: '#/components/schemas/ScoringFnParams'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
||||||
type: object
|
type: object
|
||||||
type:
|
type:
|
||||||
const: app
|
const: app
|
||||||
|
@ -412,11 +428,7 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
eval_candidate:
|
eval_candidate:
|
||||||
discriminator:
|
$ref: '#/components/schemas/EvalCandidate'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/ModelCandidate'
|
|
||||||
- $ref: '#/components/schemas/AgentCandidate'
|
|
||||||
num_examples:
|
num_examples:
|
||||||
type: integer
|
type: integer
|
||||||
type:
|
type:
|
||||||
|
@ -632,6 +644,10 @@ components:
|
||||||
type: object
|
type: object
|
||||||
ContentDelta:
|
ContentDelta:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
image: '#/components/schemas/ImageDelta'
|
||||||
|
text: '#/components/schemas/TextDelta'
|
||||||
|
tool_call: '#/components/schemas/ToolCallDelta'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/TextDelta'
|
- $ref: '#/components/schemas/TextDelta'
|
||||||
|
@ -830,6 +846,15 @@ components:
|
||||||
required:
|
required:
|
||||||
- embeddings
|
- embeddings
|
||||||
type: object
|
type: object
|
||||||
|
EvalCandidate:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
agent: '#/components/schemas/AgentCandidate'
|
||||||
|
model: '#/components/schemas/ModelCandidate'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/ModelCandidate'
|
||||||
|
- $ref: '#/components/schemas/AgentCandidate'
|
||||||
EvalTask:
|
EvalTask:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -868,6 +893,15 @@ components:
|
||||||
- scoring_functions
|
- scoring_functions
|
||||||
- metadata
|
- metadata
|
||||||
type: object
|
type: object
|
||||||
|
EvalTaskConfig:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
app: '#/components/schemas/AppEvalTaskConfig'
|
||||||
|
benchmark: '#/components/schemas/BenchmarkEvalTaskConfig'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
||||||
|
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
||||||
EvaluateResponse:
|
EvaluateResponse:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -911,16 +945,44 @@ components:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
task_config:
|
task_config:
|
||||||
discriminator:
|
$ref: '#/components/schemas/EvalTaskConfig'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
|
||||||
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
|
||||||
required:
|
required:
|
||||||
- input_rows
|
- input_rows
|
||||||
- scoring_functions
|
- scoring_functions
|
||||||
- task_config
|
- task_config
|
||||||
type: object
|
type: object
|
||||||
|
Event:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
metric: '#/components/schemas/MetricEvent'
|
||||||
|
structured_log: '#/components/schemas/StructuredLogEvent'
|
||||||
|
unstructured_log: '#/components/schemas/UnstructuredLogEvent'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
||||||
|
- $ref: '#/components/schemas/MetricEvent'
|
||||||
|
- $ref: '#/components/schemas/StructuredLogEvent'
|
||||||
|
GrammarResponseFormat:
|
||||||
|
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
|
||||||
GreedySamplingStrategy:
|
GreedySamplingStrategy:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1055,6 +1117,9 @@ components:
|
||||||
type: array
|
type: array
|
||||||
InterleavedContentItem:
|
InterleavedContentItem:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
image: '#/components/schemas/ImageContentItem'
|
||||||
|
text: '#/components/schemas/TextContentItem'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/ImageContentItem'
|
- $ref: '#/components/schemas/ImageContentItem'
|
||||||
|
@ -1093,6 +1158,27 @@ components:
|
||||||
- failed
|
- failed
|
||||||
- scheduled
|
- scheduled
|
||||||
type: string
|
type: string
|
||||||
|
JsonSchemaResponseFormat:
|
||||||
|
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
|
||||||
JsonType:
|
JsonType:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1262,12 +1348,7 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
event:
|
event:
|
||||||
discriminator:
|
$ref: '#/components/schemas/Event'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
|
||||||
- $ref: '#/components/schemas/MetricEvent'
|
|
||||||
- $ref: '#/components/schemas/StructuredLogEvent'
|
|
||||||
ttl_seconds:
|
ttl_seconds:
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
|
@ -1346,6 +1427,11 @@ components:
|
||||||
type: object
|
type: object
|
||||||
Message:
|
Message:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
assistant: '#/components/schemas/CompletionMessage'
|
||||||
|
system: '#/components/schemas/SystemMessage'
|
||||||
|
tool: '#/components/schemas/ToolResponseMessage'
|
||||||
|
user: '#/components/schemas/UserMessage'
|
||||||
propertyName: role
|
propertyName: role
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/UserMessage'
|
- $ref: '#/components/schemas/UserMessage'
|
||||||
|
@ -1518,6 +1604,17 @@ components:
|
||||||
type: object
|
type: object
|
||||||
ParamType:
|
ParamType:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
agent_turn_input: '#/components/schemas/AgentTurnInputType'
|
||||||
|
array: '#/components/schemas/ArrayType'
|
||||||
|
boolean: '#/components/schemas/BooleanType'
|
||||||
|
chat_completion_input: '#/components/schemas/ChatCompletionInputType'
|
||||||
|
completion_input: '#/components/schemas/CompletionInputType'
|
||||||
|
json: '#/components/schemas/JsonType'
|
||||||
|
number: '#/components/schemas/NumberType'
|
||||||
|
object: '#/components/schemas/ObjectType'
|
||||||
|
string: '#/components/schemas/StringType'
|
||||||
|
union: '#/components/schemas/UnionType'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/StringType'
|
- $ref: '#/components/schemas/StringType'
|
||||||
|
@ -1830,6 +1927,9 @@ components:
|
||||||
type: object
|
type: object
|
||||||
RAGQueryGeneratorConfig:
|
RAGQueryGeneratorConfig:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
default: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
|
||||||
|
llm: '#/components/schemas/LLMRAGQueryGeneratorConfig'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
|
- $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig'
|
||||||
|
@ -1948,12 +2048,7 @@ components:
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
params:
|
params:
|
||||||
discriminator:
|
$ref: '#/components/schemas/ScoringFnParams'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
||||||
provider_id:
|
provider_id:
|
||||||
type: string
|
type: string
|
||||||
provider_scoring_fn_id:
|
provider_scoring_fn_id:
|
||||||
|
@ -2031,48 +2126,13 @@ components:
|
||||||
type: object
|
type: object
|
||||||
ResponseFormat:
|
ResponseFormat:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
grammar: '#/components/schemas/GrammarResponseFormat'
|
||||||
|
json_schema: '#/components/schemas/JsonSchemaResponseFormat'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- additionalProperties: false
|
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
|
||||||
properties:
|
- $ref: '#/components/schemas/GrammarResponseFormat'
|
||||||
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
|
|
||||||
RouteInfo:
|
RouteInfo:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2093,11 +2153,7 @@ components:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
task_config:
|
task_config:
|
||||||
discriminator:
|
$ref: '#/components/schemas/EvalTaskConfig'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/BenchmarkEvalTaskConfig'
|
|
||||||
- $ref: '#/components/schemas/AppEvalTaskConfig'
|
|
||||||
required:
|
required:
|
||||||
- task_config
|
- task_config
|
||||||
type: object
|
type: object
|
||||||
|
@ -2163,6 +2219,10 @@ components:
|
||||||
type: number
|
type: number
|
||||||
strategy:
|
strategy:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
greedy: '#/components/schemas/GreedySamplingStrategy'
|
||||||
|
top_k: '#/components/schemas/TopKSamplingStrategy'
|
||||||
|
top_p: '#/components/schemas/TopPSamplingStrategy'
|
||||||
propertyName: type
|
propertyName: type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/GreedySamplingStrategy'
|
- $ref: '#/components/schemas/GreedySamplingStrategy'
|
||||||
|
@ -2201,12 +2261,7 @@ components:
|
||||||
scoring_functions:
|
scoring_functions:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
oneOf:
|
oneOf:
|
||||||
- discriminator:
|
- $ref: '#/components/schemas/ScoringFnParams'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -2244,12 +2299,7 @@ components:
|
||||||
scoring_functions:
|
scoring_functions:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
oneOf:
|
oneOf:
|
||||||
- discriminator:
|
- $ref: '#/components/schemas/ScoringFnParams'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
||||||
- type: 'null'
|
- type: 'null'
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
@ -2284,12 +2334,7 @@ components:
|
||||||
- type: object
|
- type: object
|
||||||
type: object
|
type: object
|
||||||
params:
|
params:
|
||||||
discriminator:
|
$ref: '#/components/schemas/ScoringFnParams'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
||||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
||||||
provider_id:
|
provider_id:
|
||||||
type: string
|
type: string
|
||||||
provider_resource_id:
|
provider_resource_id:
|
||||||
|
@ -2308,6 +2353,17 @@ components:
|
||||||
- metadata
|
- metadata
|
||||||
- return_type
|
- return_type
|
||||||
type: object
|
type: object
|
||||||
|
ScoringFnParams:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
basic: '#/components/schemas/BasicScoringFnParams'
|
||||||
|
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
|
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||||
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||||
|
- $ref: '#/components/schemas/BasicScoringFnParams'
|
||||||
ScoringResult:
|
ScoringResult:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2543,11 +2599,7 @@ components:
|
||||||
- type: object
|
- type: object
|
||||||
type: object
|
type: object
|
||||||
payload:
|
payload:
|
||||||
discriminator:
|
$ref: '#/components/schemas/StructuredLogPayload'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/SpanStartPayload'
|
|
||||||
- $ref: '#/components/schemas/SpanEndPayload'
|
|
||||||
span_id:
|
span_id:
|
||||||
type: string
|
type: string
|
||||||
timestamp:
|
timestamp:
|
||||||
|
@ -2566,15 +2618,20 @@ components:
|
||||||
- type
|
- type
|
||||||
- payload
|
- payload
|
||||||
type: object
|
type: object
|
||||||
|
StructuredLogPayload:
|
||||||
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
span_end: '#/components/schemas/SpanEndPayload'
|
||||||
|
span_start: '#/components/schemas/SpanStartPayload'
|
||||||
|
propertyName: type
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/SpanStartPayload'
|
||||||
|
- $ref: '#/components/schemas/SpanEndPayload'
|
||||||
SupervisedFineTuneRequest:
|
SupervisedFineTuneRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
algorithm_config:
|
algorithm_config:
|
||||||
discriminator:
|
$ref: '#/components/schemas/AlgorithmConfig'
|
||||||
propertyName: type
|
|
||||||
oneOf:
|
|
||||||
- $ref: '#/components/schemas/LoraFinetuningConfig'
|
|
||||||
- $ref: '#/components/schemas/QATFinetuningConfig'
|
|
||||||
checkpoint_dir:
|
checkpoint_dir:
|
||||||
type: string
|
type: string
|
||||||
hyperparam_search_config:
|
hyperparam_search_config:
|
||||||
|
@ -3160,6 +3217,11 @@ components:
|
||||||
steps:
|
steps:
|
||||||
items:
|
items:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
mapping:
|
||||||
|
inference: '#/components/schemas/InferenceStep'
|
||||||
|
memory_retrieval: '#/components/schemas/MemoryRetrievalStep'
|
||||||
|
shield_call: '#/components/schemas/ShieldCallStep'
|
||||||
|
tool_execution: '#/components/schemas/ToolExecutionStep'
|
||||||
propertyName: step_type
|
propertyName: step_type
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/InferenceStep'
|
- $ref: '#/components/schemas/InferenceStep'
|
||||||
|
@ -5687,11 +5749,12 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnInputType"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnInputType"
|
||||||
/>
|
/>
|
||||||
name: AgentTurnInputType
|
name: AgentTurnInputType
|
||||||
- description: 'Streamed agent execution response.
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseEvent"
|
||||||
|
/>
|
||||||
|
|
||||||
<SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseEvent" />'
|
|
||||||
name: AgentTurnResponseEvent
|
name: AgentTurnResponseEvent
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseEventPayload"
|
||||||
|
/>
|
||||||
|
name: AgentTurnResponseEventPayload
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseStepCompletePayload"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseStepCompletePayload"
|
||||||
/>
|
/>
|
||||||
name: AgentTurnResponseStepCompletePayload
|
name: AgentTurnResponseStepCompletePayload
|
||||||
|
@ -5717,6 +5780,9 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AggregationFunctionType"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AggregationFunctionType"
|
||||||
/>
|
/>
|
||||||
name: AggregationFunctionType
|
name: AggregationFunctionType
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AlgorithmConfig"
|
||||||
|
/>
|
||||||
|
name: AlgorithmConfig
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AppEvalTaskConfig"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AppEvalTaskConfig"
|
||||||
/>
|
/>
|
||||||
name: AppEvalTaskConfig
|
name: AppEvalTaskConfig
|
||||||
|
@ -5837,8 +5903,12 @@ tags:
|
||||||
/>
|
/>
|
||||||
name: EmbeddingsResponse
|
name: EmbeddingsResponse
|
||||||
- name: Eval
|
- name: Eval
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvalCandidate" />
|
||||||
|
name: EvalCandidate
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvalTask" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvalTask" />
|
||||||
name: EvalTask
|
name: EvalTask
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvalTaskConfig" />
|
||||||
|
name: EvalTaskConfig
|
||||||
- name: EvalTasks
|
- name: EvalTasks
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateResponse"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateResponse"
|
||||||
/>
|
/>
|
||||||
|
@ -5846,6 +5916,11 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateRowsRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateRowsRequest"
|
||||||
/>
|
/>
|
||||||
name: EvaluateRowsRequest
|
name: EvaluateRowsRequest
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/Event" />
|
||||||
|
name: Event
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GrammarResponseFormat"
|
||||||
|
/>
|
||||||
|
name: GrammarResponseFormat
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/GreedySamplingStrategy"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GreedySamplingStrategy"
|
||||||
/>
|
/>
|
||||||
name: GreedySamplingStrategy
|
name: GreedySamplingStrategy
|
||||||
|
@ -5878,6 +5953,9 @@ tags:
|
||||||
name: Job
|
name: Job
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/JobStatus" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/JobStatus" />
|
||||||
name: JobStatus
|
name: JobStatus
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/JsonSchemaResponseFormat"
|
||||||
|
/>
|
||||||
|
name: JsonSchemaResponseFormat
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/JsonType" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/JsonType" />
|
||||||
name: JsonType
|
name: JsonType
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/LLMAsJudgeScoringFnParams"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/LLMAsJudgeScoringFnParams"
|
||||||
|
@ -6068,6 +6146,9 @@ tags:
|
||||||
- name: Scoring
|
- name: Scoring
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringFn" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringFn" />
|
||||||
name: ScoringFn
|
name: ScoringFn
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringFnParams"
|
||||||
|
/>
|
||||||
|
name: ScoringFnParams
|
||||||
- name: ScoringFunctions
|
- name: ScoringFunctions
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringResult" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoringResult" />
|
||||||
name: ScoringResult
|
name: ScoringResult
|
||||||
|
@ -6102,6 +6183,9 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogEvent"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogEvent"
|
||||||
/>
|
/>
|
||||||
name: StructuredLogEvent
|
name: StructuredLogEvent
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogPayload"
|
||||||
|
/>
|
||||||
|
name: StructuredLogPayload
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/SupervisedFineTuneRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/SupervisedFineTuneRequest"
|
||||||
/>
|
/>
|
||||||
name: SupervisedFineTuneRequest
|
name: SupervisedFineTuneRequest
|
||||||
|
@ -6239,6 +6323,7 @@ x-tagGroups:
|
||||||
- AgentTool
|
- AgentTool
|
||||||
- AgentTurnInputType
|
- AgentTurnInputType
|
||||||
- AgentTurnResponseEvent
|
- AgentTurnResponseEvent
|
||||||
|
- AgentTurnResponseEventPayload
|
||||||
- AgentTurnResponseStepCompletePayload
|
- AgentTurnResponseStepCompletePayload
|
||||||
- AgentTurnResponseStepProgressPayload
|
- AgentTurnResponseStepProgressPayload
|
||||||
- AgentTurnResponseStepStartPayload
|
- AgentTurnResponseStepStartPayload
|
||||||
|
@ -6246,6 +6331,7 @@ x-tagGroups:
|
||||||
- AgentTurnResponseTurnCompletePayload
|
- AgentTurnResponseTurnCompletePayload
|
||||||
- AgentTurnResponseTurnStartPayload
|
- AgentTurnResponseTurnStartPayload
|
||||||
- AggregationFunctionType
|
- AggregationFunctionType
|
||||||
|
- AlgorithmConfig
|
||||||
- AppEvalTaskConfig
|
- AppEvalTaskConfig
|
||||||
- AppendRowsRequest
|
- AppendRowsRequest
|
||||||
- ArrayType
|
- ArrayType
|
||||||
|
@ -6282,9 +6368,13 @@ x-tagGroups:
|
||||||
- EfficiencyConfig
|
- EfficiencyConfig
|
||||||
- EmbeddingsRequest
|
- EmbeddingsRequest
|
||||||
- EmbeddingsResponse
|
- EmbeddingsResponse
|
||||||
|
- EvalCandidate
|
||||||
- EvalTask
|
- EvalTask
|
||||||
|
- EvalTaskConfig
|
||||||
- EvaluateResponse
|
- EvaluateResponse
|
||||||
- EvaluateRowsRequest
|
- EvaluateRowsRequest
|
||||||
|
- Event
|
||||||
|
- GrammarResponseFormat
|
||||||
- GreedySamplingStrategy
|
- GreedySamplingStrategy
|
||||||
- HealthInfo
|
- HealthInfo
|
||||||
- ImageContentItem
|
- ImageContentItem
|
||||||
|
@ -6297,6 +6387,7 @@ x-tagGroups:
|
||||||
- InvokeToolRequest
|
- InvokeToolRequest
|
||||||
- Job
|
- Job
|
||||||
- JobStatus
|
- JobStatus
|
||||||
|
- JsonSchemaResponseFormat
|
||||||
- JsonType
|
- JsonType
|
||||||
- LLMAsJudgeScoringFnParams
|
- LLMAsJudgeScoringFnParams
|
||||||
- LLMRAGQueryGeneratorConfig
|
- LLMRAGQueryGeneratorConfig
|
||||||
|
@ -6365,6 +6456,7 @@ x-tagGroups:
|
||||||
- ScoreRequest
|
- ScoreRequest
|
||||||
- ScoreResponse
|
- ScoreResponse
|
||||||
- ScoringFn
|
- ScoringFn
|
||||||
|
- ScoringFnParams
|
||||||
- ScoringResult
|
- ScoringResult
|
||||||
- Session
|
- Session
|
||||||
- Shield
|
- Shield
|
||||||
|
@ -6377,6 +6469,7 @@ x-tagGroups:
|
||||||
- StopReason
|
- StopReason
|
||||||
- StringType
|
- StringType
|
||||||
- StructuredLogEvent
|
- StructuredLogEvent
|
||||||
|
- StructuredLogPayload
|
||||||
- SupervisedFineTuneRequest
|
- SupervisedFineTuneRequest
|
||||||
- SyntheticDataGenerateRequest
|
- SyntheticDataGenerateRequest
|
||||||
- SyntheticDataGenerationResponse
|
- SyntheticDataGenerationResponse
|
||||||
|
|
|
@ -229,11 +229,8 @@ class AgentTurnResponseTurnCompletePayload(BaseModel):
|
||||||
turn: Turn
|
turn: Turn
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
AgentTurnResponseEventPayload = register_schema(
|
||||||
class AgentTurnResponseEvent(BaseModel):
|
Annotated[
|
||||||
"""Streamed agent execution response."""
|
|
||||||
|
|
||||||
payload: Annotated[
|
|
||||||
Union[
|
Union[
|
||||||
AgentTurnResponseStepStartPayload,
|
AgentTurnResponseStepStartPayload,
|
||||||
AgentTurnResponseStepProgressPayload,
|
AgentTurnResponseStepProgressPayload,
|
||||||
|
@ -242,7 +239,14 @@ class AgentTurnResponseEvent(BaseModel):
|
||||||
AgentTurnResponseTurnCompletePayload,
|
AgentTurnResponseTurnCompletePayload,
|
||||||
],
|
],
|
||||||
Field(discriminator="event_type"),
|
Field(discriminator="event_type"),
|
||||||
]
|
],
|
||||||
|
name="AgentTurnResponseEventPayload",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class AgentTurnResponseEvent(BaseModel):
|
||||||
|
payload: AgentTurnResponseEventPayload
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
from typing import Any, Dict, List, Literal, Optional, Protocol, Union
|
from typing import Any, Dict, List, Literal, Optional, Protocol, Union
|
||||||
|
|
||||||
from llama_models.schema_utils import json_schema_type, webmethod
|
from llama_models.schema_utils import json_schema_type, register_schema, webmethod
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
@ -31,9 +31,10 @@ class AgentCandidate(BaseModel):
|
||||||
config: AgentConfig
|
config: AgentConfig
|
||||||
|
|
||||||
|
|
||||||
EvalCandidate = Annotated[
|
EvalCandidate = register_schema(
|
||||||
Union[ModelCandidate, AgentCandidate], Field(discriminator="type")
|
Annotated[Union[ModelCandidate, AgentCandidate], Field(discriminator="type")],
|
||||||
]
|
name="EvalCandidate",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
@ -61,9 +62,12 @@ class AppEvalTaskConfig(BaseModel):
|
||||||
# we could optinally add any specific dataset config here
|
# we could optinally add any specific dataset config here
|
||||||
|
|
||||||
|
|
||||||
EvalTaskConfig = Annotated[
|
EvalTaskConfig = register_schema(
|
||||||
Union[BenchmarkEvalTaskConfig, AppEvalTaskConfig], Field(discriminator="type")
|
Annotated[
|
||||||
]
|
Union[BenchmarkEvalTaskConfig, AppEvalTaskConfig], Field(discriminator="type")
|
||||||
|
],
|
||||||
|
name="EvalTaskConfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
|
|
@ -157,11 +157,13 @@ class ChatCompletionResponseEvent(BaseModel):
|
||||||
stop_reason: Optional[StopReason] = None
|
stop_reason: Optional[StopReason] = None
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
class ResponseFormatType(Enum):
|
class ResponseFormatType(Enum):
|
||||||
json_schema = "json_schema"
|
json_schema = "json_schema"
|
||||||
grammar = "grammar"
|
grammar = "grammar"
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
class JsonSchemaResponseFormat(BaseModel):
|
class JsonSchemaResponseFormat(BaseModel):
|
||||||
type: Literal[ResponseFormatType.json_schema.value] = (
|
type: Literal[ResponseFormatType.json_schema.value] = (
|
||||||
ResponseFormatType.json_schema.value
|
ResponseFormatType.json_schema.value
|
||||||
|
@ -169,6 +171,7 @@ class JsonSchemaResponseFormat(BaseModel):
|
||||||
json_schema: Dict[str, Any]
|
json_schema: Dict[str, Any]
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
class GrammarResponseFormat(BaseModel):
|
class GrammarResponseFormat(BaseModel):
|
||||||
type: Literal[ResponseFormatType.grammar.value] = ResponseFormatType.grammar.value
|
type: Literal[ResponseFormatType.grammar.value] = ResponseFormatType.grammar.value
|
||||||
bnf: Dict[str, Any]
|
bnf: Dict[str, Any]
|
||||||
|
|
|
@ -8,7 +8,7 @@ from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any, Dict, List, Literal, Optional, Protocol, Union
|
from typing import Any, Dict, List, Literal, Optional, Protocol, Union
|
||||||
|
|
||||||
from llama_models.schema_utils import json_schema_type, webmethod
|
from llama_models.schema_utils import json_schema_type, register_schema, webmethod
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
@ -88,9 +88,12 @@ class QATFinetuningConfig(BaseModel):
|
||||||
group_size: int
|
group_size: int
|
||||||
|
|
||||||
|
|
||||||
AlgorithmConfig = Annotated[
|
AlgorithmConfig = register_schema(
|
||||||
Union[LoraFinetuningConfig, QATFinetuningConfig], Field(discriminator="type")
|
Annotated[
|
||||||
]
|
Union[LoraFinetuningConfig, QATFinetuningConfig], Field(discriminator="type")
|
||||||
|
],
|
||||||
|
name="AlgorithmConfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
|
|
@ -16,7 +16,7 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
from llama_models.schema_utils import json_schema_type, webmethod
|
from llama_models.schema_utils import json_schema_type, register_schema, webmethod
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
@ -82,14 +82,17 @@ class BasicScoringFnParams(BaseModel):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
ScoringFnParams = Annotated[
|
ScoringFnParams = register_schema(
|
||||||
Union[
|
Annotated[
|
||||||
LLMAsJudgeScoringFnParams,
|
Union[
|
||||||
RegexParserScoringFnParams,
|
LLMAsJudgeScoringFnParams,
|
||||||
BasicScoringFnParams,
|
RegexParserScoringFnParams,
|
||||||
|
BasicScoringFnParams,
|
||||||
|
],
|
||||||
|
Field(discriminator="type"),
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
name="ScoringFnParams",
|
||||||
]
|
)
|
||||||
|
|
||||||
|
|
||||||
class CommonScoringFnFields(BaseModel):
|
class CommonScoringFnFields(BaseModel):
|
||||||
|
|
|
@ -17,7 +17,7 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
from llama_models.schema_utils import json_schema_type, webmethod
|
from llama_models.schema_utils import json_schema_type, register_schema, webmethod
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
@ -115,13 +115,16 @@ class SpanEndPayload(BaseModel):
|
||||||
status: SpanStatus
|
status: SpanStatus
|
||||||
|
|
||||||
|
|
||||||
StructuredLogPayload = Annotated[
|
StructuredLogPayload = register_schema(
|
||||||
Union[
|
Annotated[
|
||||||
SpanStartPayload,
|
Union[
|
||||||
SpanEndPayload,
|
SpanStartPayload,
|
||||||
|
SpanEndPayload,
|
||||||
|
],
|
||||||
|
Field(discriminator="type"),
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
name="StructuredLogPayload",
|
||||||
]
|
)
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
@ -130,14 +133,17 @@ class StructuredLogEvent(EventCommon):
|
||||||
payload: StructuredLogPayload
|
payload: StructuredLogPayload
|
||||||
|
|
||||||
|
|
||||||
Event = Annotated[
|
Event = register_schema(
|
||||||
Union[
|
Annotated[
|
||||||
UnstructuredLogEvent,
|
Union[
|
||||||
MetricEvent,
|
UnstructuredLogEvent,
|
||||||
StructuredLogEvent,
|
MetricEvent,
|
||||||
|
StructuredLogEvent,
|
||||||
|
],
|
||||||
|
Field(discriminator="type"),
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
name="Event",
|
||||||
]
|
)
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue