d565d275 by Jonille Arreglo

28594_usage_tracking

1 parent 1d354b8b
Showing 1 changed file with 1 additions and 4 deletions
...@@ -129,10 +129,7 @@ app.post('/api', async (req, res) => { ...@@ -129,10 +129,7 @@ app.post('/api', async (req, res) => {
129 usage.total_tokens = usage.prompt_tokens + usage.completion_tokens; 129 usage.total_tokens = usage.prompt_tokens + usage.completion_tokens;
130 130
131 // TOKEN USAGE 131 // TOKEN USAGE
132 axios.post(`${process.env.API_URL}e/set-chat-usage`, 132 btutil_setChatUsage('chatgpt', usage.prompt_tokens, usage.total_tokens);
133 { aiwp_logged_in: req.cookies[user_secret_id], app: 'chatbot', prompt_token: usage.prompt_tokens, total_token: usage.total_tokens },
134 { headers: { 'content-type': 'application/x-www-form-urlencoded' }
135 });
136 } catch (e) { 133 } catch (e) {
137 console.log('Error encoding prompt text', e); 134 console.log('Error encoding prompt text', e);
138 } 135 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!