Files
Swifty aaf40c88d6 Adding multi-step interview process (#262)
* Adding multi-step interview process

* added module interview phase

* Fix conditional statement in user.j2 template

* Update assistant prompt to use "architect" instead of "develop" in user.j2 template

* Update phase_completed condition in system.j2 template

* Update module response message in agent.py

* Update module response message in agent.py

* Update error message formatting in AIBlock class
2024-05-03 10:04:06 +02:00

27 lines
727 B
Python

import prisma
from prisma.models import Interview, InterviewStep
async def delete_interview(interview_id: str) -> None:
await Interview.prisma().update(
where={"id": interview_id},
data={"deleted": True},
)
async def get_last_interview_step(interview_id: str, app_id: str) -> InterviewStep:
step = await InterviewStep.prisma().find_first_or_raise(
where=prisma.types.InterviewStepWhereInput(
interviewId=interview_id, applicationId=app_id
),
include=prisma.types.InterviewStepInclude(
Features=True,
Interview=True,
Modules=True,
),
order={
"createdAt": "desc",
},
)
return step