Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/service/core/workflow/dispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
...props
} = data;

const handleApiKey = () => {
//api调用指定了key的情况下,使用这个key
if (variables.ChatApiKey) {
externalProvider.openaiAccount = {
key: variables.ChatApiKey,
baseUrl: '' //使用系统默认的base url
};
}
};
handleApiKey();

// 初始化深度和自动增加深度,避免无限嵌套
if (!props.workflowDispatchDeep) {
props.workflowDispatchDeep = 1;
Expand Down
Loading