Spaces:
Configuration error
Configuration error
Download src/internal/rag/agents/query_maker_agent.py from lifedebugger/cs-ai-sakura-dev: direct link, hf CLI and curl.
- Browser
- Download file 576 Bytes
-
https://huggingface.co/spaces/lifedebugger/cs-ai-sakura-dev/resolve/main/src/internal/rag/agents/query_maker_agent.py
- Command line
-
hf download hf://spaces/lifedebugger/cs-ai-sakura-dev/src/internal/rag/agents/query_maker_agent.py
-
curl -L -o query_maker_agent.py https://huggingface.co/spaces/lifedebugger/cs-ai-sakura-dev/resolve/main/src/internal/rag/agents/query_maker_agent.py
576 Bytes
| from src.internal.rag.agents.base_agents import Agent | |
| from src.internal.rag.inference.inferencer import Inferencer | |
| class QueryMakerAgent(Agent): | |
| def __init__(self, inferencer : Inferencer , prompt_template): | |
| super().__init__(inferencer, prompt_template) | |
| self.inferencer = inferencer | |
| self.prompt_template = prompt_template | |
| async def get_result(self, question : str): | |
| self.inferencer.model.prompt_template = self.prompt_template | |
| print("Question received :", question) | |
| return await self.inferencer.infer(query = question) | |