Open noday opened 1 week ago
Hi @noday, which LLM are you using that has this restriction?
@langchain4j qwen and bedrock-anthropic has, this is test:
if set maxMessages 4, it throw exception always.
This issue has been fixed for Anthropic: https://github.com/langchain4j/langchain4j/pull/1197 We could port the fix for qwen and bedrock as well
Perhaps having a ConversationMessageWindowChatMemory would be better
Is your feature request related to a problem? Please describe.
use maxMessages, it may start with AiMessage like below, and llm will has exception'messages must strat will Humen message ' AI:* Humen:*** AI:
Describe the solution you'd like
like langchain's ConversationBufferWindowMemory(k=), k is conversational exchange Describe alternatives you've considered
Additional context