-
Notifications
You must be signed in to change notification settings - Fork 4
Custom callbacks
Takashi Iwamoto edited this page Mar 4, 2025
·
2 revisions
- Create a custom callback module.
- Set your module name in the environment variable
LITELLM_CALLBACK_MODULE_NAME
. - Run Collmbo.
- Send a message in Slack.
You can try it with examples/callback_handler.py
. This sample logs requests to the model.
$ cat env
SLACK_APP_TOKEN=xapp-1-...
SLACK_BOT_TOKEN=xoxb-...
OPENAI_API_KEY=sk-...
LITELLM_MODEL=gpt-4o
LITELLM_CALLBACK_MODULE_NAME=examples.callback_handler
$ docker run -it --env-file ./env ghcr.io/iwamot/collmbo:latest-slim