Current section
Files
Jump to
Current section
Files
lib/ex_bifrost/model/anthropic_message_response.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.23.0 (https://openapi-generator.tech)
# using the Elixir SDK Generator template (https://github.com/houllette/elixir-sdk-generator).
# Do not edit this file manually — edit the templates and regenerate instead.
defmodule ExBifrost.Model.AnthropicMessageResponse do
@moduledoc """
AnthropicMessageResponse model.
"""
@derive JSON.Encoder
defstruct [
:id,
:type,
:role,
:content,
:model,
:stop_reason,
:stop_sequence,
:usage
]
@type t :: %__MODULE__{
:id => String.t() | nil,
:type => String.t() | nil,
:role => String.t() | nil,
:content => [ExBifrost.Model.AnthropicContentBlock.t()] | nil,
:model => String.t() | nil,
:stop_reason => String.t() | nil,
:stop_sequence => String.t() | nil,
:usage => ExBifrost.Model.AnthropicCreateMessage200ResponseUsage.t() | nil
}
alias ExBifrost.Deserializer
def decode(value) do
value
|> Deserializer.deserialize(:content, :list, ExBifrost.Model.AnthropicContentBlock)
|> Deserializer.deserialize(:usage, :struct, ExBifrost.Model.AnthropicCreateMessage200ResponseUsage)
end
end