Skip to content

Commit

Permalink
bugfix: remove executor_name (microsoft#87)
Browse files Browse the repository at this point in the history
remove executor_name parameter as it is useless now.
  • Loading branch information
liqul authored Dec 21, 2023
1 parent f62ff6c commit f2e922c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions taskweaver/code_interpreter/code_generator/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class CodeGeneratorConfig(ModuleConfig):
def _configure(self) -> None:
self._set_name("code_generator")
self.role_name = self._get_str("role_name", "ProgramApe")
self.executor_name = self._get_str("executor_name", "CodeExecutor")
self.load_plugin = self._get_bool("load_plugin", True)
self.load_example = self._get_bool("load_example", True)
self.prompt_file_path = self._get_path(
Expand Down Expand Up @@ -67,7 +66,6 @@ def __init__(
self.llm_api = llm_api

self.role_name = self.config.role_name
self.executor_name = self.config.executor_name

self.post_translator = PostTranslator(logger)
self.prompt_data = read_yaml(self.config.prompt_file_path)
Expand All @@ -86,7 +84,6 @@ def __init__(

self.instruction = self.instruction_template.format(
ROLE_NAME=self.role_name,
EXECUTOR_NAME=self.executor_name,
)

self.round_compressor: RoundCompressor = round_compressor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ content: |-
- {ROLE_NAME} generates the reply to the user with 'type' that must be one of the following:
- "thought": the thoughts on the intermediate steps
- "sample": textual descriptions including the sample code
- "python": the code that can be executed by {EXECUTOR_NAME}; comments must be added calling functions from the pre-defined plugins, including the description of the function and the parameters.
- "python": the code that can be executed by the User; comments must be added calling functions from the pre-defined plugins, including the description of the function and the parameters.
- "text": the direct response in text without code
- The "response" array can include multiple thought replies, but it can have only one of sample, python, or text, exclusively.
- The value of "content" is a string that contains the actual content and {ROLE_NAME} must be very careful about escaping the special characters (e.g., '\', '/', and '"') in the string for JSON format.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/data/prompts/generator_prompt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ content: |-
- {ROLE_NAME} generates the reply to the user with 'type' that must be one of the following:
- "thought": the thoughts on the intermediate steps
- "sample": textual descriptions including the sample code
- "python": the code that can be executed by {EXECUTOR_NAME}; comments must be added calling functions from the pre-defined plugins, including the description of the function and the parameters.
- "python": the code that can be executed by the User; comments must be added calling functions from the pre-defined plugins, including the description of the function and the parameters.
- "text": the direct response in text without code
- The "response" array can include multiple thought replies, but it can have only one of sample, python, or text, exclusively.
- The value of "content" is a string that contains the actual content and {ROLE_NAME} must be very careful about escaping the special characters (e.g., '\', '/', and '"') in the string for JSON format.
Expand Down

0 comments on commit f2e922c

Please sign in to comment.