Skip to content

Commit

Permalink
renamed ModifyScript to ModifySimulationScript
Browse files Browse the repository at this point in the history
  • Loading branch information
qcampbel committed Feb 6, 2024
1 parent 84c8c67 commit 7b2d7f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions mdagent/tools/base_tools/simulation_tools/create_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from mdagent.utils import FileType, PathRegistry


class ModifyScriptUtils:
class ModifySimulationScriptUtils:
llm: Optional[BaseLanguageModel]

def __init__(self, llm):
Expand Down Expand Up @@ -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. "
Expand Down Expand Up @@ -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=(
Expand All @@ -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]

Expand All @@ -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 (
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions mdagent/tools/subagent_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b2d7f1

Please sign in to comment.