Current section
Files
Jump to
Current section
Files
lib/letta_api/model/source.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.13.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule LettaAPI.Model.Source do
@moduledoc """
Representation of a source, which is a collection of files and passages. Parameters: id (str): The ID of the source name (str): The name of the source. embedding_config (EmbeddingConfig): The embedding configuration used by the source. user_id (str): The ID of the user that created the source. metadata (dict): Metadata associated with the source. description (str): The description of the source.
"""
@derive JSON.Encoder
defstruct [
:id,
:name,
:description,
:embedding_config,
:organization_id,
:metadata,
:created_by_id,
:last_updated_by_id,
:created_at,
:updated_at
]
@type t :: %__MODULE__{
:id => String.t | nil,
:name => String.t,
:description => String.t | nil,
:embedding_config => LettaAPI.Model.EmbeddingConfig.t,
:organization_id => String.t | nil,
:metadata => %{optional(String.t) => any()} | nil,
:created_by_id => String.t | nil,
:last_updated_by_id => String.t | nil,
:created_at => DateTime.t | nil,
:updated_at => DateTime.t | nil
}
alias LettaAPI.Deserializer
def decode(value) do
value
|> Deserializer.deserialize(:embedding_config, :struct, LettaAPI.Model.EmbeddingConfig)
|> Deserializer.deserialize(:metadata, :map, LettaAPI.Model.AnyType)
end
end