ArchAstro.Types.AICompletionResult (archastro v0.2.0)

Copy Markdown

The result of an AI chat completion request. Returned by chat completion endpoints after the model finishes generating.

Summary

Types

t()

@type t() :: %ArchAstro.Types.AICompletionResult{
  finish_reason: String.t(),
  message: ArchAstro.Types.AIMessage.t(),
  messages: [ArchAstro.Types.AIMessage.t()],
  token_usage:
    %{optional(String.t()) => ArchAstro.JSON.t()} | ArchAstro.Unset.t()
}

Functions

from_map(data)

@spec from_map(ArchAstro.JSON.object()) :: t()

matches?(value)

@spec matches?(ArchAstro.JSON.t()) :: boolean()

to_map(value)

@spec to_map(t()) :: ArchAstro.JSON.object()