mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-01-01 17:09:59 +01:00
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
from utils.llm import parse_llm_output
|
|
|
|
def process_user_stories(stories):
|
|
return stories
|
|
|
|
def process_user_tasks(tasks):
|
|
return tasks
|
|
|
|
def return_array_from_prompt(name_plural, name_singular, return_var_name):
|
|
return {
|
|
'name': f'process_{name_plural.replace(" ", "_")}',
|
|
'description': f"Print the list of {name_plural} that are created.",
|
|
'parameters': {
|
|
'type': 'object',
|
|
"properties": {
|
|
f"{return_var_name}": {
|
|
"type": "array",
|
|
"description": f"List of {name_plural} that are created in a list.",
|
|
"items": {
|
|
"type": "string",
|
|
"description": f"{name_singular}"
|
|
},
|
|
},
|
|
},
|
|
"required": [return_var_name],
|
|
},
|
|
}
|
|
|
|
USER_STORIES = {
|
|
'definitions': [
|
|
return_array_from_prompt('user stories', 'user story', 'stories')
|
|
],
|
|
'functions': {
|
|
'process_user_stories': process_user_stories
|
|
},
|
|
} |