Promptfoo is a framework for prompt evaluation, regression testing, and AI red teaming. Promptfoo includes aDocumentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
cometapi provider that calls CometAPI through OpenAI-compatible endpoints.
Prerequisites
- Node.js 18+
- Promptfoo installed locally or run through
npx - A CometAPI account with an active API key — get yours in the dashboard
- A model ID from the CometAPI Models page
Configure the integration
Choose a provider format
Promptfoo uses the following provider ID format for CometAPI:Use these provider types:
You can also use
| Type | Use case |
|---|---|
chat | Chat completions, vision, and multimodal prompts |
completion | Text completion models |
embedding | Text embedding evaluations |
image | Image generation evaluations |
cometapi:your-model-id for the default chat mode.Provider examples
Use a provider type that matches the model behavior that you want to evaluate:chat provider type and pass image variables through Promptfoo test variables.
Troubleshooting
Promptfoo cannot find the API key
Promptfoo cannot find the API key
Confirm that
COMETAPI_KEY is exported in the same shell session that runs promptfoo eval.The provider type does not match the model
The provider type does not match the model
Use
chat for conversational and multimodal models, embedding for embedding models, and image for image generation models.The model ID fails
The model ID fails
Replace
your-model-id with an exact model ID from the CometAPI Models page.