-
Notifications
You must be signed in to change notification settings - Fork 3.2k
How to get the raw LLM request? #2732
Description
Challenge/request
I am trying to see the raw LLM request that is sent to the LLM for any given agent call. I want to see the exact text that is sent to the LLM because that makes it easier to experiment. I can use direct LLM calls to experiment with the structure of the prompt locally to see what works best before seeing how to format and structure things for ADK.
Attempted so far
I have used verbose logging and different callbacks to print out various pieces of context with llm_request.contents, llm_request.config.system_instruction, and others, but it's not clear which of these pieces are actually sent in the LLM request, in what structure, and in what order.
Is there a way of seeing exactly what is sent to the LLM? Or maybe specify which fields of the llm_request are sent and how they are structured in the prompt? It might also be nice to make it easy to see this with a specific field in llm_request that just has the full unstructured text of what is sent in the request.