Trubrics is an LLM user analytics platform that lets you collect, analyse and manage user
prompts & feedback on AI models.
Check out Trubrics repo for more information on Trubrics
.
In this guide, we will go over how to set up the TrubricsCallbackHandler
.
Installation and Setup
Getting Trubrics Credentials
If you do not have a Trubrics account, create one on here. In this tutorial, we will use thedefault
project that is built upon account creation.
Now set your credentials as environment variables:
Usage
TheTrubricsCallbackHandler
can receive various optional arguments. See here for kwargs that can be passed to Trubrics prompts.
Examples
Here are two examples of how to use theTrubricsCallbackHandler
with LangChain LLMs or Chat Models. We will use OpenAI models, so set your OPENAI_API_KEY
key here: