fix: enhance error logging with exception info across multiple modules

This commit is contained in:
Alex
2025-05-05 13:12:39 +01:00
parent cf333873fd
commit 481df4d604
14 changed files with 37 additions and 30 deletions

View File

@@ -213,7 +213,7 @@ class OpenAILLM(BaseLLM):
}
})
except Exception as e:
logging.error(f"Error processing image attachment: {e}")
logging.error(f"Error processing image attachment: {e}", exc_info=True)
if 'content' in attachment:
prepared_messages[user_message_index]["content"].append({
"type": "text",
@@ -228,7 +228,7 @@ class OpenAILLM(BaseLLM):
"file": {"file_id": file_id}
})
except Exception as e:
logging.error(f"Error uploading PDF to OpenAI: {e}")
logging.error(f"Error uploading PDF to OpenAI: {e}", exc_info=True)
if 'content' in attachment:
prepared_messages[user_message_index]["content"].append({
"type": "text",
@@ -301,7 +301,7 @@ class OpenAILLM(BaseLLM):
return file_id
except Exception as e:
logging.error(f"Error uploading file to OpenAI: {e}")
logging.error(f"Error uploading file to OpenAI: {e}", exc_info=True)
raise