Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rumbl/laserbeak

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rumbl/laserbeak - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

1

dist/index.d.ts
export { InferenceSession } from './inferenceSession';
export { AvailableModels } from "./models";
export { SessionManager } from "./sessionManager";
export { GenerationConfig } from "./session.worker";

5

dist/inferenceSession.d.ts

@@ -1,2 +0,2 @@

import { Session } from "./session.worker";
import { GenerationConfig, Session } from "./session.worker";
import * as Comlink from "comlink";

@@ -8,3 +8,4 @@ import { AvailableModels } from "./models";

initSession(model: AvailableModels): Promise<void>;
run(input: string, callback: (decoded: string) => void): Promise<void>;
run(input: string, callback: (decoded: string) => void, generation_config?: GenerationConfig): Promise<void>;
destroy(): void;
}

@@ -23,13 +23,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
run(input, callback) {
run(input, callback, generation_config) {
return __awaiter(this, void 0, void 0, function* () {
if (this.session instanceof Session) {
return yield this.session.run(input, callback);
return yield this.session.run(input, callback, generation_config);
}
else {
return yield this.session.run(input, Comlink.proxy(callback));
return yield this.session.run(input, Comlink.proxy(callback), generation_config);
}
});
}
destroy() {
this.session = null;
}
}
//# sourceMappingURL=inferenceSession.js.map
import * as rumble from "@rumbl/rumble-wasm";
import { AvailableModels } from "./models";
export interface GenerationConfig {
max_length: number;
temperature: number;
top_k: number;
top_p: number;
repetition_penalty: number;
}
export declare class Session {

@@ -8,3 +15,3 @@ rumbleSession: rumble.Session | undefined;

initSession(model: AvailableModels): Promise<void>;
run(input: string, callback: (decoded: string) => void): Promise<void>;
run(input: string, callback: (decoded: string) => void, generation_config?: GenerationConfig): Promise<void>;
}

@@ -61,3 +61,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
run(input, callback) {
run(input, callback, generation_config) {
return __awaiter(this, void 0, void 0, function* () {

@@ -67,9 +67,9 @@ if (!this.rumbleSession) {

}
return yield this.rumbleSession.stream(input, callback);
return yield this.rumbleSession.stream(input, callback, generation_config);
});
}
}
if (typeof self !== 'undefined') {
if (typeof self !== "undefined") {
Comlink.expose(Session);
}
//# sourceMappingURL=session.worker.js.map
{
"name": "@rumbl/laserbeak",
"version": "0.7.2",
"version": "0.7.3",
"author": "Christopher Fleetwood <chris@fleetwood.dev>",

@@ -21,3 +21,3 @@ "description": "ML on the GPU comes to the browser",

"dependencies": {
"@rumbl/rumble-wasm": "0.7.1",
"@rumbl/rumble-wasm": "0.7.2",
"comlink": "4.3.1",

@@ -24,0 +24,0 @@ "idb": "^7.1.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc