Merge branch '29286_token_usage' into 'master'
29286_token_usage See merge request !93
Showing
4 changed files
with
19 additions
and
2 deletions
| ... | @@ -51,6 +51,14 @@ | ... | @@ -51,6 +51,14 @@ |
| 51 | To begin the development, run `npm start` or `yarn start`. | 51 | To begin the development, run `npm start` or `yarn start`. |
| 52 | To create a production bundle, use `npm run build` or `yarn build`. | 52 | To create a production bundle, use `npm run build` or `yarn build`. |
| 53 | --> | 53 | --> |
| 54 | <div id="modal-container" style="display: none"> | ||
| 55 | <div id="modal-content"> | ||
| 56 | <div id="modal-subtitle"></div> | ||
| 57 | <h2 id="modal-title"></h2> | ||
| 58 | <p id="modal-desc"></p> | ||
| 59 | <a id="modal-cta" href="#" target="_parent"></a> | ||
| 60 | </div> | ||
| 61 | </div> | ||
| 54 | </body> | 62 | </body> |
| 55 | <script> | 63 | <script> |
| 56 | window.onload = function() { | 64 | window.onload = function() { | ... | ... |
| ... | @@ -71,6 +71,14 @@ function App() { | ... | @@ -71,6 +71,14 @@ function App() { |
| 71 | TPLogicRun(); | 71 | TPLogicRun(); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | // eslint-disable-next-line | ||
| 75 | btutil_getChatUsage(); | ||
| 76 | // eslint-disable-next-line | ||
| 77 | let maxTokens = btutilCommon_getCookie("max-tokens"); | ||
| 78 | if (maxTokens==='1'){ | ||
| 79 | return; | ||
| 80 | } | ||
| 81 | |||
| 74 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who']; | 82 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who']; |
| 75 | const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi'); | 83 | const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi'); |
| 76 | const inputMatches = chatInput.match(userInputRegex); | 84 | const inputMatches = chatInput.match(userInputRegex); | ... | ... |
| 1 | import React, { useState } from "react"; | 1 | import React from "react"; |
| 2 | import SuggestedOptions from './suggestedOptions' | 2 | import SuggestedOptions from './suggestedOptions' |
| 3 | import ExportButton from "./ExportButton"; | 3 | import ExportButton from "./ExportButton"; |
| 4 | const ChatBox = ({chatLog, setChatInput, handleSubmit, chatInput, startedInteraction, setStartedInteraction}) => { | 4 | const ChatBox = ({chatLog, setChatInput, handleSubmit, chatInput, startedInteraction, setStartedInteraction}) => { | ... | ... |
| ... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
| 4 | "description": "", | 4 | "description": "", |
| 5 | "main": "index.js", | 5 | "main": "index.js", |
| 6 | "scripts": { | 6 | "scripts": { |
| 7 | "test": "echo \"Error: no test specified\" && exit 1" | 7 | "test": "echo \"Error: no test specified\" && exit 1", |
| 8 | "start": "node index.js" | ||
| 8 | }, | 9 | }, |
| 9 | "author": "", | 10 | "author": "", |
| 10 | "license": "ISC", | 11 | "license": "ISC", | ... | ... |
-
Please register or sign in to post a comment