mirror of
https://github.com/SkalaraAI/management-llm.git
synced 2025-04-17 19:00:16 -04:00
Update app.py
This commit is contained in:
parent
44a5802caa
commit
d8a3d7050d
|
@ -19,10 +19,24 @@ def index():
|
||||||
|
|
||||||
result = request.args.get("result")
|
result = request.args.get("result")
|
||||||
return render_template("index.html", result=result)
|
return render_template("index.html", result=result)
|
||||||
|
|
||||||
|
|
||||||
def generate_prompt(task_form):
|
|
||||||
base_text = "You are a software manager at the company Alphabet. Q: Format a message that specifically delegates the parts of the following task to your team of engineers."
|
|
||||||
|
|
||||||
|
def generate_prompt(task_form):
|
||||||
|
base_text = "You are a software engineer at a software development company. Your job is to assign tags to tasks based on the software/tools used. Please generate one-word tags representing software/tools/libraries commonly used by developers to build or complete the following task."
|
||||||
|
return base_text + "TASK: " + task_form
|
||||||
|
|
||||||
|
def generate_technical_tags(task_form):
|
||||||
|
prompt = generate_prompt(task_form)
|
||||||
|
|
||||||
|
response = openai.Completion.create(
|
||||||
|
model="text-davinci-003",
|
||||||
|
prompt=prompt,
|
||||||
|
temperature=0,
|
||||||
|
max_tokens=100,
|
||||||
|
stop=["TASK:"]
|
||||||
|
)
|
||||||
|
|
||||||
|
tags = response.choices[0].text.strip().split("\n")
|
||||||
|
return tags
|
||||||
|
|
||||||
|
|
||||||
return base_text + "TASK: " + task_form
|
return base_text + "TASK: " + task_form
|
||||||
|
|
Loading…
Reference in New Issue
Block a user