You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I don't do this, OpenAI complains with is not of type 'array' and the only reason the example works is because it never really rendered the unit as enum.
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.61.3
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered:
What happened?
While trying out https://docs.litellm.ai/docs/completion/function_call#using-function_to_dict, i.e. the original example, I noticed that the enum is not rendered as such:
Yields:
When I remove the
str
, it is rendered as enum, but weirdly as an array in a string (and OpenAI complains):Yields:
Notice the
"
around the[]
, i.e. the array/list is constructed correctly, but instead of remaining an array/list, it became a string in the map/dict.I need to manually "fix" the enum like this to finally succeed:
If I don't do this, OpenAI complains with
is not of type 'array'
and the only reason the example works is because it never really rendered the unit as enum.Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.61.3
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: