94162ec9 by RSA

fix

1 parent e03bc109
API_KEY="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"
API_ORG="org-2OIAoj4fSwE4RCzgvglUM55T"
LOCALHOST="http://localhost:3080/"
\ No newline at end of file
......@@ -26,7 +26,7 @@ function App() {
}
function getEngines(){
fetch("http://localhost:3080/models")
fetch(process.env.LOCALHOST + "/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("http://localhost:3080/", {
const response = await fetch(process.env.LOCALHOST, {
method: "POST",
headers: {
"Content-Type": "application/json"
......
......@@ -5,8 +5,8 @@ const cors = require('cors')
// Open AI Configuration
const configuration = new Configuration({
organization: "org-organization",
apiKey: "sk-apiKey",
organization: process.env.API_ORG,
apiKey: process.env.API_KEY,
});
const openai = new OpenAIApi(configuration);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!