Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c3b6d1ea
authored
2023-02-03 14:56:41 +0800
by
RSA
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
fix conflict
2 parents
a6efb66c
57432129
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
.env
client/src/App.js
index.js
.env
View file @
c3b6d1e
OPENAI_API_ORG="org-YgE1xiPAzhVmwwrtZnXIRyiF"
OPENAI_API_KEY="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"
SERVER_URL="http://localhost:3080"
\ No newline at end of file
SERVER_URL="http://localhost:3080/"
\ No newline at end of file
...
...
client/src/App.js
View file @
c3b6d1e
...
...
@@ -27,9 +27,7 @@ function App() {
}
function
getEngines
(){
fetch
(
env
.
SERVER_URL
+
"models"
)
fetch
(
"http://localhost:3080/models"
)
.
then
(
res
=>
res
.
json
())
.
then
(
data
=>
{
console
.
log
(
data
.
models
.
data
)
...
...
@@ -51,7 +49,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
(
"http://localhost:3080/api"
,
{
method
:
"POST"
,
headers
:
{
"Content-Type"
:
"application/json"
...
...
index.js
View file @
c3b6d1e
...
...
@@ -5,7 +5,6 @@ const cors = require('cors')
require
(
'dotenv'
).
config
()
// Open AI Configuration
const
configuration
=
new
Configuration
({
organization
:
process
.
env
.
OPENAI_API_ORG
,
apiKey
:
process
.
env
.
OPENAI_API_KEY
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment