mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +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 });
|
||||
|
||||
if (response.threadId && response.runId) {
|
||||
const threadRun = await client.beta.threads.runs.retrieve(
|
||||
response.threadId,
|
||||
response.runId,
|
||||
);
|
||||
const threadRun = await client.beta.threads.runs.retrieve(response.runId, {
|
||||
thread_id: response.threadId,
|
||||
});
|
||||
response.usage = threadRun.usage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user