报告模型升级

This commit is contained in:
zcr
2026-05-19 16:27:46 +08:00
parent 44ce5d0786
commit e75b92e112
3 changed files with 21 additions and 3 deletions

View File

@@ -74,9 +74,16 @@ from typing import List, Set
from ddgs import DDGS
from langchain.tools import tool
from pydantic import BaseModel, Field
@tool
class TopicResearchInput(BaseModel):
"""Input for topic research tool."""
topic: List[str] = Field(description="List of separate research keyword strings. Example: ['modern sofa design', 'sustainable wood furniture']")
max_urls: int = Field(default=5, description="Maximum number of URLs to return")
@tool(args_schema=TopicResearchInput)
async def topic_research(topic: List[str], max_urls: int = 5) -> str:
"""
In-depth research tool (DuckDuckGo version).
@@ -127,7 +134,6 @@ async def topic_research(topic: List[str], max_urls: int = 5) -> str:
print(f" topic research !!!!!!!!!!!!!!!!!!!!! {selected_urls}")
return json.dumps(selected_urls, ensure_ascii=False)
# import asyncio
#
#