31466_limited_usage_chatbot+
Showing
3 changed files
with
11 additions
and
5 deletions
| ... | @@ -9,13 +9,15 @@ | ... | @@ -9,13 +9,15 @@ |
| 9 | "react": "^18.2.0", | 9 | "react": "^18.2.0", |
| 10 | "react-dom": "^18.2.0", | 10 | "react-dom": "^18.2.0", |
| 11 | "react-scripts": "5.0.1", | 11 | "react-scripts": "5.0.1", |
| 12 | "serve": "^14.2.1", | ||
| 12 | "web-vitals": "^2.1.4" | 13 | "web-vitals": "^2.1.4" |
| 13 | }, | 14 | }, |
| 14 | "scripts": { | 15 | "scripts": { |
| 15 | "start": "react-scripts start", | 16 | "start": "react-scripts start", |
| 16 | "build": "react-scripts build", | 17 | "build": "react-scripts build", |
| 17 | "test": "react-scripts test", | 18 | "test": "react-scripts test", |
| 18 | "eject": "react-scripts eject" | 19 | "eject": "react-scripts eject", |
| 20 | "serve": "serve -s build" | ||
| 19 | }, | 21 | }, |
| 20 | "eslintConfig": { | 22 | "eslintConfig": { |
| 21 | "extends": [ | 23 | "extends": [ | ... | ... |
| ... | @@ -131,14 +131,18 @@ function App() { | ... | @@ -131,14 +131,18 @@ function App() { |
| 131 | 131 | ||
| 132 | if(data.status === 'invalid'){ | 132 | if(data.status === 'invalid'){ |
| 133 | if(data.limited) { | 133 | if(data.limited) { |
| 134 | window.btutil_maxUsage(); | 134 | window.btutil_modalRegisterUpgrade(false); |
| 135 | return; | 135 | return; |
| 136 | } | 136 | } |
| 137 | if(data && data.status === 'max-tokens') { | 137 | if(data && data.status === 'max-tokens') { |
| 138 | window.btutil_maxUsage(); | 138 | if(data.ent_member === 'yes') { |
| 139 | window.btutil_modalMaxTokenUpgradeEntMembers(); | ||
| 139 | return; | 140 | return; |
| 140 | } | 141 | } |
| 141 | window.btutil_maxUsage(true); | 142 | window.btutil_modalMaxTokenUpgrade(); |
| 143 | return; | ||
| 144 | } | ||
| 145 | window.btutil_modalRegisterUpgrade(false); | ||
| 142 | return; | 146 | return; |
| 143 | } | 147 | } |
| 144 | // "gpt-3.5-turbo" | 148 | // "gpt-3.5-turbo" | ... | ... |
| ... | @@ -74,7 +74,7 @@ app.use(cookieParser()); | ... | @@ -74,7 +74,7 @@ app.use(cookieParser()); |
| 74 | 74 | ||
| 75 | const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MAX_TOKENS_chatbot_plus) : 512; | 75 | const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MAX_TOKENS_chatbot_plus) : 512; |
| 76 | // Routing | 76 | // Routing |
| 77 | const hostapi = process.env.REACT_APP_HOST_API || "https://api.ai-pro.org"; | 77 | const hostapi = process.env.API_URL || "https://api.ai-pro.org"; |
| 78 | const user_secret_id = process.env.USER_SECRET_ID || "aiwp_logged_in"; | 78 | const user_secret_id = process.env.USER_SECRET_ID || "aiwp_logged_in"; |
| 79 | const aiwp_app_id = "chatbot+"; | 79 | const aiwp_app_id = "chatbot+"; |
| 80 | // Primary Open AI Route | 80 | // Primary Open AI Route | ... | ... |
-
Please register or sign in to post a comment