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
39ddb93b
authored
2023-02-03 15:25:01 +0800
by
RSA
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
WIP
1 parent
c3b6d1ea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
6 deletions
client/src/App.js
client/src/ChatBox.js
index.js
client/src/App.js
View file @
39ddb93
...
...
@@ -10,8 +10,6 @@ function App() {
useEffect
(()
=>
{
getEngines
();
},
[])
const
[
env
,
setEnv
]
=
useState
({});
console
.
log
(
env
.
SERVER_URL
)
const
[
chatInput
,
setChatInput
]
=
useState
(
""
);
const
[
models
,
setModels
]
=
useState
([]);
const
[
temperature
,
setTemperature
]
=
useState
(
0.7
);
...
...
@@ -30,7 +28,7 @@ function App() {
fetch
(
"http://localhost:3080/models"
)
.
then
(
res
=>
res
.
json
())
.
then
(
data
=>
{
console
.
log
(
data
.
models
.
data
)
//
console.log(data.models.data)
// set models in order alpahbetically
data
.
models
.
data
.
sort
((
a
,
b
)
=>
{
if
(
a
.
id
<
b
.
id
)
{
return
-
1
;
}
...
...
client/src/ChatBox.js
View file @
39ddb93
import
OpenAISVGLogo
from
'./OpenAISVGLogo'
// Primary Chat Window
const
ChatBox
=
({
chatLog
,
setChatInput
,
handleSubmit
,
chatInput
})
=>
<
section
className
=
"chatbox"
>
...
...
index.js
View file @
39ddb93
...
...
@@ -20,7 +20,7 @@ app.use(cors())
app
.
use
(
require
(
'morgan'
)(
'dev'
))
app
.
get
(
'/
env
'
,
(
req
,
res
)
=>
{
app
.
get
(
'/'
,
(
req
,
res
)
=>
{
res
.
send
({
SERVER_URL
:
process
.
env
.
SERVER_URL
,
});
...
...
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