Skip to content

Commit

Permalink
feat(ts): add methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 19, 2024
1 parent 4eb0539 commit 1b6a1c3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@ export class LlamaContext {
}
}

async applyLoraAdapters(
loraAdapters: Array<{ path: string; scaled?: number }>,
removePrevious: boolean,
): Promise<void> {
return RNLlama.applyLoraAdapters(this.id, loraAdapters, removePrevious)
}

async removeLoraAdapters(): Promise<void> {
return RNLlama.removeLoraAdapters(this.id)
}

async getLoadedLoraAdapters(): Promise<Array<{ path: string; scaled?: number }>> {
return RNLlama.getLoadedLoraAdapters(this.id)
}

async release(): Promise<void> {
return RNLlama.releaseContext(this.id)
}
Expand Down

0 comments on commit 1b6a1c3

Please sign in to comment.