AGENT to agent
This commit is contained in:
parent
a823daa0dc
commit
91b75990bb
@ -49,7 +49,7 @@ class ChatRequest(BaseModel):
|
||||
tool_response: Optional[bool] = False
|
||||
system_prompt: Optional[str] = None
|
||||
mcp_settings: Optional[List[Dict]] = None
|
||||
robot_type: Optional[str] = "AGENT"
|
||||
robot_type: Optional[str] = "agent"
|
||||
|
||||
|
||||
class FileProcessRequest(BaseModel):
|
||||
|
||||
@ -82,7 +82,7 @@ class FileLoadedAgentManager:
|
||||
language: Optional[str] = None,
|
||||
system_prompt: Optional[str] = None,
|
||||
mcp_settings: Optional[List[Dict]] = None,
|
||||
robot_type: Optional[str] = "AGENT") -> Assistant:
|
||||
robot_type: Optional[str] = "agent") -> Assistant:
|
||||
"""获取或创建文件预加载的助手实例
|
||||
|
||||
Args:
|
||||
@ -95,7 +95,7 @@ class FileLoadedAgentManager:
|
||||
language: 语言代码,用于选择对应的系统提示词
|
||||
system_prompt: 可选的系统提示词,优先级高于项目配置
|
||||
mcp_settings: 可选的MCP设置,优先级高于项目配置
|
||||
robot_type: 机器人类型,取值 AGENT/CATALOG_AGENT
|
||||
robot_type: 机器人类型,取值 agent/catalog_agent
|
||||
|
||||
Returns:
|
||||
Assistant: 配置好的助手实例
|
||||
|
||||
@ -7,10 +7,10 @@ import json
|
||||
from typing import List, Dict, Optional
|
||||
|
||||
|
||||
def load_system_prompt(project_dir: str, language: str = None, system_prompt: str=None, robot_type: str = "AGENT") -> str:
|
||||
if robot_type == "AGENT":
|
||||
def load_system_prompt(project_dir: str, language: str = None, system_prompt: str=None, robot_type: str = "agent") -> str:
|
||||
if robot_type == "agent":
|
||||
return system_prompt or ""
|
||||
if robot_type == "CATALOG_AGENT":
|
||||
if robot_type == "catalog_agent":
|
||||
"""
|
||||
优先使用项目目录的system_prompt,没有才使用默认的system_prompt_default.md
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user