omp packages

pi-kitani0.1.0

pi extension for Kitani AI

joeljuca Published 15 days ago Apache-2.0 ~324 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-kitani

GitHub Actions npm version License GitHub Codeberg Author

pi extension for Kitani AI.

Set up

With pi installed and ready to use, run:

pi install npm:pi-kitani

Get an API key in the Kitani dashboard, set the environment variable KITANI_API_KEY with your key, and you should be ready to go.

export KITANI_API_KEY='<Your API key here>'

You're ready. Run pi normally; the extension loads automatically:

pi

Use

Usage is mostly automatic. The extension will make your pi integrate seamlessly with Kitani AI, so you should be able to see their models when you /model, the list will be reloaded when you /reload, etc.

Here's what the extension will do:

  1. It registers kitani as a model provider in pi
  2. Fetches a fresh list of available models from Kitani AI when you open pi
  3. Refresh the list of models when you /model or /reload
  4. API fetch: The callback fetches models from the Kitani AI /v1/models endpoint

Configuration

The extension uses the Chat Completions API — Kitani's only supported API. The base URL can be overridden:

Env var Default Description
KITANI_API_BASE_URL https://api.kitani.ai/v1 API base URL
KITANI_API_KEY — Your API key from the Kitani dashboard

Or set it from your extension module:

import { createKitaniExtension } from "pi-kitani";

// Use a custom base URL
export default createKitaniExtension({ apiBaseUrl: "https://example.com/v1" });

Precedence: config param > environment variable > default.

💡 Troubleshoot

If something is not working properly, you're not seeing Kitani AI's models when you /model, etc., the first place to check is your API key:

echo $KITANI_API_KEY

Test it against the API:

curl https://api.kitani.ai/v1/models -H "Authorization: Bearer $KITANI_API_KEY"

Reload pi (while in pi, run /reload). Check pi's console output for error messages, you'll most certainly find insights on what's wrong.

If nothing works and you believe it's a bug in the extension itself, open an issue at https://github.com/joeljuca/pi-kitani/issues.

Contribute

See: CONTRIBUTING.md

License

Apache-2.0 © Joel Jucá