diff --git a/erniebot-agent/applications/erniebot_researcher/EditorActorAgent.py b/erniebot-agent/applications/erniebot_researcher/EditorActorAgent.py index 025aed824..cc71e5417 100644 --- a/erniebot-agent/applications/erniebot_researcher/EditorActorAgent.py +++ b/erniebot-agent/applications/erniebot_researcher/EditorActorAgent.py @@ -4,7 +4,7 @@ from tools.prompt_utils import EB_EDIT_TEMPLATE, eb_functions from tools.utils import erniebot_chat, json_correct, write_to_json -from erniebot_agent.agents.base import Agent +from erniebot_agent.agents.agent import Agent from erniebot_agent.prompt import PromptTemplate @@ -14,7 +14,7 @@ class EditorActorAgent(Agent): def __init__( self, name: str, - llm: str = "ernie-bot-4", + llm: str = "ernie-4.0", system_message: Optional[str] = None, config: list = [], save_log_path=None, @@ -26,7 +26,7 @@ def __init__( self.save_log_path = save_log_path self.prompt = PromptTemplate(" 草稿为:\n\n{{report}}", input_variables=["report"]) - async def _async_run(self, report): + async def _run(self, report): messages = [ { "role": "user", diff --git a/erniebot-agent/applications/erniebot_researcher/RankingAgent.py b/erniebot-agent/applications/erniebot_researcher/RankingAgent.py index 320856f73..2fea02e33 100644 --- a/erniebot-agent/applications/erniebot_researcher/RankingAgent.py +++ b/erniebot-agent/applications/erniebot_researcher/RankingAgent.py @@ -4,7 +4,7 @@ from tools.prompt_utils import prompt_markdow from tools.utils import erniebot_chat, write_to_json -from erniebot_agent.agents.base import Agent +from erniebot_agent.agents.agent import Agent class RankingAgent(Agent): @@ -27,7 +27,7 @@ def __init__( self.save_log_path = save_log_path self.is_reset = False - async def _async_run(self, list_reports, query): + async def _run(self, list_reports, query): reports = [] for item in list_reports: if self.check_format(item): diff --git a/erniebot-agent/applications/erniebot_researcher/ResearchAgent.py b/erniebot-agent/applications/erniebot_researcher/ResearchAgent.py index 2c5e3cbc3..d959eca6f 100644 --- a/erniebot-agent/applications/erniebot_researcher/ResearchAgent.py +++ b/erniebot-agent/applications/erniebot_researcher/ResearchAgent.py @@ -4,7 +4,7 @@ from tools.utils import add_citation, erniebot_chat, write_to_json -from erniebot_agent.agents.base import Agent +from erniebot_agent.agents.agent import Agent from erniebot_agent.prompt import PromptTemplate SUMMARIZE_MAX_LENGTH = 1800 @@ -97,7 +97,7 @@ async def run_search_summary(self, query): # write_to_json(f"{self.dir_path}/research-{query}.jsonl", responses) return responses, url_dict - async def _async_run(self, query): + async def _run(self, query): """ Runs the ResearchAgent Returns: diff --git a/erniebot-agent/applications/erniebot_researcher/ReviserActorAgent.py b/erniebot-agent/applications/erniebot_researcher/ReviserActorAgent.py index 25b58d8bf..8cebbd184 100644 --- a/erniebot-agent/applications/erniebot_researcher/ReviserActorAgent.py +++ b/erniebot-agent/applications/erniebot_researcher/ReviserActorAgent.py @@ -2,7 +2,7 @@ from tools.utils import erniebot_chat, write_to_json -from erniebot_agent.agents.base import Agent +from erniebot_agent.agents.agent import Agent from erniebot_agent.prompt.prompt_template import PromptTemplate @@ -14,7 +14,7 @@ class ReviserActorAgent(Agent): def __init__( self, name: str, - llm: str = "erine-bot-4", + llm: str = "erine-4.0", system_message: Optional[str] = None, config: list = [], save_log_path=None, @@ -27,7 +27,7 @@ def __init__( self.config = config self.save_log_path = save_log_path - async def _async_run(self, draft, notes): + async def _run(self, draft, notes): messages = [ { "role": "user", diff --git a/erniebot-agent/applications/erniebot_researcher/tools/ranking_tool.py b/erniebot-agent/applications/erniebot_researcher/tools/ranking_tool.py index bf4a0916a..bf5937733 100644 --- a/erniebot-agent/applications/erniebot_researcher/tools/ranking_tool.py +++ b/erniebot-agent/applications/erniebot_researcher/tools/ranking_tool.py @@ -43,7 +43,7 @@ async def __call__( result = erniebot_chat(messages=messages, temperature=1e-10) else: result = erniebot_chat( - messages=messages, temperature=1e-10, model="ernie-bot-8k" + messages=messages, temperature=1e-10, model="ernie-longtext" ) l_index = result.index("{") r_index = result.rindex("}") diff --git a/erniebot-agent/applications/erniebot_researcher/tools/utils.py b/erniebot-agent/applications/erniebot_researcher/tools/utils.py index 36f8c1287..121a013cd 100644 --- a/erniebot-agent/applications/erniebot_researcher/tools/utils.py +++ b/erniebot-agent/applications/erniebot_researcher/tools/utils.py @@ -14,7 +14,7 @@ def erniebot_chat(messages: list, functions: Optional[str] = None, model: Optional[str] = None, **kwargs): if not model: - model = "ernie-bot-4" + model = "ernie-4.0" _config = dict( api_type=api_type, access_token=access_token, @@ -30,7 +30,7 @@ def erniebot_chat(messages: list, functions: Optional[str] = None, model: Option return resp_stream["result"] -def call_function(action: str, agent_role_prompt: str, model="ernie-bot-8k", **kwargs): +def call_function(action: str, agent_role_prompt: str, model="ernie-longtext", **kwargs): messages = [ { "role": "user",