mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
Tool call support interactive node (#2903)
* feat: tool call support interactive node * feat: interactive node tool response * fix: tool call concat * fix: llm history concat
This commit is contained in:
@@ -73,7 +73,7 @@ export type RuntimeNodeItemType = {
|
||||
intro?: StoreNodeItemType['intro'];
|
||||
flowNodeType: StoreNodeItemType['flowNodeType'];
|
||||
showStatus?: StoreNodeItemType['showStatus'];
|
||||
isEntry?: StoreNodeItemType['isEntry'];
|
||||
isEntry?: boolean;
|
||||
|
||||
inputs: FlowNodeInputItemType[];
|
||||
outputs: FlowNodeOutputItemType[];
|
||||
@@ -108,12 +108,14 @@ export type DispatchNodeResponseType = {
|
||||
customOutputs?: Record<string, any>;
|
||||
nodeInputs?: Record<string, any>;
|
||||
nodeOutputs?: Record<string, any>;
|
||||
mergeSignId?: string;
|
||||
|
||||
// bill
|
||||
tokens?: number;
|
||||
model?: string;
|
||||
contextTotalLen?: number;
|
||||
totalPoints?: number;
|
||||
childTotalPoints?: number;
|
||||
|
||||
// chat
|
||||
temperature?: number;
|
||||
|
@@ -69,7 +69,7 @@ export const initWorkflowEdgeStatus = (
|
||||
histories?: ChatItemType[]
|
||||
): RuntimeEdgeItemType[] => {
|
||||
// If there is a history, use the last interactive value
|
||||
if (!!histories) {
|
||||
if (histories && histories.length > 0) {
|
||||
const memoryEdges = getLastInteractiveValue(histories)?.memoryEdges;
|
||||
|
||||
if (memoryEdges && memoryEdges.length > 0) {
|
||||
@@ -90,7 +90,7 @@ export const getWorkflowEntryNodeIds = (
|
||||
histories?: ChatItemType[]
|
||||
) => {
|
||||
// If there is a history, use the last interactive entry node
|
||||
if (!!histories) {
|
||||
if (histories && histories.length > 0) {
|
||||
const entryNodeIds = getLastInteractiveValue(histories)?.entryNodeIds;
|
||||
|
||||
if (Array.isArray(entryNodeIds) && entryNodeIds.length > 0) {
|
||||
|
Reference in New Issue
Block a user