Skip to content
Snippets Groups Projects

open ai models replaced and moved configs to envs

Merged Siva Mirrapalli requested to merge sm-replacement-of-models into dev
15 files
+ 193
56
Compare changes
  • Side-by-side
  • Inline
Files
15
import { getProfileRating } from "@/lib/utils/prompts";
import { NextRequest, NextResponse } from "next/server";
import { getGeminiResponse } from "@/lib/utils/gemini";
import { textResponseExtractor } from "@/lib/utils/helpers/text-response-extractor";
import { connect } from "@/lib/utils/mongo-connection";
import { validateToken } from "@/lib/utils/jwt";
import { InterviewModel } from "@/schemas/interviews";
import { Roles } from "@/lib/enums/Roles";
import { User } from "@/lib/types/User";
import { getAIResponse } from "@/lib/utils/ai";
interface RequestBody {
interviewId: string;
@@ -41,7 +41,7 @@ export async function POST(req: NextRequest) {
}
const completePrompt = getProfileRating(reqBody.transcription);
const extractedText = await getGeminiResponse(completePrompt, "");
const extractedText = await getAIResponse(completePrompt, "");
console.log("Extracted data of the rating:", extractedText);
const cleanedString = textResponseExtractor(extractedText);
console.log("Cleaned Text from PDF:", cleanedString);
Loading