报告模型升级
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from langchain.agents.middleware import dynamic_prompt, ModelRequest
|
||||
|
||||
from src.server.deep_agent.init_llm import latest_llm, qwen_plus_llm
|
||||
from src.server.deep_agent.init_prompt import build_researcher_prompt
|
||||
from src.server.deep_agent.tools.crawl_tool import create_crawl4ai_batch_tool
|
||||
from src.server.deep_agent.tools.report_generator_tool import create_report_generator_tool
|
||||
@@ -79,6 +80,7 @@ Do NOT use this sub-agent for:
|
||||
- User profile collection
|
||||
- Image generation or editing tasks
|
||||
""",
|
||||
"model": qwen_plus_llm,
|
||||
"system_prompt": build_researcher_prompt(),
|
||||
"middleware": [language_control],
|
||||
"tools": [
|
||||
|
||||
@@ -3,7 +3,7 @@ from langchain_qwq import ChatQwen
|
||||
from src.core.config import settings
|
||||
|
||||
llm = ChatQwen(
|
||||
model="qwen3.5-flash",
|
||||
model="qwen3.6-plus",
|
||||
max_tokens=3_000,
|
||||
timeout=None,
|
||||
max_retries=2,
|
||||
@@ -21,6 +21,16 @@ qwen_plus_llm = ChatQwen(
|
||||
top_p=0.8,
|
||||
api_key=settings.QWEN_API_KEY
|
||||
)
|
||||
latest_llm = ChatQwen(
|
||||
model="qwen3.6-plus",
|
||||
max_tokens=3_000,
|
||||
timeout=None,
|
||||
max_retries=2,
|
||||
streaming=False,
|
||||
temperature=0.25,
|
||||
top_p=0.8,
|
||||
api_key=settings.QWEN_API_KEY
|
||||
)
|
||||
|
||||
|
||||
def build_main_llm(enable_thinking):
|
||||
|
||||
@@ -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
|
||||
#
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user