LLM Webhooks Testing locally Helicone
This is a short guide on how to test webhooks locally.
How to test webhooks locally
The idea is that we are going to use a tool like ngrok to create a secure tunnel to your local machine so that Helicone can send events to your local server.
Create your local worker server
Here is a simple python example using FastAPI:
Create a file called main.py
and add the following code:
Run the server using:
you should see something like this…
Setting up ngrok
- Install ngrok using the official guide.
- Run
ngrok http <port>
, where<port>
is the port that your local server is running on.
You should see something like this…
Copy the ngrok URL
Add the URL outputed from ngrok
to your webhook configuration in the Helicone webhooks page.
in our example it would be:
https://9742-103-249-231-120.ngrok-free.app
Webhooks page
For this testing example I added the property filter environment
to equal to
dev
so that it only sends events to this webhook from our development
environment.
Send a request through Helicone to receive the webhook
After sending the request you should see the webhook hit your local server.
Was this page helpful?