2
0

(setVariable) Add Transcription system var (#1507)

Closes #1484
This commit is contained in:
Baptiste Arnaud
2024-05-15 14:24:55 +02:00
committed by GitHub
parent ec7ff8d9ca
commit 40f21203b5
102 changed files with 2911 additions and 986 deletions

View File

@@ -12,11 +12,26 @@ export const createSession = ({
id,
state,
isReplying,
}: Props): Prisma.PrismaPromise<any> =>
prisma.chatSession.create({
data: {
}: Props): Prisma.PrismaPromise<any> => {
if (!id) {
return prisma.chatSession.create({
data: {
id,
state,
isReplying,
},
})
}
return prisma.chatSession.upsert({
where: { id },
update: {
state,
isReplying,
},
create: {
id,
state,
isReplying,
},
})
}