mirror of
https://github.com/vitalityAI/therapist.git
synced 2025-04-08 05:40:17 -04:00
no caller phone unique
This commit is contained in:
parent
6fb6ebcb3a
commit
ebd90d7fe0
|
@ -18,7 +18,7 @@ model Session {
|
||||||
endedAt DateTime?
|
endedAt DateTime?
|
||||||
|
|
||||||
callId String @unique
|
callId String @unique
|
||||||
callerPhone String @unique
|
callerPhone String
|
||||||
|
|
||||||
operatorPhone String? @unique
|
operatorPhone String? @unique
|
||||||
operator Operator? @relation(fields: [operatorPhone], references: [phoneNumber])
|
operator Operator? @relation(fields: [operatorPhone], references: [phoneNumber])
|
||||||
|
|
|
@ -38,6 +38,8 @@ export const chat = async (callId) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(messages)
|
||||||
|
|
||||||
const res = await openai.createChatCompletion({
|
const res = await openai.createChatCompletion({
|
||||||
model: "gpt-3.5-turbo",
|
model: "gpt-3.5-turbo",
|
||||||
messages: messages,
|
messages: messages,
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
import { Role } from "@prisma/client"
|
||||||
import { chat } from "./chat.js"
|
import { chat } from "./chat.js"
|
||||||
import { createSession } from "./session.js"
|
import { addMessage, createSession } from "./session.js"
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
// const session = await createSession("testid", "12345")
|
const session = await createSession("testid", "12345")
|
||||||
|
await addMessage("testid", Role.USER, "Hey. I'm feeling ")
|
||||||
console.log(await chat("testid"))
|
console.log(await chat("testid"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user