Skip to main content

Crate jamjet_models

Crate jamjet_models 

Source
Expand description

JamJet Model Adapters

Provides a unified ModelAdapter trait with concrete implementations for:

  • Anthropic Claude (via Messages API)
  • OpenAI (via Chat Completions API)
  • Google Gemini (via Generative Language API)
  • Ollama (local inference via /api/chat)

Each adapter records OTel GenAI span attributes and returns token counts in the response for telemetry and cost attribution.

Re-exports§

pub use adapter::ChatMessage;
pub use adapter::ChatRole;
pub use adapter::ModelAdapter;
pub use adapter::ModelConfig;
pub use adapter::ModelError;
pub use adapter::ModelRequest;
pub use adapter::ModelResponse;
pub use adapter::StructuredRequest;
pub use registry::ModelRegistry;

Modules§

adapter
Unified model adapter trait and shared types.
anthropic
Anthropic Claude adapter (Messages API).
google
Google Gemini adapter (Generative Language API).
ollama
Ollama adapter — local model inference via Ollama’s HTTP API.
openai
OpenAI adapter (Chat Completions API).
registry
Model registry — resolves model names to adapters.