Skip to main content

greentic_llm/
lib.rs

1//! Provider-agnostic multi-LLM abstraction for the Greentic platform.
2//!
3//! Extracted from greentic-designer's `src/ui/llm/` (the post-rig-migration
4//! abstraction). Answers exactly one question: "send this chat to provider X,
5//! get a response/stream back." Knows nothing about tenants, roles, admin
6//! backends, or tool dispatch.
7
8pub mod capabilities;
9pub mod credentials;
10#[cfg(any(test, feature = "test-mock"))]
11pub mod mock;
12pub mod provider;
13pub mod rig_backend;
14
15pub use capabilities::{Capabilities, ProviderKind};
16pub use credentials::{CredError, Credential, CredentialSource, EnvCredentialSource};
17pub use provider::{
18    ChatImage, ChatMessage, ChatRequest, ChatResponse, ChatStream, FinishReason, LlmError,
19    LlmProvider, MessageRole, StreamEvent, ToolCall, ToolDef,
20};
21pub use rig_backend::RigBackend;