How paulrobello/par_ai_core works
Main Components
a) Core Components:
• LLM Provider Interface Layer
• Configuration Management System
• Utility Services Layer
• Output Handling System
• Logging System
• Pricing & Cost Tracking System
b) External Integrations:
• Various LLM Providers (OpenAI, Anthropic, Groq, etc.)
• Search Services (Tavily, Google, etc.)
• Authentication Systems
• LangChain Integration
┌─ Application Layer (Client Applications) ─────────────────────┐
• Par AI Core Interface Layer ────────────────────────────────┤
• ┌─ LLM Config ─┐ ┌─ Provider Management ─┐ ┌─ Utils ─┐ │
• ┘ └───────────────────────┘ └─────────┘ │
• Service Layer ───────────────────────────────────────────┐ │
• ┌─ LLM Services ─┐ ┌─ Search Services ─┐ │ │
• ┘ └───────────────────┘ │ │
• Integration Layer ────────────────────────────────────┐ │ │
• ┌─ LangChain ─┐ ┌─ Provider APIs ─┐ ┌─ Tools ─┐ │ │ │
• ┘ └─────────────────┘ └─────────┘ │ │ │
• ┘
Component Details
a) LLM Configuration (llm_config.py):
• Configuration flow
• Model selection
• Provider settings
• Environment variable handling
b) Provider Management (llm_providers.py):
• Provider interface
• API key validation
• Model compatibility
c) Utility Services:
• Logging system (par_logging.py)
• Output formatting (output_utils.py)
• Web tools (web_tools.py)
• Search utilities (search_utils.py)
d) Integration Points:
• API connections
• Authentication flow
• Data transformation
Data Flow Indicators
• Configuration flow
• API requests/responses
• Error handling paths
• Callback mechanisms
Documentation Elements
• Version information
• Required environment variables
• Supported providers
• Key dependencies
Implementation Notes
• Maintain consistent styling
• Notes for complex interactions