AgentVerse icon indicating copy to clipboard operation
AgentVerse copied to clipboard

why the to_message function in chat_history.py is trying to add an assistent message?

Open Lucas-TY opened this issue 1 year ago • 2 comments
trafficstars

Related code: https://github.com/OpenBMB/AgentVerse/blob/4dd772de18ac5fb2ed9b8cf4a8731565d224afab/agentverse/memory/chat_history.py#L56 https://github.com/OpenBMB/AgentVerse/blob/4dd772de18ac5fb2ed9b8cf4a8731565d224afab/agentverse/llms/openai.py#L436 If there is no message to add, the structure of the mssages will be system/user

But if there is a history message, the structure will change into system/assistant/user, which will cause an error since its not system/user/assistant/user .....

Lucas-TY avatar May 14 '24 16:05 Lucas-TY

The second role in LLAMA must be 'user.' Does that mean AgentVerse is not compatible with LLAMA models?

Lucas-TY avatar May 14 '24 16:05 Lucas-TY

there will be an error if you lunch llama model with local vllm

openai.BadRequestError: Error code: 400 - {'object': 'error', 'message': 'Conversation roles must alternate user/assistant/user/assistant/...', 'type': 'BadRequestError', 'param': None, 'code': 400}

Lucas-TY avatar May 16 '24 06:05 Lucas-TY