Skip to content

Commit

Permalink
removing image generation from chatmodel route
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Nov 14, 2023
1 parent d6a68e6 commit 4f341c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/api/chatmodel/[chatid]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
generateTitle,
openAIChatModel,
OPEN_AI_MODELS,
generateChatImage,
// generateChatImage,
} from "@/utils/apiHelper";
import { NextResponse } from "next/server";
export const revalidate = 0; // disable cache
Expand Down Expand Up @@ -74,9 +74,9 @@ export async function POST(
console.log("got in 1 length case");
_chat.push(latestReponse);
const title = await generateTitle(_chat as ChatEntry[]);
const imageUrl = await generateChatImage(title, id as string);
// const imageUrl = await generateChatImage(title, id as string);
console.log("chat title", title)
console.log("image__url", imageUrl)
// console.log("image__url", imageUrl)
// popping up because inserted the prompt for generating the title so removing the title prompt
_chat.pop();
console.log("generated title", title);
Expand All @@ -85,7 +85,7 @@ export async function POST(
.set({
messages: JSON.stringify({ log: _chat } as ChatLog),
title: title,
image_url: imageUrl,
// image_url: imageUrl,
})
.where(eq(chats.id, Number(id)))
.run();
Expand Down

0 comments on commit 4f341c1

Please sign in to comment.