polyc-llm 0.1.3

Provider-agnostic LLM trait + wire types for polychrome.
Documentation

Provider-agnostic LLM trait and wire types for polychrome.

This crate defines the [LlmProvider] trait that every concrete provider backend implements, and the language-shaped Rust types that flow through it.

[LlmProvider] is the seam that lets the planner swap LLM backends without touching its own code: one impl crate per provider, dispatched behind a dyn LlmProvider trait object.

Modules

  • [request] — [CompletionRequest] and everything reachable from it ([Message], [Content], [ToolSpec], [ToolChoice]).
  • [chunk] — [Chunk] (streaming response events) and friends ([Usage], [StopReason]).
  • [error] — the [LlmError] trait bound that [LlmProvider::Error] must satisfy.

The trait itself lives in this crate root; the wire types live in the modules above and are re-exported here for convenience.