-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8443551
commit 1b766c2
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Booga.js | ||
|
||
The simple API Wrapper for the | ||
[**`oobabooga/text-generation-webui`**](https://github.com/oobabooga/text-generation-webui) | ||
|
||
## 💡 Usage | ||
|
||
### Installation | ||
|
||
```bash | ||
npm install booga.js # or yarn/pnpm whatever | ||
``` | ||
|
||
### Good to see once | ||
|
||
You can find all parameters in [here](https://github.com/PleahMaCaka/booga.js/blob/main/src/types/ChatParams.ts) | ||
|
||
### Example | ||
|
||
You can get easily get API endpoints | ||
use [--public-api](https://github.com/oobabooga/text-generation-webui?tab=readme-ov-file#api) argument | ||
|
||
```js | ||
import { Client } from "booga.js" | ||
|
||
const client = new Client({ | ||
uri: "your uri here" | ||
}) | ||
|
||
client.getCurrentModel().then(model => { | ||
console.log(model) | ||
}) | ||
|
||
client.chat("Hello Assistant!").then(res => { | ||
console.log(`User: ${res.input}`) | ||
console.log(`Assistant: ${res.output}`) | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters