2
0

🚑 Fix invalid timeout for long running integrations

This commit is contained in:
Baptiste Arnaud
2023-12-19 14:24:36 +01:00
parent 655b32ef75
commit 64fc59bd3a
3 changed files with 25 additions and 14 deletions

View File

@@ -23,18 +23,31 @@ export const executeIntegration =
return executeGoogleAnalyticsBlock(state, block)
case IntegrationBlockType.EMAIL:
return executeSendEmailBlock(state, block)
case IntegrationBlockType.WEBHOOK:
case IntegrationBlockType.ZAPIER:
case IntegrationBlockType.MAKE_COM:
case IntegrationBlockType.PABBLY_CONNECT:
return {
...(await executeWebhookBlock(state, block)),
startTimeShouldBeUpdated: true,
}
case IntegrationBlockType.WEBHOOK:
return executeWebhookBlock(state, block)
case IntegrationBlockType.OPEN_AI:
return executeOpenAIBlock(state, block)
return {
...(await executeOpenAIBlock(state, block)),
startTimeShouldBeUpdated: true,
}
case IntegrationBlockType.PIXEL:
return executePixelBlock(state, block)
case IntegrationBlockType.ZEMANTIC_AI:
return executeZemanticAiBlock(state, block)
return {
...(await executeZemanticAiBlock(state, block)),
startTimeShouldBeUpdated: true,
}
default:
return executeForgedBlock(state, block)
return {
...(await executeForgedBlock(state, block)),
startTimeShouldBeUpdated: true,
}
}
}

View File

@@ -145,8 +145,9 @@ export const createChatCompletion = createAction({
},
stream: {
getStreamVariableId: (options) =>
options.responseMapping?.find((res) => res.item === 'Message content')
?.variableId,
options.responseMapping?.find(
(res) => res.item === 'Message content' || !res.item
)?.variableId,
run: async ({ credentials: { apiKey }, options, variables }) => {
const config = {
apiKey,