gpt-3.5-turbo-16k

This commit is contained in:
Kar
2024-11-15 12:02:00 +05:30
parent 02ec79b262
commit 7fcc27ada1
4 changed files with 61 additions and 69 deletions

View File

@@ -11,7 +11,7 @@ const aiFollowupQuestion = async (req, res) => {
const database = client.db(dbName); // Replace with your database name
const conversationsCollection = database.collection('conversations'); // Replace with your collection name
async function fetchOpenAICompletion(prompt, messages, model = "gpt-4o-mini", max_tokens = 200) {
async function fetchOpenAICompletion(prompt, messages, model = "gpt-3.5-turbo-16k", max_tokens = 200) {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
@@ -31,7 +31,7 @@ const aiFollowupQuestion = async (req, res) => {
try {
const { prompt, sessionId, model = "gpt-4o-mini", max_tokens = 200 } = req.body;
const { prompt, sessionId, model = "gpt-3.5-turbo-16k", max_tokens = 200 } = req.body;
if (!conversationsCollection) {
return res.status(500).json({
success: false,