From 2add7b5249dfe154dbbbf5a55f8008215448ddea Mon Sep 17 00:00:00 2001 From: Dao Hoang Son Date: Tue, 14 May 2024 14:22:15 +0700 Subject: [PATCH] Order thread messages ASC --- packages/openai/src/internal/assistant_message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openai/src/internal/assistant_message.ts b/packages/openai/src/internal/assistant_message.ts index aeb983f..cdf7c62 100644 --- a/packages/openai/src/internal/assistant_message.ts +++ b/packages/openai/src/internal/assistant_message.ts @@ -12,7 +12,7 @@ export async function assistantGetNewMessages( existingMessageIds: string[] ): Promise { const { data } = await threads.messages.list(threadId, { - order: "desc", + order: "asc", run_id: runId, }); return data.filter(