No description
- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| .npmrc | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
pi-bai-provider
B.AI provider plugin for Pi. It adds a /login provider named bai and loads the models enabled for your B.AI API key from https://api.b.ai/v1/models.
Install
pi install git:https://git.cyfrowynomada.com/CyfrowyNomada/pi-bai-provider.git
Or test a local checkout:
pi -e .
Login
Inside Pi:
/login bai
Paste your B.AI API key when prompted, then refresh/select a model with /model.
You can also use an environment variable instead of stored login:
export BAI_API_KEY="sk-..."
pi
PowerShell:
$env:BAI_API_KEY = "sk-..."
pi
What it registers
- Provider id:
bai - Display name:
B.AI - Base URL:
https://api.b.ai/v1 - API: OpenAI Chat Completions (
/chat/completions) - Auth:
/login baiorBAI_API_KEY - Models: fetched from B.AI's
/modelsendpoint for the current credential - Thinking efforts: off, minimal, low, medium, high
- Default context window: 272,000 tokens when model metadata omits it
Update
pi update --extensions