mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
dc7b732b2c
* add simple rag mcp * add rag_agent in expGen v2 * add conf config for research rag * fix CI * refactor: move context7 and rag config files to new conf modules * make rag agent general * fix CI --------- Co-authored-by: Young <afe.young@gmail.com>
18 lines
685 B
Python
18 lines
685 B
Python
from pydantic_ai.mcp import MCPServerStreamableHTTP
|
|
|
|
from rdagent.components.agent.base import PAIAgent
|
|
from rdagent.components.agent.rag.conf import SETTINGS
|
|
from rdagent.utils.agent.tpl import T
|
|
|
|
|
|
class Agent(PAIAgent):
|
|
"""
|
|
A specific agent for RAG
|
|
"""
|
|
|
|
def __init__(self, system_prompt: str | None = None):
|
|
toolsets = [MCPServerStreamableHTTP(SETTINGS.url, timeout=SETTINGS.timeout)]
|
|
if system_prompt is None:
|
|
system_prompt = "You are a Retrieval-Augmented Generation (RAG) agent. Use the retrieved documents to answer the user's queries accurately and concisely."
|
|
super().__init__(system_prompt=system_prompt, toolsets=toolsets)
|