Lux.LLM behaviour (Lux v0.5.0)

View Source

A module for interacting with LLMs. Defines the behaviours for LLMs and provides a default implementation.

Summary

Functions

See Lux.LLM.OpenAI.call/3.

Types

options()

@type options() :: map() | keyword()

prompt()

@type prompt() :: String.t()

tools()

@type tools() :: [Lux.Prism.t() | Lux.Beam.t() | Lux.Lens.t()]

Callbacks

call(prompt, tools, options)

@callback call(prompt(), tools(), options()) ::
  {:ok, Lux.LLM.Response.t()} | {:error, String.t()}

Functions

call(prompt, tools, options)

See Lux.LLM.OpenAI.call/3.