Skip to content

Commit

Permalink
All files updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Jignesh6775 committed Jul 28, 2023
1 parent a40be9a commit ecb5a7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
3 changes: 2 additions & 1 deletion Backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.env
package-lock.json
package-lock.json
other.js
20 changes: 5 additions & 15 deletions Backend/Routes/chat.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,13 @@ chatRoute.post("/generalChat", async (req, res) => {
//=> Route for Interview chat bot
chatRoute.post("/interviewChat", async (req, res) => {
const message = req.body.msg
const response = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: [{ role: "system", content: `Act as a senior developer, you will be taking interview of tech students.
Follow this rules:
1. Ask only conceptual questions from given tech stacks list [ React, Nodejs, Java] to the user.
2. First ask user to choose one of the tech stack from given list and then ask question related to that stack.
3. Don't ask question about experience, only ask about concepts.
4. You need to ask one question one by one.
5. Don't ask any question which is already asked.
6. Don't give list of questions to user.
` },
{ role: "user", content: `${message}` }],
const response = await openai.createCompletion({
model: "text-davinci-003",
prompt: `${message}.`,
max_tokens: 100,
temperature:0,
temperature: 0,
})
res.send(response.data.choices[0].message.content)
res.send(response.data.choices[0].text)
})


Expand Down

0 comments on commit ecb5a7f

Please sign in to comment.