View Source LangChain.LangChainError exception (LangChain v0.2.0)
Exception used for raising LangChain specific errors.
It stores the :message
. Passing an Ecto.Changeset with an error
converts the error into a string message.
raise LangChainError, changeset
raise LangChainError, "Message text"
Summary
Functions
Create the exception using either a message or a changeset who's errors are converted to a message.
Types
@type t() :: %LangChain.LangChainError{__exception__: true, message: term()}
Functions
@spec exception(message :: String.t() | Ecto.Changeset.t()) :: t()
Create the exception using either a message or a changeset who's errors are converted to a message.