fix contentype dicts into lists

This commit is contained in:
jhpiedrahitao 2025-03-18 11:50:53 -05:00
parent 8f9c791e21
commit 0f68852860

View file

@ -547,7 +547,7 @@ async def convert_message_to_openai_dict_new(
raise ValueError(f"Unsupported content type: {type(content)}")
ret = await impl()
if isinstance(ret, str) or isinstance(ret, list):
if isinstance(ret, str) or isinstance(ret, list) or isinstance(ret, dict):
return ret
else:
return [ret]