From 0adb947df1601fe536d1458eae3281f2bccbe96f Mon Sep 17 00:00:00 2001 From: PleahMaCaka Date: Thu, 26 Oct 2023 12:42:59 +0900 Subject: [PATCH] fix(booga.js): change by updated usage --- src/lib/client/Client.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/client/Client.ts b/src/lib/client/Client.ts index 27b27fd..c5d7dff 100644 --- a/src/lib/client/Client.ts +++ b/src/lib/client/Client.ts @@ -4,18 +4,17 @@ import { Client as LLM } from "booga.js" export class Client { + private _url: string = "" + public llm = new LLM({ + uri: this._url + }) + constructor() { stateStore.subscribe((state) => { this._url = state.url.model }) } - private _url: string = "" - - public llm = new LLM({ - uri: this._url - }) - public async appendHistory(author: Author, msg: string) { stateStore.update((state) => { return { @@ -38,7 +37,7 @@ export class Client { await this.llm.chat(msg, { character: char }).then(res => { - this.appendHistory(Author.Assistant, res.output) + this.appendHistory(Author.Assistant, res) }) }