mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
avoid submitting tool outputs when in_progress
This commit is contained in:
@@ -321,7 +321,10 @@ class OpenAIAssistant_Agents implements INode {
|
||||
}
|
||||
}
|
||||
|
||||
if (submitToolOutputs.length) {
|
||||
const newRun = await openai.beta.threads.runs.retrieve(threadId, runId)
|
||||
const newStatus = newRun?.status
|
||||
|
||||
if (submitToolOutputs.length && newStatus !== 'in_progress') {
|
||||
await openai.beta.threads.runs.submitToolOutputs(threadId, runId, {
|
||||
tool_outputs: submitToolOutputs
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user