Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: remove executor_name #87

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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