trulens.providers.google.endpoint¶
trulens.providers.google.endpoint
¶
Classes¶
GoogleCallback
¶
Bases: EndpointCallback
Attributes¶
endpoint
class-attribute
instance-attribute
¶
The endpoint owning this callback.
cost
class-attribute
instance-attribute
¶
Costs tracked by this callback.
Functions¶
handle_generation
¶
handle_generation(response: Any)
Get the usage information from GoogleGenAI LLM function response's usage_metadata field.
handle_generation_chunk
¶
handle_generation_chunk(response: Any) -> None
Called after receiving a chunk from a completion request.