Files
promptfoo--promptfoo/examples/provider-quiverai/README.md
T
wehub-resource-sync 0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

78 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# provider-quiverai (QuiverAI SVG Generation, Vectorization & Pipelines)
Compare QuiverAI's Arrow models — including [Arrow 1.1](https://docs.quiver.ai) and Arrow 1.1 Max — across three workflows: text-to-SVG generation, image-to-SVG vectorization, and a chained `GPT Image-2 → QuiverAI vectorize` pipeline. Every workflow is scored with an LLM-as-judge rubric so you can compare quality side-by-side.
## Setup
```bash
export QUIVERAI_API_KEY=your-api-key
export OPENAI_API_KEY=your-openai-key # Required for the pipeline + llm-rubric grader
npx promptfoo@latest init --example provider-quiverai
```
## Run the generation suite
```bash
npx promptfoo@latest eval
```
This compares Arrow 1.1, Arrow 1.1 Max, and an Arrow 1.1 variant with `instructions` style guidance side-by-side.
## Run the vectorize suite
```bash
npx promptfoo@latest eval -c promptfooconfig.vectorize.yaml
```
Converts raster reference images into SVGs with both Arrow 1.1 and Arrow 1.1 Max so you can compare fidelity.
The sample inputs are repo-hosted fixtures, which keeps the walkthrough stable
when third-party image hosts change behavior.
## Run the GPT Image-2 → QuiverAI pipeline
```bash
npx promptfoo@latest eval -c promptfooconfig.pipeline.yaml
```
Chains OpenAI `gpt-image-2` (high-quality raster) with the QuiverAI vectorize endpoint to produce a coherent red-panda icon set. The pipeline is a custom JS provider in [`pipeline-provider.js`](pipeline-provider.js); each call hits both APIs serially, so expect longer wall-clock times than a single-provider eval.
Example live cost reference from the May 2026 verification run:
| Step | Model | Credits / cost |
| -------------- | --------------- | -------------------- |
| Raster step | `gpt-image-2` | OpenAI image pricing |
| Vectorize step | `arrow-1.1` | 15 credits |
| Vectorize step | `arrow-1.1-max` | 20 credits |
Credits flow through to `result.metadata.credits` so you can budget evals. Check
`GET /v1/models` for the current `pricing_credits`; QuiverAI prices are
model- and operation-specific.
## What This Example Shows
- **Generation**: text → SVG with three side-by-side providers
- **Vectorization**: image → SVG with the `quiverai:vectorize:<model>` route
- **Pipeline**: a custom JS provider that chains GPT Image-2 + QuiverAI vectorize
- `is-xml` to validate SVG structure
- `llm-rubric` with a custom `rubricPrompt` for SVG-specific evaluation
- Streaming on by default for faster generation
## Common Configuration Options
| Option | Endpoint | Description |
| ------------------- | --------- | ------------------------------------------------------------ |
| `instructions` | generate | Style guidance separate from the prompt |
| `references` | generate | Reference images: URL string, `{ url }`, or `{ base64 }` |
| `n` | generate | Number of outputs per request (116) |
| `image` | vectorize | Override image input from prompt (`{ url }` or `{ base64 }`) |
| `auto_crop` | vectorize | Crop to the dominant subject before vectorization |
| `target_size` | vectorize | Square resize target in pixels (1284096) |
| `temperature` | both | Randomness (02, default 1) |
| `max_output_tokens` | both | Output token cap (1131,072) |
| `stream` | both | Set `false` to enable response caching |
## Learn More
- [QuiverAI Provider Documentation](https://www.promptfoo.dev/docs/providers/quiverai)
- [QuiverAI API Documentation](https://docs.quiver.ai)