Are you sure you want to delete this access key?
You can run this example with:
npx promptfoo@latest init --example google-vertex-tools
This example demonstrates how to use Vertex AI models with function calling and tools.
Initialize this example in a new directory:
promptfoo init --example google-vertex-tools
This creates three files:
promptfooconfig.yaml
- Your prompt testing configurationtools.json
- Function definitions for tool callingREADME.md
- This guideInstall the Google Auth Library:
npm install google-auth-library
Enable the Vertex AI API in your Google Cloud project
Configure your Google Cloud project:
gcloud config set project PROJECT_ID
Set up authentication using one of these methods:
Authenticate with your Google account:
gcloud auth application-default login
Use a machine with an authorized service account
Use service account credentials file:
Download your service account JSON
Set the credentials path:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
Review and customize the configuration in promptfooconfig.yaml
Run the eval:
promptfoo eval
Examine the results:
promptfoo view
Press 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?