get_metadata {tidyllm}R Documentation

Retrieve Metadata from Assistant Replies

Description

Retrieves metadata from assistant replies within an LLMMessage object. It returns the metadata as a tibble.

Usage

get_metadata(.llm, .index = NULL)

last_metadata(.llm)

Arguments

.llm

An LLMMessage object containing the message history.

.index

A positive integer specifying which assistant reply's metadata to extract. If NULL (default), metadata for all replies is returned.

Details

Metadata columns may include:

For convenience, last_metadata() is provided to retrieve the metadata for the last message.

Value

A tibble containing metadata for the specified assistant reply or all replies.

See Also

last_metadata()


[Package tidyllm version 0.3.4 Index]