208365cd3d
Adds OpenAI provider to the unified provider architecture (ADR-015), supporting: - OpenAI API (api.openai.com) - GitHub Models API (models.github.ai/inference) - OpenAI-compatible endpoints (Fireworks, Together, etc.) Features: - Embedding support with text-embedding-3-small/large models - Text generation via chat completions API - Automatic retry with exponential backoff for rate limits - Provider auto-detection in registry (priority after Bedrock) Environment variables: - OPENAI_API_KEY: API key (required) - OPENAI_BASE_URL: Base URL override (optional) - OPENAI_EMBEDDING_MODEL: Embedding model (default: text-embedding-3-small) - OPENAI_GENERATION_MODEL: Generation model (default: gpt-4o-mini) Also adds: - Integration tests for RAG pipeline with MCP sampling - MCP client sampling support for integration tests - Ground truth Q&A pairs for Nextcloud User Manual 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
21 lines
523 B
Python
21 lines
523 B
Python
"""Unified provider infrastructure for embeddings and text generation."""
|
|
|
|
from .anthropic import AnthropicProvider
|
|
from .base import Provider
|
|
from .bedrock import BedrockProvider
|
|
from .ollama import OllamaProvider
|
|
from .openai import OpenAIProvider
|
|
from .registry import get_provider, reset_provider
|
|
from .simple import SimpleProvider
|
|
|
|
__all__ = [
|
|
"Provider",
|
|
"OllamaProvider",
|
|
"OpenAIProvider",
|
|
"AnthropicProvider",
|
|
"SimpleProvider",
|
|
"BedrockProvider",
|
|
"get_provider",
|
|
"reset_provider",
|
|
]
|