OpenAIPydanticProgram
, to get structured data from gpt4. How do I get from its output info about the call? I want to know, for exemple, outut and input tokens used. This is my code: program = OpenAIPydanticProgram.from_defaults(
output_cls=ListItems,
llm=llm,
prompt=prompt,
verbose=True,
)
output = program(capitulo=capitulo,posicao = posicao,exemplos = exemplos)
output
?import openai openai.log = "debug"
OpenAIPydanticProgram
. But You can use the tokencounting handler from LlamaIndex to get the details for each call.