File size: 893 Bytes
565a379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from abc import ABC, abstractmethod
from typing import Dict, Optional, Any

class BaseModel(ABC):
    """
    Abstract base class for all AI models (Gemini, Qwen, etc).
    Enforces a consistent interface for the Orchestrator.
    """
    
    @abstractmethod
    async def solve(self, prompt: str, image_data: Optional[str] = None, **kwargs) -> Dict[str, Any]:
        """
        Solve a problem using the model.
        
        Args:
            prompt: The text prompt.
            image_data: Optional Base64 encoded image or URL.
            **kwargs: Additional model-specific arguments.
            
        Returns:
            Dict containing:
                - 'answer': The solution text/markdown.
                - 'confidence': Float between 0.0 and 1.0.
                - 'model': Name of the model used.
                - 'metadata': Additional info.
        """
        pass