Skip to main content

jamjet_models/
lib.rs

1//! JamJet Model Adapters
2//!
3//! Provides a unified `ModelAdapter` trait with concrete implementations for:
4//! - Anthropic Claude (via Messages API)
5//! - OpenAI (via Chat Completions API)
6//! - Google Gemini (via Generative Language API)
7//! - Ollama (local inference via /api/chat)
8//!
9//! Each adapter records OTel GenAI span attributes and returns token counts
10//! in the response for telemetry and cost attribution.
11
12pub mod adapter;
13pub mod anthropic;
14pub mod google;
15pub mod ollama;
16pub mod openai;
17pub mod registry;
18
19pub use adapter::{
20    ChatMessage, ChatRole, ModelAdapter, ModelConfig, ModelError, ModelRequest, ModelResponse,
21    StructuredRequest,
22};
23pub use registry::ModelRegistry;