chore: import upstream snapshot with attribution
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

This commit is contained in:
wehub-resource-sync
2026-07-13 13:24:08 +08:00
commit 0d3cb498a3
5438 changed files with 1316560 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
# openai-video (OpenAI Sora Video Generation)
This example demonstrates how to use OpenAI's Sora video generation models with Promptfoo.
## Setup
Initialize this example:
```bash
npx promptfoo@latest init --example openai-video
cd openai-video
```
Set your OpenAI API key:
```bash
export OPENAI_API_KEY=your_api_key_here
```
## Usage
Run the evaluation:
```bash
npx promptfoo@latest eval
```
View results in the web UI:
```bash
npx promptfoo@latest view
```
## Models
This example compares two Sora models:
| Model | Description | Cost |
| ---------- | --------------------- | ------------ |
| sora-2 | Standard quality | $0.10/second |
| sora-2-pro | Higher quality output | $0.30/second |
## Configuration Options
| Parameter | Description | Default |
| ---------------------- | --------------------------------------- | -------- |
| `size` | Video dimensions (1280x720 or 720x1280) | 1280x720 |
| `seconds` | Duration in seconds (4, 8, or 12) | 8 |
| `poll_interval_ms` | Polling interval for job status | 10000 |
| `max_poll_time_ms` | Maximum wait time for generation | 600000 |
| `download_thumbnail` | Download thumbnail preview | true |
| `download_spritesheet` | Download spritesheet preview | true |
## Output
Generated videos are stored in the promptfoo media storage (`~/.promptfoo/media/`) and displayed in the web viewer with playback controls.
## Notes
- Video generation can take 1-5 minutes per video
- Videos are cached based on request parameters (prompt, model, size, seconds) to avoid regeneration
- The web viewer supports video playback with controls and metadata display
@@ -0,0 +1,28 @@
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: OpenAI Sora video generation
prompts:
- 'A cinematic shot of: {{scene}}'
providers:
# Sora 2 - Standard video generation ($0.10/second)
- id: openai:video:sora-2
config:
size: 1280x720 # Landscape: 1280x720, Portrait: 720x1280
seconds: 4 # Video duration: 4, 8, or 12 seconds
# Sora 2 Pro - Higher quality video generation ($0.30/second)
- id: openai:video:sora-2-pro
config:
size: 1280x720
seconds: 4
tests:
- vars:
scene: a cat riding a skateboard through a city at sunset
- vars:
scene: waves crashing on a tropical beach with palm trees swaying
- vars:
scene: a robot dancing in a neon-lit cyberpunk city
- vars:
scene: hot air balloons floating over misty mountains at sunrise
+19
View File
@@ -0,0 +1,19 @@
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: Promptfoo red panda mascot video test
prompts:
- |
An evil red panda supervillain sitting at a computer desk, typing menacingly on a keyboard.
The scene is a dark, high-tech lair with dramatic purple and green accent lighting.
The red panda has a sinister grin, arched eyebrows, and wears a tiny monocle and black cape.
Dramatic shadows cast across the face. The panda occasionally does an evil laugh while typing.
Style: Semi-realistic 3D animation with dramatic noir lighting, cartoon villain aesthetic.
providers:
- id: openai:video:sora-2
config:
size: 1280x720
seconds: 4
tests:
- vars: {}