Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/api/chat/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createParser, ParsedEvent, ReconnectInterval } from 'eventsource-parser'
import { NextRequest, NextResponse } from 'next/server'

export const runtime = 'edge';
export const runtime = 'edge'

export interface Message {
role: string
Expand Down Expand Up @@ -83,7 +83,7 @@ const getOpenAIStream = async (
body: JSON.stringify({
model: model,
frequency_penalty: 0,
max_tokens: 2000,
max_tokens: 4000,
messages: messages,
presence_penalty: 0,
stream: true,
Expand Down
1 change: 1 addition & 0 deletions components/Chat/useChatHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const useChatHook = () => {
const index = chatList.findIndex((item) => item.id === chat.id)
chatList.splice(index, 1)
setChatList([...chatList])
localStorage.removeItem(`ms_${chat.id}`)
if (currentChatRef.current?.id === chat.id) {
currentChatRef.current = chatList[0]
}
Expand Down
Loading