Are you sure you want to delete this access key?
This directory contains examples for testing OpenAI's Responses API with promptfoo.
You can run this example with:
npx promptfoo@latest init --example openai-responses
promptfooconfig.yaml
)Basic example showing how to use the Responses API with different models and configurations.
promptfooconfig.external-format.yaml
)Example demonstrating how to load response_format
configuration from external files. This is useful for:
This example compares inline vs. external file approach:
response_format.json
using file://
syntaxpromptfooconfig.function-call.yaml
)Example demonstrating function calling capabilities with the Responses API.
promptfooconfig.function-callback.yaml
)Example showing how to use function callbacks to execute functions locally instead of just returning the function call. This allows you to:
Key differences from regular function calling:
functionToolCallbacks
to define JavaScript functionspromptfooconfig.reasoning.yaml
)Example showing how to use reasoning models (o1, o3, etc.) with specific configurations.
promptfooconfig.image.yaml
)Example demonstrating image input capabilities with vision models.
promptfooconfig.web-search.yaml
)Example showing web search capabilities.
promptfooconfig.codex.yaml
)Example using Codex models for code generation tasks.
promptfooconfig.mcp.yaml
)Example demonstrating OpenAI's MCP integration with remote MCP servers. This example uses the DeepWiki MCP server to query GitHub repositories.
allowed_tools
To run any of these examples:
# Basic Responses API example
npx promptfoo eval -c promptfooconfig.yaml
# External response format example
npx promptfoo eval -c promptfooconfig.external-format.yaml
# MCP example
npx promptfoo eval -c promptfooconfig.mcp.yaml
# Function calling example
npx promptfoo eval -c promptfooconfig.function-call.yaml
# Function callbacks example
npx promptfoo eval -c promptfooconfig.function-callback.yaml
# Reasoning models example
npx promptfoo eval -c promptfooconfig.reasoning.yaml
OPENAI_API_KEY
environment variableheaders
configurationPress p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?