googleapis / googleapis/python-genai
Logging of REST API calls to the Gemini service
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
I am using the genai package and all is well. I believe it is making API calls to VertexAI at the endpoint:
aiplatform.googleapis.com
My question:
Can I log or otherwise debug the REST requests sent and received? Ideally, I would like to see the requests and responses sent from Python and received by Python. This is for education and debugging purposes.
I have tried:
```
import logging
logging.getLogger().setLevel(logging.DEBUG)
```
and that worked to an extent ... the logs did show a REST request but there was no logging of the payload and no logging of the response text. Ideally I would like to see a rich and complete set of data.
Contributor guide
Assessment
This issue has not been assessed yet.