mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-20 15:14:20 +01:00
🤏 refactor: simplify name
This commit is contained in:
@@ -171,7 +171,7 @@ class _GPTConversation:
|
|||||||
return SystemMessage(content=system_message)
|
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)
|
template_parameters = get_template_parameters(prompt_template)
|
||||||
if set(template_parameters) != set(kwargs.keys()):
|
if set(template_parameters) != set(kwargs.keys()):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|||||||
@@ -531,8 +531,8 @@ pytest
|
|||||||
packages_list = self.remove_duplicates_from_packages_list(packages_list)
|
packages_list = self.remove_duplicates_from_packages_list(packages_list)
|
||||||
packages_list = packages_list[:NUM_IMPLEMENTATION_STRATEGIES]
|
packages_list = packages_list[:NUM_IMPLEMENTATION_STRATEGIES]
|
||||||
return packages_list
|
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):
|
def generate(self):
|
||||||
os.makedirs(self.microservice_root_path)
|
os.makedirs(self.microservice_root_path)
|
||||||
self.microservice_specification.task, self.microservice_specification.test = PM().refine_specification(self.microservice_specification.task)
|
self.microservice_specification.task, self.microservice_specification.test = PM().refine_specification(self.microservice_specification.task)
|
||||||
|
|||||||
@@ -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'''
|
plain_response_format_prompt = '''The response must be raw text and not fenced by markdown or html'''
|
||||||
|
|
||||||
template_generate_microservice_name = PromptTemplate.from_template(
|
template_generate_microservice_name = f'''\
|
||||||
f'''Generate a name for the executor matching the description:
|
Generate a name for the executor matching the description:
|
||||||
"{{description}}"
|
"{{description}}"
|
||||||
The executor name must fulfill the following criteria:
|
The executor name must fulfill the following criteria:
|
||||||
- camel case
|
- camel case
|
||||||
@@ -46,7 +46,6 @@ Negative example:
|
|||||||
PngToSvgExecutor
|
PngToSvgExecutor
|
||||||
```
|
```
|
||||||
'''
|
'''
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# todo split into multiple calls. One for brainstorming - one for the final answer
|
# todo split into multiple calls. One for brainstorming - one for the final answer
|
||||||
|
|||||||
Reference in New Issue
Block a user