Debugging
Debug your Upsonic Agents and Direct
Overview
Debugging in Upsonic provides detailed insights into the internal operations of your Agents and Direct calls. When enabled, debug mode displays comprehensive information about server connections, API requests, response data, and the execution flow of your AI tasks.
Debug mode is particularly useful when developing new applications, troubleshooting issues, or when you need to understand exactly how your AI agents are processing information and making decisions.
Enabling debug mode will generate a significant amount of output in your console. This is intended for development and troubleshooting purposes and should generally be disabled in production environments.
Enabling Debug mode in Agents
Debug mode can be enabled when initializing an Agent by setting the debug
parameter to True
. This will display detailed information about the agent’s operations, including server connections, API calls, and the execution flow.
When debug mode is enabled, you’ll see comprehensive logs about the agent’s initialization, server connections, and the complete execution flow of your tasks. This includes details about the prompts being sent to the language model, the responses received, and any intermediate processing steps.
Enabling Debug mode in Direct
Similar to Agents, debug mode can be enabled for Direct calls by setting the debug
parameter to True
during initialization. This provides detailed information about the direct language model interactions.
When debug mode is enabled for Direct calls, you’ll see detailed logs about the server connection, the exact prompts being sent to the language model, and the complete responses received. This is particularly useful when you need to fine-tune your prompts or understand why a particular response was generated.