🤖 chore: Improve Assistants Run Logging (#1801)

This commit is contained in:
Danny Avila 2024-02-14 13:33:33 -05:00 committed by GitHub
parent 9d3215dcaa
commit 60b1d1332c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 14 deletions

View file

@ -470,13 +470,14 @@ async function processMessages(openai, messages = []) {
}
text += (content.text?.value ?? '') + ' ';
logger.debug('[processMessages] Processing message:', { value: text });
// Process annotations if they exist
if (!content.text?.annotations) {
if (!content.text?.annotations?.length) {
continue;
}
logger.debug('Processing annotations:', content.text.annotations);
logger.debug('[processMessages] Processing annotations:', content.text.annotations);
for (const annotation of content.text.annotations) {
logger.debug('Current annotation:', annotation);
let file;