Skip to content

Commit

Permalink
fix(Client)!: handle possible trailing slash omission in URI
Browse files Browse the repository at this point in the history
  • Loading branch information
PleahMaCaka committed Oct 22, 2023
1 parent 1b766c2 commit 638d180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "booga.js",
"version": "0.2.0",
"version": "0.2.1",
"description": "The Simple oobabooga/text-generation-webui API Wrapper",
"author": "PleahMaCaka",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export class Client {

constructor(options: ClientOptions) {
this._uri = options.uri ? options.uri + "api/v1/" : "http://127.0.0.1:5000/api/v1/"

if (!this._uri.endsWith("")) this._uri += "/"
}

async getCurrentModel(): Promise<string> {
Expand Down

0 comments on commit 638d180

Please sign in to comment.