Files
FastGPT/packages
francis 32ea07cb9c feat: add plan agent & model agent (#5577)
* refactor: agent call (#5572)

* feat: Add relevant functions related to agent invocation, including plan parsing, state management and tool invocation

* Refactor agent call logic and utilities

- Simplified the `runAgentCall` function by removing unnecessary complexity and restructuring the flow for better readability and maintainability.
- Introduced helper functions to create tools from tool nodes and to prepare agent messages, enhancing modularity.
- Removed the `utils.ts` file as its functions were integrated into the main logic, streamlining the codebase.
- Updated the dispatch logic in `index.ts` to utilize the new helper functions and improve clarity.
- Adjusted the handling of interactive modes and tool calls to ensure proper response formatting and error handling.

* refactor: clean up the processing logic of the interactive mode and remove the unused tool creation functions

* feat: add relevant constants for proxy configuration and update the proxy call logic

* refactor: remove unused configuration variables from workflow properties

* refactor: remove unused configuration variables from dispatchRunAgents props

* fix: build error

* refactor: update FlowNodeTypeEnum values and consolidate utility functions

* refactor: simplify conditional checks in tool call and reasoning handlers

* feat: add default agent prompt for improved response handling

* refactor: rename directory with agent->tool, agentCall->agnet

* refactor: rename dispatchRunAgents to dispatchRunAgent for consistency

* refactor: rename toolCall to tools for consistency in FlowNodeTypeEnum

* refactor: rename agents to toolCall for consistency in nodeTypes mapping

* refactor: remove unused runtimeEdges parameter from dispatchRunAgent

* refactor: update runAgentCall and dispatchRunAgent to use structured requestProps and workflowProps

* refactor: streamline requestProps and handleToolResponse in runAgentCall and dispatchRunAgent

* refactor: restructure RunAgentCallProps and update requestProps to requestParams for clarity

* refactor: enhance interactiveEntryToolParams handling in runAgentCall for improved response management

* refactor: flatten RunAgentCallProps structure and update dispatchRunAgent to use direct properties

* fix: correct initialization of interactiveResponse in runAgentCall

* agent call code

* fix: agent call stop sign

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add plan agent tools and default generated prompts

* feat: add model agent tools and related functions

* chore: rename enum value

* fix: optimize isEndSign assignment and update default plan prompt format

* fix: update transferPlanAgent to use histories instead of sharedContext and rename default prompt variable

* fix: update transferPlanAgent to use ChatItemType and adapt message structure

* feat: add ModelAgentTool and PlanAgentTool with detailed descriptions and parameters
fix: update error handling in transferModelAgent and transferPlanAgent to return error messages
refactor: simplify isEndSign assignment in runAgentCall

* feat: enhance agent call handling and response processing with context support

* feat: refactor agent prompts and add utility functions for system prompt parsing

* feat: add AskAgentTool to support the interactive questioning function

* Update request.ts

---------

Co-authored-by: archer <545436317@qq.com>
2025-11-11 14:19:33 +08:00
..
2025-11-11 14:19:33 +08:00
2025-11-11 14:05:02 +08:00
2025-02-27 10:30:43 +08:00

目录说明

该目录为 FastGPT 的依赖包,多端复用。