Dagger.LLMMessage (dagger v1.0.0-beta.12)

Copy Markdown View Source

A single message in an LLM conversation.

Summary

Functions

The message's content blocks, in the order the model produced them.

A unique identifier for this LLMMessage.

The role that produced this message.

Token usage reported by the provider for the API call that produced this message; all zeros except on assistant responses.

Types

t()

@type t() :: %Dagger.LLMMessage{client: term(), query_builder: term()}

Functions

content(llm_message)

@spec content(t()) :: {:ok, [Dagger.LLMContentBlock.t()]} | {:error, term()}

The message's content blocks, in the order the model produced them.

id(llm_message)

@spec id(t()) :: {:ok, String.t()} | {:error, term()}

A unique identifier for this LLMMessage.

role(llm_message)

@spec role(t()) :: {:ok, Dagger.LLMMessageRole.t()} | {:error, term()}

The role that produced this message.

token_usage(llm_message)

@spec token_usage(t()) :: Dagger.LLMTokenUsage.t()

Token usage reported by the provider for the API call that produced this message; all zeros except on assistant responses.