From 7b2d7f1e01eb3cebd2b97731cb956d8cf4354227 Mon Sep 17 00:00:00 2001 From: qcampbel Date: Tue, 6 Feb 2024 14:14:48 -0500 Subject: [PATCH] renamed ModifyScript to ModifySimulationScript --- .../simulation_tools/create_simulation.py | 14 +++++++------- mdagent/tools/subagent_tools.py | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mdagent/tools/base_tools/simulation_tools/create_simulation.py b/mdagent/tools/base_tools/simulation_tools/create_simulation.py index 42a32267..67256c94 100644 --- a/mdagent/tools/base_tools/simulation_tools/create_simulation.py +++ b/mdagent/tools/base_tools/simulation_tools/create_simulation.py @@ -11,7 +11,7 @@ from mdagent.utils import FileType, PathRegistry -class ModifyScriptUtils: +class ModifySimulationScriptUtils: llm: Optional[BaseLanguageModel] def __init__(self, llm): @@ -90,7 +90,7 @@ def __init__(self, llm): def _prompt_summary(self, query: str, llm: BaseLanguageModel = None): if not llm: - raise ValueError("No language model provided at ModifyScriptTool") + raise ValueError("No language model provided at ModifySimulationScriptTool") prompt_template = ( "You're an expert programmer and in molecular dynamics. " @@ -132,7 +132,7 @@ def remove_leading_spaces(self, text): return "\n".join(stripped_lines) -class ModifyScriptInput(BaseModel): +class ModifySimulationScriptInput(BaseModel): query: str = Field( ..., description=( @@ -145,13 +145,13 @@ class ModifyScriptInput(BaseModel): class ModifyBaseSimulationScriptTool(BaseTool): - name: str = "ModifyScriptTool" + name: str = "ModifySimulationScriptTool" description: str = ( "This tool takes a base simulation script and a user " "requirement and returns a modified script. " ) - args_schema = ModifyScriptInput + args_schema = ModifySimulationScriptInput llm: Optional[BaseLanguageModel] path_registry: Optional[PathRegistry] @@ -162,7 +162,7 @@ def __init__(self, path_registry: Optional[PathRegistry], llm): def _run(self, *args, **input): if self.llm is None: # this should not happen - print("No language model provided at ModifyScriptTool") + print("No language model provided at ModifySimulationScriptTool") return "llm not initialized" if len(args) > 0: return ( @@ -183,7 +183,7 @@ def _run(self, *args, **input): with open(base_script_path, "r") as file: base_script = file.read() base_script = "".join(base_script) - utils = ModifyScriptUtils(self.llm) + utils = ModifySimulationScriptUtils(self.llm) description = input.get("query") answer = utils._prompt_summary( diff --git a/mdagent/tools/subagent_tools.py b/mdagent/tools/subagent_tools.py index 6f049c88..1afc80b1 100644 --- a/mdagent/tools/subagent_tools.py +++ b/mdagent/tools/subagent_tools.py @@ -63,9 +63,9 @@ class SkillRetrievalInput(BaseModel): class SkillRetrieval(BaseTool): name = "SkillRetrieval" description = ( - "Only use this tool to retrieve skills that have been " - "made during the current iteration. Use this tool less than other tools. " - "Use this if there is no tool available that can be used " + "Only use this tool to retrieve new skills you created during " + "the current iteration. Use this tool less than other tools. Use " + "this if there is no tool available that can be used for the task." ) subagent_settings: Optional[SubAgentSettings] args_schema: Optional[Type[BaseModel]] = SkillRetrievalInput