Aludel.Prompts.PromptVersion (aludel v0.2.0)

Copy Markdown View Source

Schema for prompt versions.

Versions are immutable snapshots of prompt templates with auto-incrementing version numbers and extracted variable names.

Summary

Functions

Changeset for creating a prompt version.

Types

t()

@type t() :: %Aludel.Prompts.PromptVersion{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  prompt: term(),
  prompt_id: term(),
  template: term(),
  variables: term(),
  version: term()
}

Functions

changeset(prompt_version, attrs)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Changeset for creating a prompt version.

Validates that prompt_id and template are present.