-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
I am trying to use agent-framework with a NIM model (from NVIDIA - following this tutorial: https://learn.microsoft.com/en-us/azure/container-apps/serverless-gpu-nim?tabs=bash)
Unfortunately, I get an immediate error:
agent_framework.exceptions.ServiceResponseException: <class 'agent_framework.openai._chat_client.OpenAIChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': '[{'type': 'value_error', 'loc': ('body', 'messages', 0), 'msg': 'Value error, Message content as a list is only supported for user messages.', 'input': {'role': 'system', 'content': [{'type': 'text', 'text': "You're an informational agent. Answer questions cheerfully.\n"}]}, 'ctx': {'error': ValueError('Message content as a list is only supported for user messages.')}}, {'type': 'value_error', 'loc': ('body', 'messages', 1), 'msg': 'Value error, Message content as a list is only supported for user messages.', 'input': {'role': 'system', 'content': [{'type': 'text', 'text': "You're an informational agent. Answer questions cheerfully.\n"}]}, 'ctx': {'error': ValueError('Message content as a list is only supported for user messages.')}}]', 'type': 'BadRequestError', 'param': None, 'code': 400}}
It appears that agent-framework sends the system message using a list of contents, and this OpenAI-like chat completions server doesn't support it.
Is there some possibility to avoid that? I would love to use agent-framework with NIM. Thanks!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status