omp packages

pi-maritaca0.1.0

pi extension for Maritaca AI

joeljuca Published 24 days ago Apache-2.0 ~336 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-maritaca

npm version License GitHub Codeberg Author

pi extension for Maritaca AI.

Set up

With pi installed and ready to use, run:

pi install npm:pi-maritaca

Get an API key at plataforma.maritaca.ai, set the environment variable MARITACA_API_KEY with your key, and you should be ready to go.

export MARITACA_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 Maritaca 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 maritaca as a model provider in pi
  2. Fetches a fresh list of available models from Maritaca 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 Maritaca AI /api/models endpoint

Configuration

The extension uses the Responses API by default (Maritaca's recommended interface). Everything can be overridden:

Env var Default Description
MARITACA_API_BASE_URL https://chat.maritaca.ai/api API base URL
MARITACA_API_FORMAT openai-responses openai-responses or openai-completions
MARITACA_API_KEY — Your API key from plataforma.maritaca.ai

Or set them from your extension module:

import { createMaritacaExtension } from "pi-maritaca";

// Use the Chat Completions API instead
export default createMaritacaExtension({ apiFormat: "openai-completions" });

Precedence: config param > environment variable > default.

💡 Troubleshoot

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

echo $MARITACA_API_KEY

Test it against the API:

curl https://chat.maritaca.ai/api/models -H "Authorization: Bearer $MARITACA_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-maritaca/issues.

Contribute

See: CONTRIBUTING.md

License

Apache-2.0 © Joel Jucá