🧵 fix: Assistants API Thread ID Handling (#4912)

This commit is contained in:
Danny Avila 2024-12-09 08:38:39 -05:00 committed by GitHub
parent cd1184a302
commit 1c05251826
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ async function initThread({ openai, body, thread_id: _thread_id }) {
thread = await openai.beta.threads.create(body);
}
const thread_id = _thread_id ?? thread.id;
const thread_id = _thread_id || thread.id;
return { messages, thread_id, ...thread };
}