Anthropic provider rules
Learn about the rules you need to follow when using the Anthropic provider in Latitude.
- System messages must be followed by at least by another message
- No system messages are allowed after an assistant or user message
System messages must be followed by at least another message
Anthropic does not consider system messages as part of the list of general messages and thus, if you don’t add at least a user or assistant message, the list of messages sent to anthropic would be empty, which would result in an error.
So, the following prompt in Latitude is invalid for an Anthropic provider:
This would generate the following warning:
Instead, add at least another message wrapped in a <user>
or <assistant>
tag:
No system messages are allowed after an assistant or user message
Any system message added after an assistant or user message will be automatically converted into a user message:
This is because Anthropic does not consider system messages as part of the list of general messages and thus they can’t be concatenated with other messages.