File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,9 @@ async function* createCompletionResponseStreaming(
144144 try {
145145 while ( true ) {
146146 const { done, value } = await reader . read ( )
147- if ( done ) break
147+ if ( done ) {
148+ break
149+ }
148150
149151 buffer += decoder . decode ( value , { stream : true } )
150152 const lines = buffer . split ( '\n' )
Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ export const getTimestamp = () => {
140140}
141141
142142export const fetchImageAsBase64 = async ( url : string ) : Promise < string > => {
143- const response = await fetch ( url ) ;
144- const arrayBuffer = await response . arrayBuffer ( ) ;
145- return btoa ( String . fromCharCode . apply ( null , new Uint8Array ( arrayBuffer ) ) ) ;
143+ const response = await fetch ( url )
144+ const arrayBuffer = await response . arrayBuffer ( )
145+ return btoa ( String . fromCharCode . apply ( null , new Uint8Array ( arrayBuffer ) ) )
146146}
147147
148148export const getMimeType = ( url : string ) : string => {
@@ -258,4 +258,4 @@ export const isObject = (variable: any): boolean => {
258258 return (
259259 variable && typeof variable === 'object' && variable . constructor === Object
260260 )
261- }
261+ }
You can’t perform that action at this time.
0 commit comments