mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
fix(mypy): type-safe dict conversion for codex_parameters in transformation.py
This commit is contained in:
parent
702f09c186
commit
473f5dc4ba
1 changed files with 5 additions and 1 deletions
|
|
@ -1456,7 +1456,11 @@ class LiteLLMCompletionResponsesConfig:
|
|||
codex_parameters = input_schema.get("jsonSchema", {})
|
||||
else:
|
||||
codex_parameters = {}
|
||||
codex_parameters = dict(codex_parameters or {})
|
||||
codex_parameters = (
|
||||
dict(codex_parameters)
|
||||
if isinstance(codex_parameters, dict)
|
||||
else {}
|
||||
)
|
||||
if not codex_parameters or "type" not in codex_parameters:
|
||||
codex_parameters["type"] = "object"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue