Skip to content

Commit

Permalink
Update server.js with ES6 imports and fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
milliorn committed Dec 31, 2023
1 parent fc09493 commit 3764310
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const cors = require("cors");
const dotenv = require("dotenv");
const express = require("express");
import cors from 'cors';
import dotenv from 'dotenv';
import express from 'express';

// Load environment variables
dotenv.config();
Expand All @@ -26,7 +26,7 @@ app.post("/completions", async (req, res) => {
},
body: JSON.stringify({
model: "gpt-3.5-turbo",
messages: [{ role: "user", content: req.body.message }], // Sample input message
messages: [ { role: "user", content: req.body.message } ], // Sample input message
max_tokens: 100,
}),
};
Expand Down

0 comments on commit 3764310

Please sign in to comment.