CitraClient.Schemas.Message (citra_client v0.3.0)

View Source

Schema for reading a message.

Fields

  • :content — list of map() — Message content in Bedrock format
  • :conversation_id — UUID String.t() (API key: conversationId)
  • :created_atDateTime.t() (API key: createdAt)
  • :id — UUID String.t()
  • :roleString.t() — 'user' or 'assistant'
  • :tool_callsmap() (API key: toolCalls)

Summary

Functions

Build this struct from a decoded JSON map received from the API. Unknown fields are ignored.

Convert this struct into a map with the API's camelCase keys, ready to be JSON-encoded. Fields whose value is nil are omitted.

Types

t()

@type t() :: %CitraClient.Schemas.Message{
  content: [map() | nil],
  conversation_id: String.t() | nil,
  created_at: DateTime.t() | nil,
  id: String.t() | nil,
  role: String.t() | nil,
  tool_calls: map() | nil
}

Functions

from_api(data)

Build this struct from a decoded JSON map received from the API. Unknown fields are ignored.

to_api(struct)

Convert this struct into a map with the API's camelCase keys, ready to be JSON-encoded. Fields whose value is nil are omitted.