Jido.AI.Directive.LLMGenerate (Jido AI v2.2.0)

Copy Markdown View Source

Directive asking the runtime to generate an LLM response (non-streaming).

Uses ReqLLM.Generation.generate_text/3 for non-streaming text generation. The runtime will execute this asynchronously and send the result as a ai.llm.response signal.

This is simpler than LLMStream for cases where streaming is not needed.

Summary

Functions

Create a new LLMGenerate directive.

Types

t()

@type t() :: %Jido.AI.Directive.LLMGenerate{
  context: any(),
  id: binary(),
  max_tokens: integer(),
  metadata: map(),
  model: nil | binary(),
  model_alias: nil | atom(),
  req_http_options: [any()],
  system_prompt: nil | binary(),
  temperature: number(),
  timeout: nil | integer(),
  tool_choice: any(),
  tools: [any()]
}

Functions

new!(attrs)

Create a new LLMGenerate directive.