Skip to content

Legend#

This legend explains the notation, color coding, and stereotypes used in the Mermaid diagrams.

  • Stereotypes:
  • <>: Abstract base class or interface meant for extension
  • <>: Wrapper/Decorator around another component
  • <>: Data model/value object
  • <>/<>: Interface/Protocol type

  • Color coding (used via classDef):

  • Abstract base classes: gray background (f5f5f5), dashed border
  • Concrete implementations: light blue background (e3f2fd)
  • Interfaces/Protocols: light yellow background (fffde7)
  • Data models: light green background (e8f5e9)
  • External systems: light red background (ffebee)
  • Layers (context diagrams): distinct tints per layer

  • Design patterns annotations in notes:

  • Strategy Pattern: LLM backends (e.g., Ollama) implement the BaseLLM/LLM behaviors
  • Adapter Pattern: SyncAsyncConverter bridges sync/async tool functions; BaseToolAsyncAdapter adapts tools to async base
  • Template Method Pattern: Prompt templates provide format hooks
  • Factory Pattern: CallableTool.from_function/from_model
  • Decorator Pattern: Output parsers and StructuredOutputLLM wrapping LLM

When reading class diagrams: - Method pairs like chat/achat, complete/acomplete indicate sync/async counterparts. Streaming is controlled via the stream=True parameter on each method. - Aggregation arrows indicate usage/containment; inheritance arrows indicate extension.