mirror of https://github.com/langgenius/dify.git
fix: single run url error in pipeline
This commit is contained in:
parent
4b9a5a66c1
commit
cf89d06023
|
|
@ -308,14 +308,14 @@ const useOneStepRun = <T>({
|
|||
else {
|
||||
postData.inputs = submitData
|
||||
}
|
||||
res = await singleNodeRun(flowId!, id, postData) as any
|
||||
res = await singleNodeRun(flowType, flowId!, id, postData) as any
|
||||
}
|
||||
else if (isIteration) {
|
||||
setIterationRunResult([])
|
||||
let _iterationResult: NodeTracing[] = []
|
||||
let _runResult: any = null
|
||||
ssePost(
|
||||
getIterationSingleNodeRunUrl(isChatMode, flowId!, id),
|
||||
getIterationSingleNodeRunUrl(flowType, isChatMode, flowId!, id),
|
||||
{ body: { inputs: submitData } },
|
||||
{
|
||||
onWorkflowStarted: noop,
|
||||
|
|
@ -418,7 +418,7 @@ const useOneStepRun = <T>({
|
|||
let _loopResult: NodeTracing[] = []
|
||||
let _runResult: any = null
|
||||
ssePost(
|
||||
getLoopSingleNodeRunUrl(isChatMode, flowId!, id),
|
||||
getLoopSingleNodeRunUrl(flowType, isChatMode, flowId!, id),
|
||||
{ body: { inputs: submitData } },
|
||||
{
|
||||
onWorkflowStarted: noop,
|
||||
|
|
|
|||
|
|
@ -36,16 +36,16 @@ export const fetchChatRunHistory: Fetcher<ChatRunHistoryResponse, string> = (url
|
|||
return get<ChatRunHistoryResponse>(url)
|
||||
}
|
||||
|
||||
export const singleNodeRun = (appId: string, nodeId: string, params: object) => {
|
||||
return post(`apps/${appId}/workflows/draft/nodes/${nodeId}/run`, { body: params })
|
||||
export const singleNodeRun = (flowType: FlowType, flowId: string, nodeId: string, params: object) => {
|
||||
return post(`${getFlowPrefix(flowType)}/${flowId}/workflows/draft/nodes/${nodeId}/run`, { body: params })
|
||||
}
|
||||
|
||||
export const getIterationSingleNodeRunUrl = (isChatFlow: boolean, appId: string, nodeId: string) => {
|
||||
return `apps/${appId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/iteration/nodes/${nodeId}/run`
|
||||
export const getIterationSingleNodeRunUrl = (flowType: FlowType, isChatFlow: boolean, flowId: string, nodeId: string) => {
|
||||
return `${getFlowPrefix(flowType)}/${flowId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/iteration/nodes/${nodeId}/run`
|
||||
}
|
||||
|
||||
export const getLoopSingleNodeRunUrl = (isChatFlow: boolean, appId: string, nodeId: string) => {
|
||||
return `apps/${appId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/loop/nodes/${nodeId}/run`
|
||||
export const getLoopSingleNodeRunUrl = (flowType: FlowType, isChatFlow: boolean, flowId: string, nodeId: string) => {
|
||||
return `${getFlowPrefix(flowType)}/${flowId}/${isChatFlow ? 'advanced-chat/' : ''}workflows/draft/loop/nodes/${nodeId}/run`
|
||||
}
|
||||
|
||||
export const fetchPublishedWorkflow: Fetcher<FetchWorkflowDraftResponse, string> = (url) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue