Skip to content

Overview

@johannes.latzel/llm-chat is the abstract, provider-neutral chat engine: the tool-call loop, streaming, hooks, prompt trees and session persistence.

The engine ships no provider. Use @johannes.latzel/llm-chat-openai, or implement a ChatService subclass whose createStream() yields normalized StreamEvent values; the engine handles everything around it.

Package Description
@johannes.latzel/llm-chat-message Provider-neutral message, role, finish-reason and writer primitives; zero runtime dependencies
@johannes.latzel/llm-chat-tool Provider-neutral tool, hook and result primitives; zero runtime dependencies
@johannes.latzel/llm-chat-openai OpenAI / OpenAI-compatible provider implementing ChatService.createStream()
  • Examples: scripts for chats, tools, hooks, and sessions
  • Chats: building messages, hooks, serialization
  • Services: tool-call loop and provider contract
  • Tools: defining tools, registration, hooks (imported from @johannes.latzel/llm-chat-tool)
  • Hooks: overview of the hook system
  • Environment variables: configuration reference
  • Architecture: high-level design
  • API reference: exported classes, types and enums

License

MIT