View Source ExOpenAI.Components.EasyInputMessage (ex_openai.ex v2.0.0-beta2)

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions.

Fields

  • :content - required - String.t() | ExOpenAI.Components.InputMessageContentList.t()
    Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.

  • :phase - optional - ExOpenAI.Components.MessagePhase.t() | any()

  • :role - required - :user | :assistant | :system | :developer
    The role of the message input. One of user, assistant, system, or developer.
    Allowed values: "user", "assistant", "system", "developer"

  • :type - optional - :message
    The type of the message input. Always message.
    Allowed values: "message"

Summary

Types

@type t() :: %ExOpenAI.Components.EasyInputMessage{
  content: String.t() | ExOpenAI.Components.InputMessageContentList.t(),
  phase: (ExOpenAI.Components.MessagePhase.t() | any()) | nil,
  role: ((:user | :assistant) | :system) | :developer,
  type: :message | nil
}