File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
extensions/llamacpp-extension/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -875,7 +875,6 @@ export default class llamacpp_extension extends AIEngine {
875875 } )
876876
877877 // Store the session info for later use
878- console . log ( sInfo )
879878 this . activeSessions . set ( sInfo . pid , sInfo )
880879 await this . waitForModelLoad ( sInfo )
881880
@@ -970,17 +969,18 @@ export default class llamacpp_extension extends AIEngine {
970969 if ( ! trimmedLine || trimmedLine === 'data: [DONE]' ) {
971970 continue
972971 }
973- console . log ( trimmedLine )
974972
975973 if ( trimmedLine . startsWith ( 'data: ' ) ) {
976974 jsonStr = trimmedLine . slice ( 6 )
977975 } else if ( trimmedLine . startsWith ( 'error: ' ) ) {
978- jsonStr = trimmedLine . slice ( 7 )
979- const error = JSON . parse ( jsonStr )
980- throw new Error ( error . message )
976+ jsonStr = trimmedLine . slice ( 7 )
977+ const error = JSON . parse ( jsonStr )
978+ throw new Error ( error . message )
979+ } else {
980+ // it should not normally reach here
981+ throw new Error ( 'Malformed chunk' )
981982 }
982983 try {
983- console . log ( jsonStr )
984984 const data = JSON . parse ( jsonStr )
985985 const chunk = data as chatCompletionChunk
986986 yield chunk
You can’t perform that action at this time.
0 commit comments