Spaces:
Configuration error
Configuration error
| from src.internal.rag.inference.inferencer import Inferencer | |
| from abc import ABC, abstractmethod | |
| from typing import List, Dict, Union | |
| from dataclasses import dataclass, field | |
| class AgentRequest: | |
| chat_memory: List[Dict] = field(default_factory=lambda: [{}]) | |
| prompt_template: Union[List[Dict], Dict] = field(default_factory=lambda: [{}]) | |
| enable_search: bool = False | |
| enable_retrieval: bool = False | |
| question: str = "" | |
| class Agent(ABC): | |
| def __init__(self, inferencer:Union[Inferencer, None] = None): | |
| if(inferencer is not None): | |
| self.inferencer = inferencer | |
| async def get_result(self, req:AgentRequest): | |
| pass | |