updated the additional params to pass any type of values

This commit is contained in:
Sajikumar JS 2025-04-26 01:19:37 +05:30
parent 1d6ef73dd7
commit 03a25a7753
3 changed files with 28 additions and 3 deletions

View file

@ -4195,7 +4195,26 @@
"additional_params": { "additional_params": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string" "type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
} }
} }
}, },

View file

@ -2910,7 +2910,13 @@ components:
additional_params: additional_params:
type: object type: object
additionalProperties: additionalProperties:
type: string oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
additionalProperties: false additionalProperties: false
required: required:
- strategy - strategy

View file

@ -82,7 +82,7 @@ class SamplingParams(BaseModel):
max_tokens: Optional[int] = 0 max_tokens: Optional[int] = 0
repetition_penalty: Optional[float] = 1.0 repetition_penalty: Optional[float] = 1.0
stop: Optional[List[str]] = None stop: Optional[List[str]] = None
additional_params: Optional[Dict[str, str]] = {} additional_params: Optional[Dict[str, Any]] = {}
class LogProbConfig(BaseModel): class LogProbConfig(BaseModel):