Expand description
§Aether AI
AI provider implementations for the Aether code injection framework.
This crate provides ready-to-use AI backends:
- OpenAI: GPT-4, GPT-3.5-turbo
- Anthropic: Claude models
- Local: Ollama and other local providers
§Example
ⓘ
use aether_ai::OpenAiProvider;
use aether_core::{InjectionEngine, Template};
// One-line initialization from environment
let provider = OpenAiProvider::from_env()?;
let engine = InjectionEngine::new(provider);
let template = Template::new("{{AI:greeting}}");
let result = engine.render(&template).await?;Re-exports§
pub use openai::OpenAiProvider;pub use anthropic::AnthropicProvider;pub use ollama::OllamaProvider;pub use gemini::GeminiProvider;pub use error::AiError;
Modules§
- anthropic
- Anthropic Claude provider implementation.
- error
- AI-specific error types.
- gemini
- Google Gemini provider implementation.
- ollama
- Ollama local provider implementation.
- openai
- OpenAI provider implementation.
Structs§
- Injection
Context - Re-export core types for convenience. Context for AI code injection.
- Injection
Engine - Re-export core types for convenience. The main engine for AI code injection.
- Provider
Config - Re-export core types for convenience. Configuration for an AI provider.
- Slot
- Re-export core types for convenience. Represents a slot in a template where code can be injected.
- Template
- Re-export core types for convenience. Represents a template with AI injection slots.
Enums§
- Aether
Error - Re-export core types for convenience. Main error type for the Aether framework.
Traits§
- AiProvider
- Re-export core types for convenience. Trait that AI providers must implement.
Functions§
- anthropic
- Create an Anthropic provider with a single line.
- gemini
- Create a Google Gemini provider with a single line.
- grok
- Create a Grok (xAI) provider with a single line.
- ollama
- Create an Ollama provider with a single line.
- openai
- Create an OpenAI provider with a single line.
Type Aliases§
- Result
- Re-export core types for convenience. Result type alias for Aether operations.