🤏 refactor: simplify name

This commit is contained in:
Florian Hönicke
2023-05-23 01:24:05 +02:00
parent 35264a8fcd
commit 553ccaf479
3 changed files with 5 additions and 6 deletions

View File

@@ -171,7 +171,7 @@ class _GPTConversation:
return SystemMessage(content=system_message)
def ask_gpt(prompt_template, parser=identity_parser, **kwargs):
def ask_gpt(prompt_template: str, parser=identity_parser, **kwargs):
template_parameters = get_template_parameters(prompt_template)
if set(template_parameters) != set(kwargs.keys()):
raise ValueError(

View File

@@ -531,8 +531,8 @@ pytest
packages_list = self.remove_duplicates_from_packages_list(packages_list)
packages_list = packages_list[:NUM_IMPLEMENTATION_STRATEGIES]
return packages_list
# '/private/var/folders/f5/whmffl4d7q79s29jpyb6719m0000gn/T/pytest-of-florianhonicke/pytest-128/test_generation_level_0_mock_i0'
# '/private/var/folders/f5/whmffl4d7q79s29jpyb6719m0000gn/T/pytest-of-florianhonicke/pytest-129/test_generation_level_0_mock_i0'
def generate(self):
os.makedirs(self.microservice_root_path)
self.microservice_specification.task, self.microservice_specification.test = PM().refine_specification(self.microservice_specification.task)

View File

@@ -30,8 +30,8 @@ The implemented function must follow a clean and elegant coding style.'''
plain_response_format_prompt = '''The response must be raw text and not fenced by markdown or html'''
template_generate_microservice_name = PromptTemplate.from_template(
f'''Generate a name for the executor matching the description:
template_generate_microservice_name = f'''\
Generate a name for the executor matching the description:
"{{description}}"
The executor name must fulfill the following criteria:
- camel case
@@ -46,7 +46,6 @@ Negative example:
PngToSvgExecutor
```
'''
)
# todo split into multiple calls. One for brainstorming - one for the final answer