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
73fc70fe
authored
2023-02-02 19:36:03 +0800
by
RSA
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixes
1 parent
94162ec9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
.env
client/.gitignore
client/src/App.js
env-template
.env
View file @
73fc70f
API_KEY="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"
API_ORG="org-2OIAoj4fSwE4RCzgvglUM55T"
LOCALHOST="http://localhost:3080/"
\ No newline at end of file
SERVER_URL="http://localhost:3080/"
\ No newline at end of file
...
...
client/.gitignore
View file @
73fc70f
...
...
@@ -13,6 +13,7 @@
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
...
...
client/src/App.js
View file @
73fc70f
...
...
@@ -26,7 +26,7 @@ function App() {
}
function
getEngines
(){
fetch
(
process
.
env
.
LOCALHOST
+
"/models"
)
fetch
(
process
.
env
.
SERVER_URL
+
"/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
(
process
.
env
.
LOCALHOST
,
{
const
response
=
await
fetch
(
process
.
env
.
SERVER_URL
,
{
method
:
"POST"
,
headers
:
{
"Content-Type"
:
"application/json"
...
...
env-template
0 → 100644
View file @
73fc70f
API_KEY= use specific API KEY;
API_ORG= use specific ORG KEY;
SERVER_URL= use specific Server URL;
\ No newline at end of file
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