File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { generateUUID, getMostRecentUserMessage } from '@/lib/utils';
1212
1313import { getOrCreateConversation } from '../../service' ;
1414
15- export const maxDuration = 60 ;
15+ export const maxDuration = 300 ;
1616
1717export async function POST ( request : Request ) {
1818 const { id, messages } : { id : string ; messages : Array < Message > } =
@@ -62,13 +62,29 @@ export async function POST(request: Request) {
6262 projectId : session . projectId ,
6363 } ,
6464 } ,
65+ onChunk : ( chunk ) => {
66+ console . warn ( '%%%%%%%%' , chunk ) ;
67+ } ,
68+ onError : ( error ) => {
69+ console . warn ( '$$$$$$' , JSON . stringify ( error ) , typeof error ) ;
70+ } ,
71+ onStepFinish : ( step ) => {
72+ console . warn ( '^^^^^^^^' , step ) ;
73+ } ,
74+ onFinish : ( finish ) => {
75+ console . warn ( '********' , finish ) ;
76+ } ,
77+ // headers: {
78+ // 'Content-Encoding': 'none'
79+ // }
6580 } ) ;
6681
6782 result . consumeStream ( ) ;
6883
6984 result . mergeIntoDataStream ( dataStream ) ;
7085 } ,
71- onError : ( ) => {
86+ onError : ( error ) => {
87+ console . warn ( '@@@@@@@@' , error ) ;
7288 return 'Oops, an error occured!' ;
7389 } ,
7490 } ) ;
You can’t perform that action at this time.
0 commit comments