From 1b6a1c390beb335409efbe2290ce5719c95ce326 Mon Sep 17 00:00:00 2001 From: Jhen Date: Tue, 19 Nov 2024 11:51:22 +0800 Subject: [PATCH] feat(ts): add methods --- src/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/index.ts b/src/index.ts index d85d929..7ac20ba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -214,6 +214,21 @@ export class LlamaContext { } } + async applyLoraAdapters( + loraAdapters: Array<{ path: string; scaled?: number }>, + removePrevious: boolean, + ): Promise { + return RNLlama.applyLoraAdapters(this.id, loraAdapters, removePrevious) + } + + async removeLoraAdapters(): Promise { + return RNLlama.removeLoraAdapters(this.id) + } + + async getLoadedLoraAdapters(): Promise> { + return RNLlama.getLoadedLoraAdapters(this.id) + } + async release(): Promise { return RNLlama.releaseContext(this.id) }