Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Layer 1 - Core

Layer 1 provides primitives for interacting with LLMs and composing messages, tools, and structured outputs.

Components

  • Messages: typed containers for role + content.
  • Completion Config: tuning parameters (temperature, max tokens, etc.).
  • Tools: callable functions surfaced to the LLM.
  • Gateway: abstraction over model providers.

Proceed through the subsections for practical usage.