examples/google-vertex/README.md
Example configurations for testing Google Vertex AI models with promptfoo.
You can run this example with:
npx promptfoo@latest init --example google-vertex
cd google-vertex
VERTEX_PROJECT_ID - Your Google Cloud project IDGOOGLE_APPLICATION_CREDENTIALS - Path to service account credentials (optional)Install dependencies:
npm install google-auth-library
Configure authentication:
# User account (development)
gcloud auth application-default login
# Or service account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
Set your project ID:
export VERTEX_PROJECT_ID=your-project-id
This example includes:
promptfooconfig.gemini.yaml: Gemini models with function calling, system instructions, and safety settingspromptfooconfig.claude.yaml: Claude models for technical writing and code analysispromptfooconfig.llama.yaml: Llama models with safety features and region configurationpromptfooconfig.search.yaml: Search grounding for real-time informationpromptfooconfig.response-schema.yaml: Response schemas with structured output# Basic example
promptfoo eval -c promptfooconfig.yaml
# Model-specific examples
promptfoo eval -c promptfooconfig.gemini.yaml
promptfoo eval -c promptfooconfig.claude.yaml
promptfoo eval -c promptfooconfig.llama.yaml
# Search grounding tool and image understanding
promptfoo eval -c promptfooconfig.search.yaml
promptfoo eval -c promptfooconfig.image.yaml
# Structured output with response schemas
promptfoo eval -c promptfooconfig.response-schema.yaml
# View results
promptfoo view
Each configuration demonstrates different model capabilities, from function calling and tool use to safety features and real-time information retrieval.