Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pleahmacaka/booga.js
The simple API Wrapper for oobabooga/text-generation-webui
https://github.com/pleahmacaka/booga.js
api api-wrapper oobabooga text-generation-webui wrapper
Last synced: 2 months ago
JSON representation
The simple API Wrapper for oobabooga/text-generation-webui
- Host: GitHub
- URL: https://github.com/pleahmacaka/booga.js
- Owner: PleahMaCaka
- License: mit
- Created: 2023-10-19T02:44:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-11T03:03:59.000Z (12 months ago)
- Last Synced: 2024-10-07T07:48:59.859Z (3 months ago)
- Topics: api, api-wrapper, oobabooga, text-generation-webui, wrapper
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/booga.js
- Size: 26.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 to 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: "https://your-share-api-url.trycloudflare.com/api", // default by localhost:5000
})client.getCurrentModel().then(model => {
console.log(model ?? "No model loaded! :(")
})client.chat("Hello Assistant!", {
character: "Assistant"
}).then(res => {
console.log(`Assistant: ${res}`)
})
```