ChatGeneration
A ChatGeneration
contains all of the data that has been sent to a message-based LLM (like GPT-4) as well as the response from the LLM.
It is designed to be passed to a Step to enable the Prompt Playground.
Attributes
The LLM model used.
The completion of the prompt. More info in GenerationMessage.
The variables to the prompt, represented as a dictionary.
The list of messages that form the prompt if in chat mode.
The provider of the LLM, such as “openai-chat”.
The list of tools that can be used by the LLM.
The settings the LLM provider was called with. Can include OpenAI tools and functions.
The error returned by the LLM.
The tags you want to assign to this generation.
Total tokens sent to the LLM.
Total tokens returned by the LLM
Total tokens used by the LLM.
Time from the request to receiving the first token.
LLM speed of token generation, in tokens per second.
Total duration of the LLM request.
Example
A chat completion displayed in the Prompt Playground
Was this page helpful?