LangChain.Message.CitationSource (LangChain v0.6.0)

Copy Markdown View Source

Represents the source of a citation - where the cited information came from.

Source Types

  • :web - A URL-based web source (search results, web pages)
  • :document - A document provided in the request (Anthropic documents, OpenAI files)
  • :place - A geographic location (Google Maps)

Summary

Types

t()

@type t() :: %LangChain.Message.CitationSource{
  document_id: term(),
  metadata: term(),
  title: term(),
  type: term(),
  url: term()
}

Functions

new(attrs \\ %{})

@spec new(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

new!(attrs \\ %{})

@spec new!(map()) :: t() | no_return()