mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-10 03:56:37 +08:00
const modelIdentifier = modelConfig.model;
This commit is contained in:
parent
04ed030276
commit
edaa25d1d5
@ -109,11 +109,12 @@ export class ChatGPTApi implements LLMApi {
|
|||||||
// export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
// export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
// Retrieve the session using getServerAuthSession
|
// Retrieve the session using getServerAuthSession
|
||||||
const session = await getServerSession();
|
const session = await getServerSession();
|
||||||
|
const modelIdentifier = modelConfig.model;
|
||||||
|
|
||||||
if (session?.user?.email) {
|
if (session?.user?.email) {
|
||||||
// Now you have the user's email from the session
|
// Now you have the user's email from the session
|
||||||
const userEmail = session.user.email;
|
const userEmail = session.user.email;
|
||||||
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: ", userEmail, modelIdentifier);
|
console.log("API Call: ", userEmail, modelIdentifier);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user