Skip to content

Commit

Permalink
Fix in browser package
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Sep 24, 2024
1 parent 9331fd8 commit eb8446b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@locallm/browser",
"version": "0.0.15",
"version": "0.0.16",
"description": "Run language models in the browser",
"repository": "https://github.com/synw/locallm",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/wllama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class WllamaProvider implements LmProvider {
if ("extra" in params) {
samplingOptions = { ...samplingOptions, ...params.extra }
}
options.sampling = samplingOptions;
let i = 1;
const decoder = new TextDecoder('utf-8');
options.onNewToken = (token, piece, currentText, { abortSignal }) => {
Expand All @@ -196,7 +197,7 @@ class WllamaProvider implements LmProvider {
};
const stats = useStats();
stats.start();
console.log(_prompt);
//console.log(_prompt);
const txt = await this.wllama.createCompletion(_prompt, options);
const finalStats = stats.inferenceEnds(i);
let data: Record<string, any> = {};
Expand Down

0 comments on commit eb8446b

Please sign in to comment.