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
Bug description
If I use MistralAiChatModel with MessageChatMemoryAdvisor + InMemoryChatMemory, at the second iteration, I get the following erorr: Unexpected role 'system' after role 'assistant'
At the second iteration the system role appears after the previous user role and assistant role messages and before the current user role message.
"messages": [
{
"content": "first user message is here",
"role": "user"
},
{
"content": "first assistant message is here",
"role": "assistant"
},
{
"content": " You are an assistant helping people to buy tickets for trains, give the answer with the same language of the request.\n The answer must be formated as MarkDown.\n",
"role": "system"
},
{
"content": "currentuser message is here",
"role": "user"
}
]
Environment
Spring AI 1.0.0-M6, Java version 21
Steps to reproduce
add the following fragment to the pom.xml
Bug description
If I use MistralAiChatModel with MessageChatMemoryAdvisor + InMemoryChatMemory, at the second iteration, I get the following erorr:
Unexpected role 'system' after role 'assistant'
At the second iteration the
system role
appears after the previoususer role
andassistant role
messages and before the currentuser role
message.Environment
Spring AI 1.0.0-M6, Java version 21
Steps to reproduce
add the following fragment to the pom.xml
use the following fragment of code
Expected behavior
MistralAi LLM wants the system role to be the first one and this can be a general rule for all LLM.
The text was updated successfully, but these errors were encountered: