fixes
Showing
4 changed files
with
7 additions
and
3 deletions
| 1 | API_KEY="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" | 1 | API_KEY="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" |
| 2 | API_ORG="org-2OIAoj4fSwE4RCzgvglUM55T" | 2 | API_ORG="org-2OIAoj4fSwE4RCzgvglUM55T" |
| 3 | LOCALHOST="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 | ... | ... |
| ... | @@ -26,7 +26,7 @@ function App() { | ... | @@ -26,7 +26,7 @@ function App() { |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | function getEngines(){ | 28 | function getEngines(){ |
| 29 | fetch(process.env.LOCALHOST + "/models") | 29 | fetch(process.env.SERVER_URL + "/models") |
| 30 | .then(res => res.json()) | 30 | .then(res => res.json()) |
| 31 | .then(data => { | 31 | .then(data => { |
| 32 | console.log(data.models.data) | 32 | console.log(data.models.data) |
| ... | @@ -48,7 +48,7 @@ function App() { | ... | @@ -48,7 +48,7 @@ function App() { |
| 48 | // fetch response to the api combining the chat log array of messages and seinding it as a message to localhost:3000 as a post | 48 | // 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 | const messages = chatLogNew.map((message) => message.message).join("\n") | 49 | const messages = chatLogNew.map((message) => message.message).join("\n") |
| 50 | 50 | ||
| 51 | const response = await fetch(process.env.LOCALHOST, { | 51 | const response = await fetch(process.env.SERVER_URL, { |
| 52 | method: "POST", | 52 | method: "POST", |
| 53 | headers: { | 53 | headers: { |
| 54 | "Content-Type": "application/json" | 54 | "Content-Type": "application/json" | ... | ... |
env-template
0 → 100644
-
Please register or sign in to post a comment