Revert model in ModelCandidate to type string

This commit is contained in:
Jash Gulabrai 2025-04-15 09:47:58 -04:00
parent 43993cc29c
commit 95619892ea
3 changed files with 3 additions and 42 deletions

View file

@ -6466,36 +6466,7 @@
"default": "model" "default": "model"
}, },
"model": { "model": {
"oneOf": [ "type": "string",
{
"type": "string"
},
{
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
],
"description": "The model ID to evaluate." "description": "The model ID to evaluate."
}, },
"sampling_params": { "sampling_params": {

View file

@ -4553,17 +4553,7 @@ components:
const: model const: model
default: model default: model
model: model:
oneOf: type: string
- type: string
- type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
description: The model ID to evaluate. description: The model ID to evaluate.
sampling_params: sampling_params:
$ref: '#/components/schemas/SamplingParams' $ref: '#/components/schemas/SamplingParams'

View file

@ -27,7 +27,7 @@ class ModelCandidate(BaseModel):
""" """
type: Literal["model"] = "model" type: Literal["model"] = "model"
model: Union[str, Dict[str, Any]] model: str
sampling_params: Optional[SamplingParams] = Field(default_factory=SamplingParams) sampling_params: Optional[SamplingParams] = Field(default_factory=SamplingParams)
system_message: Optional[SystemMessage] = None system_message: Optional[SystemMessage] = None