2
0

🚸 (dify) Improve error display when streaming

This commit is contained in:
Baptiste Arnaud
2024-05-25 19:59:34 +02:00
parent e015385a7c
commit e1f1b58c1c
10 changed files with 126 additions and 90 deletions

View File

@ -142,8 +142,8 @@ export const askAssistant = createAction({
getStreamVariableId: ({ responseMapping }) =>
responseMapping?.find((m) => !m.item || m.item === 'Message')
?.variableId,
run: async ({ credentials, options, variables }) =>
createAssistantStream({
run: async ({ credentials, options, variables }) => ({
stream: await createAssistantStream({
apiKey: credentials.apiKey,
assistantId: options.assistantId,
message: options.message,
@ -154,6 +154,7 @@ export const askAssistant = createAction({
functions: options.functions,
responseMapping: options.responseMapping,
}),
}),
},
server: async ({
credentials: { apiKey },