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
80f3ea39
authored
2024-09-05 16:54:50 +0800
by
Jonille Arreglo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
31466_limited_usage_chatbot+
1 parent
56678dc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
client/package.json
client/src/App.js
index.js
client/package.json
View file @
80f3ea3
...
...
@@ -9,13 +9,15 @@
"react"
:
"^18.2.0"
,
"react-dom"
:
"^18.2.0"
,
"react-scripts"
:
"5.0.1"
,
"serve"
:
"^14.2.1"
,
"web-vitals"
:
"^2.1.4"
},
"scripts"
:
{
"start"
:
"react-scripts start"
,
"build"
:
"react-scripts build"
,
"test"
:
"react-scripts test"
,
"eject"
:
"react-scripts eject"
"eject"
:
"react-scripts eject"
,
"serve"
:
"serve -s build"
},
"eslintConfig"
:
{
"extends"
:
[
...
...
client/src/App.js
View file @
80f3ea3
...
...
@@ -131,14 +131,18 @@ function App() {
if
(
data
.
status
===
'invalid'
){
if
(
data
.
limited
)
{
window
.
btutil_m
axUsage
(
);
window
.
btutil_m
odalRegisterUpgrade
(
false
);
return
;
}
if
(
data
&&
data
.
status
===
'max-tokens'
)
{
window
.
btutil_maxUsage
();
if
(
data
.
ent_member
===
'yes'
)
{
window
.
btutil_modalMaxTokenUpgradeEntMembers
();
return
;
}
window
.
btutil_modalMaxTokenUpgrade
();
return
;
}
window
.
btutil_m
axUsage
(
tru
e
);
window
.
btutil_m
odalRegisterUpgrade
(
fals
e
);
return
;
}
// "gpt-3.5-turbo"
...
...
index.js
View file @
80f3ea3
...
...
@@ -74,7 +74,7 @@ app.use(cookieParser());
const
max_tokens
=
process
.
env
.
MAX_TOKENS_chatbot_plus
?
parseInt
(
process
.
env
.
MAX_TOKENS_chatbot_plus
)
:
512
;
// Routing
const
hostapi
=
process
.
env
.
REACT_APP_HOST_API
||
"https://api.ai-pro.org"
;
const
hostapi
=
process
.
env
.
API_URL
||
"https://api.ai-pro.org"
;
const
user_secret_id
=
process
.
env
.
USER_SECRET_ID
||
"aiwp_logged_in"
;
const
aiwp_app_id
=
"chatbot+"
;
// Primary Open AI Route
...
...
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