mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes (#3653)
* feat: Add option to disable conversation history - Add new `disableConversationHistory` boolean parameter in LLMNodes.ts and Agent.ts to optionally skip including conversation history in prompts - Fix potential error in Agent.ts when messages array is empty by adding null safety checks - Improve memory efficiency by allowing stateless interactions when history isn't needed * feat: add conversation history filtering options Replace the disable conversation history feature with a more flexible filtering system that allows selecting: - User question only - Last message only - All messages (default) - No messages This provides more granular control over conversation context management. * chore: break lines * chore: removed ending semi columns * chore: fix eslint errors * fix(sequentialagents): improve conversation history filtering logic - Remove unnecessary state.messages check for user_question case - Add proper null handling for last_message and all_messages cases - Remove @ts-ignore comments with proper typing * Update LLMNode.ts * Update Agent.ts --------- Co-authored-by: Henry Heng <henryheng@flowiseai.com>
This commit is contained in:
@@ -183,6 +183,7 @@ export interface IMultiAgentNode {
|
||||
}
|
||||
|
||||
type SeqAgentType = 'agent' | 'condition' | 'end' | 'start' | 'tool' | 'state' | 'llm'
|
||||
export type ConversationHistorySelection = 'user_question' | 'last_message' | 'all_messages' | 'empty'
|
||||
|
||||
export interface ISeqAgentNode {
|
||||
id: string
|
||||
|
||||
Reference in New Issue
Block a user