mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(OpenAI Node): Fix memory connector for assistant message (#17501)
This commit is contained in:
@@ -281,10 +281,9 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
|||||||
await memory.saveContext({ input }, { output: response.output });
|
await memory.saveContext({ input }, { output: response.output });
|
||||||
|
|
||||||
if (response.threadId && response.runId) {
|
if (response.threadId && response.runId) {
|
||||||
const threadRun = await client.beta.threads.runs.retrieve(
|
const threadRun = await client.beta.threads.runs.retrieve(response.runId, {
|
||||||
response.threadId,
|
thread_id: response.threadId,
|
||||||
response.runId,
|
});
|
||||||
);
|
|
||||||
response.usage = threadRun.usage;
|
response.usage = threadRun.usage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user