Fix : acompletion throws error with SambaNova models (#17217)
Co-authored-by: Omkar Malpure <omkarmalpure@Omkars-MacBook-Pro.local>
This commit is contained in:
parent
8aa4f3d476
commit
bbea83fd93
@ -121,5 +121,10 @@ class SambanovaConfig(OpenAIGPTConfig):
|
||||
SambaNova API doesn't support content as a list - only string content.
|
||||
This converts content lists like [{"type": "text", "text": "..."}] to strings.
|
||||
"""
|
||||
async def _async_transform():
|
||||
return handle_messages_with_content_list_to_str_conversion(messages)
|
||||
|
||||
if is_async:
|
||||
return _async_transform()
|
||||
messages = handle_messages_with_content_list_to_str_conversion(messages)
|
||||
return messages
|
||||
|
||||
Loading…
Reference in New Issue
Block a user