mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-16 23:45:13 +02:00
Adds a Google Gemini provider (Generative Language API) to the chain, ordered Ollama -> OpenAI -> Gemini -> Anthropic so Google credits are preferred with Anthropic as last-resort fallback. System->systemInstruction, assistant->model, json_mode->responseMimeType; model name validated before URL interpolation; maxOutputTokens defaults high for 2.5 thinking models. Also fixes AnthropicProvider default (retired claude-sonnet-4-20250514 -> 404); now claude-sonnet-4-6, honors ANTHROPIC_MODEL. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
603 B
Rust
19 lines
603 B
Rust
/// webclaw-llm: LLM integration with local-first hybrid architecture.
|
|
///
|
|
/// Provider chain tries Ollama (local) first, falls back to OpenAI, then Gemini, then Anthropic.
|
|
/// Provides schema-based extraction, prompt extraction, and summarization
|
|
/// on top of webclaw-core's content pipeline.
|
|
pub mod chain;
|
|
pub mod clean;
|
|
pub mod error;
|
|
pub mod extract;
|
|
pub mod provider;
|
|
pub mod providers;
|
|
pub mod summarize;
|
|
#[cfg(test)]
|
|
pub(crate) mod testing;
|
|
|
|
pub use chain::ProviderChain;
|
|
pub use clean::strip_thinking_tags;
|
|
pub use error::LlmError;
|
|
pub use provider::{CompletionRequest, LlmProvider, Message};
|