Files
nanobot/nanobot/agent/tools/web_config.py
T
chengyongru a4d2430140 refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings

* fix(signal): annotate async context manager as a generator
2026-10-30 13:07:03 +08:00

27 lines
646 B
Python

from pydantic import Field
from nanobot.config_base import Base
class WebSearchConfig(Base):
"""Web search configuration."""
provider: str = "duckduckgo"
api_key: str = ""
base_url: str = ""
max_results: int = 5
timeout: int = 30
class WebFetchConfig(Base):
"""Web fetch tool configuration."""
use_jina_reader: bool = True
class WebToolsConfig(Base):
"""Web tools configuration."""
enable: bool = True
use_proxy: bool = False
user_agent: str | None = None
search: WebSearchConfig = Field(default_factory=WebSearchConfig)
fetch: WebFetchConfig = Field(default_factory=WebFetchConfig)