Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Nov 14, 2023
1 parent 4f341c1 commit 9b2f5a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/app/api/chatmodel/[chatid]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {
generateTitle,
openAIChatModel,
OPEN_AI_MODELS,
// generateChatImage,
generateChatImage,
} from "@/utils/apiHelper";
import { NextResponse } from "next/server";
export const revalidate = 0; // disable cache

export const maxDuration = 60;
export const maxDuration = 60;

export async function POST(
request: Request,
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);
console.log("chat title", title)
// console.log("image__url", imageUrl)
const imageUrl = await generateChatImage(title, id as string);
console.log("chat title", title);
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
2 changes: 1 addition & 1 deletion src/app/api/tts/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { env } from "@/app/env.mjs";
import { NextResponse } from "next/server";
import OpenAI from "openai";
import * as z from "zod";
export const maxDuration = 60;
export const maxDuration = 60;

const bodyobj = z.object({
text: z.string().min(1),
Expand Down

0 comments on commit 9b2f5a3

Please sign in to comment.