Flowise/packages/components/nodes/sequentialagents
Jean Ibarz 26b78ad55a
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>
2024-12-12 13:29:28 +00:00
..
Agent feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes (#3653) 2024-12-12 13:29:28 +00:00
Condition Feature/Seq Agent Nodes Update (#2942) 2024-08-06 11:30:08 +01:00
ConditionAgent Feature/Seq Agent Nodes Update (#2942) 2024-08-06 11:30:08 +01:00
End Feature/Seq Agent Nodes Update (#2942) 2024-08-06 11:30:08 +01:00
LLMNode feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes (#3653) 2024-12-12 13:29:28 +00:00
Loop Feature/Seq Agent Nodes Update (#2942) 2024-08-06 11:30:08 +01:00
Start Feature/Seq Agent Nodes Update (#2942) 2024-08-06 11:30:08 +01:00
State Chore/changed vm2 to @flowiseai/nodevm (#3200) 2024-09-17 01:57:02 +01:00
ToolNode Feature/Full File Uploads & Message Delete API (#3314) 2024-10-23 11:00:46 +01:00
commonUtils.ts feat: Add options to filter conversation history messages used in sequential LLM and Agent nodes (#3653) 2024-12-12 13:29:28 +00:00