Skip to content

How to View the Content of Each API Call Made by OpenAIAgent? #15195

Answered by dosubot bot
AlexanderKolev asked this question in Q&A
Discussion options

You must be logged in to vote

To inspect the body of each API request made by OpenAIAgent in Llama-Index, you can set the OpenAI logging level to DEBUG. This will allow you to see the full request details.

Here's how you can do it:

import logging
logging.basicConfig(level=logging.DEBUG)

This configuration will enable detailed logging, including the content of each API request. For more detailed examples, you can refer to the example notebook provided in the Llama-Index repository: SimpleIndexDemo.ipynb [1][2].

To continue talking to Dosu, mention @dosu.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlexanderKolev
Comment options

Answer selected by AlexanderKolev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant