7fac747e by Janis

Merge branch 'fix_master_updated_ui' into '1DEVT'

fix_master_updated_ui

See merge request !6
2 parents e6687917 57432129
......@@ -26,7 +26,7 @@ function App() {
}
function getEngines(){
fetch(process.env.SERVER_URL + "/models")
fetch(process.env.SERVER_URL + "models")
.then(res => res.json())
.then(data => {
console.log(data.models.data)
......@@ -48,7 +48,7 @@ function App() {
// fetch response to the api combining the chat log array of messages and seinding it as a message to localhost:3000 as a post
const messages = chatLogNew.map((message) => message.message).join("\n")
const response = await fetch(process.env.SERVER_URL, {
const response = await fetch(process.env.SERVER_URL + "api", {
method: "POST",
headers: {
"Content-Type": "application/json"
......
......@@ -2,8 +2,10 @@ const { Configuration, OpenAIApi } = require("openai");
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
require('dotenv').config()
// Open AI Configuration
console.log(process.env.OPENAI_API_ORG)
const configuration = new Configuration({
organization: process.env.OPENAI_API_ORG,
apiKey: process.env.OPENAI_API_KEY,
......
......@@ -142,6 +142,11 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
},
"dotenv": {
"version": "16.0.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......
......@@ -11,6 +11,7 @@
"dependencies": {
"body-parser": "^1.20.1",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"morgan": "^1.10.0",
"openai": "^3.1.0"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!