Files
NexQuant/rdagent/components/agent/mcp/context7.py
T
you-n-g 5ba5e8356c feat: init pydantic ai agent & context 7 mcp (#1240)
* feat: init pydantic ai agent & context 7 mcp

* feat: integrate MCP documentation search into data science pipeline evaluation

* fix: disable MCP documentation search and update related docstrings and defaults

* lint

* fix: correct prompt formatting and conditional blocks in pipeline_eval section

* lint

* feat: add query method to PAIAgent for synchronous agent execution

* fix: apply nest_asyncio for agent and update context7 query method

* lint

* lint

* lint

* lint

* docs: update MCP folder docstring and rename test class in test_pydantic.py

* refactor: centralize completion kwargs logic and update pydantic_ai integration

* fixbug

* typo

* fix: bug triggered by padantic-ai version backtracking.

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-09-13 10:25:02 +08:00

30 lines
709 B
Python

"""
The context7 is based on a modified version of the context7.
You can follow the instructions to install it
mkdir -p ~/tmp/
cd ~/tmp/ && git clone https://github.com/Hoder-zyf/context7.git
cd ~/tmp/context7
npm install -g bun
bun i && bun run build
bun run dist/index.js --transport http --port 8123 # > bun.out 2>&1 &
"""
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
"""Project specific settings."""
url: str = "http://localhost:8123/mcp"
timeout: int = 120
model_config = SettingsConfigDict(
env_prefix="CONTEXT7_",
# extra="allow", # Does it allow extrasettings
)
SETTINGS = Settings()