fix conflict
Showing
3 changed files
with
3 additions
and
6 deletions
| 1 | OPENAI_API_ORG="org-YgE1xiPAzhVmwwrtZnXIRyiF" | 1 | OPENAI_API_ORG="org-YgE1xiPAzhVmwwrtZnXIRyiF" |
| 2 | OPENAI_API_KEY="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" | 2 | OPENAI_API_KEY="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" |
| 3 | SERVER_URL="http://localhost:3080" | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 3 | SERVER_URL="http://localhost:3080/" | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -27,9 +27,7 @@ function App() { | ... | @@ -27,9 +27,7 @@ function App() { |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | function getEngines(){ | 29 | function getEngines(){ |
| 30 | 30 | fetch("http://localhost:3080/models") | |
| 31 | |||
| 32 | fetch(env.SERVER_URL + "models") | ||
| 33 | .then(res => res.json()) | 31 | .then(res => res.json()) |
| 34 | .then(data => { | 32 | .then(data => { |
| 35 | console.log(data.models.data) | 33 | console.log(data.models.data) |
| ... | @@ -51,7 +49,7 @@ function App() { | ... | @@ -51,7 +49,7 @@ function App() { |
| 51 | // fetch response to the api combining the chat log array of messages and seinding it as a message to localhost:3000 as a post | 49 | // fetch response to the api combining the chat log array of messages and seinding it as a message to localhost:3000 as a post |
| 52 | const messages = chatLogNew.map((message) => message.message).join("\n") | 50 | const messages = chatLogNew.map((message) => message.message).join("\n") |
| 53 | 51 | ||
| 54 | const response = await fetch(process.env.SERVER_URL, { | 52 | const response = await fetch("http://localhost:3080/api", { |
| 55 | method: "POST", | 53 | method: "POST", |
| 56 | headers: { | 54 | headers: { |
| 57 | "Content-Type": "application/json" | 55 | "Content-Type": "application/json" | ... | ... |
| ... | @@ -5,7 +5,6 @@ const cors = require('cors') | ... | @@ -5,7 +5,6 @@ const cors = require('cors') |
| 5 | require('dotenv').config() | 5 | require('dotenv').config() |
| 6 | 6 | ||
| 7 | // Open AI Configuration | 7 | // Open AI Configuration |
| 8 | |||
| 9 | const configuration = new Configuration({ | 8 | const configuration = new Configuration({ |
| 10 | organization: process.env.OPENAI_API_ORG, | 9 | organization: process.env.OPENAI_API_ORG, |
| 11 | apiKey: process.env.OPENAI_API_KEY, | 10 | apiKey: process.env.OPENAI_API_KEY, | ... | ... |
-
Please register or sign in to post a comment