@agent(name="qa")
class QaAgent:
def __init__(self):
pass
@operation
def completion(self, prompt: str):
res = openai_client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{
"role": "system",
"content": "You are a qa engineer and only output python code, no markdown tags.",
},
{"role": "user", "content": prompt},
],
temperature=0.5,
)
return res.choices[0].message.content
@agent(name="engineer")
class EngineerAgent:
def __init__(self):
pass
@operation
def completion(self, prompt: str):
res = openai_client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{
"role": "system",
"content": "You are a software engineer and only output python code, no markdown tags.",
},
{"role": "user", "content": prompt},
],
temperature=0.5,
)
return res.choices[0].message.content