userEmail

This commit is contained in:
DirkSchlossmacher 2023-11-23 13:45:12 +01:00
parent fda1afdebd
commit 4b66ba8821

View File

@ -115,7 +115,7 @@ export class ChatGPTApi implements LLMApi {
const userEmail = session.user.email; const userEmail = session.user.email;
const modelIdentifier = modelConfig.model; const modelIdentifier = modelConfig.model;
const dateKey = new Date().toISOString().slice(0, 7); // "YYYY-MM" const dateKey = new Date().toISOString().slice(0, 7); // "YYYY-MM"
console.log("API Call: ",token.email, modelIdentifier); console.log("API Call: ", userEmail, modelIdentifier);
// Use the userEmail to increment the API call count // Use the userEmail to increment the API call count
await incrementAPICallCount(userEmail, modelIdentifier, dateKey); await incrementAPICallCount(userEmail, modelIdentifier, dateKey);