GenerativeAIExamples
GenerativeAIExamples copied to clipboard
Internal server error for role orders in LLM inference
Hi,
I am getting 500s with description
chat messages must alternate roles between 'user' and 'assistant'. Message may have a leading 'system' role message
and
"Internal Server Error\",\"status\":500,\"detail\":\"Last message role should be 'user'
I think this order validation is unnecessary. Most of the models (e.g. mixtrals, llama3, gemma etc) are perfectly fine with any order of roles. This claim can be validated on groq's playground: https://console.groq.com/playground
This issue currently breaks some existing patterns, like continuations (without the user explicitly saying "continue") or in some cases running agents with observations etc.