Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

webhook.md 1.0 KB

You have to be logged in to leave a comment. Sign In
sidebar_label description
Generic webhook Configure webhook integrations to trigger custom LLM flows and prompt chains with HTTP POST requests, enabling seamless API-based testing and evaluation

Generic webhook

The webhook provider can be useful for triggering more complex flows or prompt chains end to end in your app.

It is specified like so:

providers:
  - webhook:http://example.com/webhook

promptfoo will send an HTTP POST request with the following JSON payload:

{
  "prompt": "..."
}

It expects a JSON response in this format:

{
  "output": "..."
}

Passing custom properties

It is possible to set webhook provider properties under the config key by using a more verbose format:

providers:
  - id: webhook:http://example.com/webhook
    config:
      foo: bar
      test: 123

These config properties will be passed through in the JSON request payload:

{
  "prompt": "...",
  "config": {
    "foo": "bar",
    "test": 123
  }
}
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...