Skip to content

Commit

Permalink
fix(booga.js): change by updated usage
Browse files Browse the repository at this point in the history
  • Loading branch information
PleahMaCaka committed Oct 26, 2023
1 parent a363cd9 commit 0adb947
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/lib/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
})
}

Expand Down

0 comments on commit 0adb947

Please sign in to comment.