Mishig commited on
Commit
01418cd
1 Parent(s): 50e0ab9

[Small model] Explicitly close AsyncGenerator (#704)

Browse files
src/lib/server/generateFromDefaultEndpoint.ts CHANGED
@@ -21,6 +21,7 @@ export async function generateFromDefaultEndpoint({
21
  generated_text = generated_text.slice(0, -stop.length).trimEnd();
22
  }
23
  }
 
24
  return generated_text;
25
  }
26
  }
 
21
  generated_text = generated_text.slice(0, -stop.length).trimEnd();
22
  }
23
  }
24
+ tokenStream.return();
25
  return generated_text;
26
  }
27
  }