View source: R/message_retrieval.R
get_logprobs | R Documentation |
Extracts token log probabilities from assistant replies within an LLMMessage
object.
Each row represents a token with its log probability and top alternative tokens.
get_logprobs(.llm, .index = NULL)
.llm |
An |
.index |
A positive integer specifying which assistant reply's log probabilities to extract.
If |
An empty tibble is output if no logprobs were requested. Currently only works with openai_chat()
Columns include:
reply_index
: The index of the assistant reply in the message history.
token
: The generated token.
logprob
: The log probability of the generated token.
bytes
: The byte-level encoding of the token.
top_logprobs
: A list column containing the top alternative tokens with their log probabilities.
A tibble containing log probabilities for the specified assistant reply or all replies.
get_metadata()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.