This commit is contained in:
DirkSchlossmacher 2023-11-23 14:54:45 +01:00
parent 9f68da3afc
commit d0a8be1f26

View File

@ -29,10 +29,11 @@ import { incrementAPICallCount } from '../../utils/cloud/redisRestClient';
// app\client\platforms\openai.ts // app\client\platforms\openai.ts
// app\auth.ts // app\auth.ts
/*
export async function getMyServerSession() { export async function getMyServerSession() {
return await getServerAuthSession(); return await getServerAuthSession();
} }
*/
export interface OpenAIListModelResponse { export interface OpenAIListModelResponse {
@ -116,7 +117,7 @@ export class ChatGPTApi implements LLMApi {
const modelIdentifier = modelConfig.model; const modelIdentifier = modelConfig.model;
console.log("API Call: session or email is not available - model: ", modelIdentifier); console.log("API Call: session or email is not available - model: ", modelIdentifier);
const session = await getMyServerSession(); // const session = await getMyServerSession();
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