prompts & feedback on AI models. In this guide we will go over how to setup the TrubricsCallbackHandler. Check out our repo for more information on Trubrics.Installation and Setup‚Äãpip install trubricsGetting Trubrics Credentials‚ÄãIf you do not have a Trubrics account, create one on here. In this tutorial, we will use the default project that is built upon account creation.Now set your credentials as environment variables:import osos.environ["TRUBRICS_EMAIL"] = "***@***"os.environ["TRUBRICS_PASSWORD"] = "***"Usage‚ÄãThe TrubricsCallbackHandler can receive various optional arguments. See here for kwargs that can be passed to Trubrics prompts.class TrubricsCallbackHandler(BaseCallbackHandler):    """    Callback handler for Trubrics.        Args:        project: a trubrics project, default project is "default"        email: a trubrics account email, can equally be set in env variables        password: a trubrics account password, can equally be set in env variables        **kwargs: all other kwargs are parsed and set to trubrics prompt variables, or added to the `metadata` dict    """Examples‚ÄãHere are two examples of how to use the TrubricsCallbackHandler with Langchain LLMs or Chat Models. We will use OpenAI models, so set your OPENAI_API_KEY key here:os.environ["OPENAI_API_KEY"] = "sk-***"1. With an LLM‚Äãfrom langchain.llms import OpenAIfrom langchain.callbacks import TrubricsCallbackHandlerllm = OpenAI(callbacks=[TrubricsCallbackHandler()])    [32m2023-09-26 11:30:02.149[0m | [1mINFO    [0m | [36mtrubrics.platform.auth[0m:[36mget_trubrics_auth_token[0m:[36m61[0m - [1mUser jeff.kayne@trubrics.com has been authenticated.[0mres = llm.generate(["Tell me a joke", "Write me a poem"])    [32m2023-09-26 11:30:07.760[0m | [1mINFO    [0m | [36mtrubrics.platform[0m:[36mlog_prompt[0m:[36m102[0m - [1mUser prompt saved to Trubrics.[0m    [32m2023-09-26 11:30:08.042[0m | [1mINFO    [0m | [36mtrubrics.platform[0m:[36mlog_prompt[0m:[36m102[0m
Trubrics
Trubrics ->: prompts & feedback on AI models. In this guide we will go over how to setup the TrubricsCallbackHandler. Check out our repo for more information on Trubrics.Installation and Setup‚Äãpip install trubricsGetting Trubrics Credentials‚ÄãIf you do not have a Trubrics account, create one on here. In this tutorial, we will use the default project that is built upon account creation.Now set your credentials as environment variables:import osos.environ["TRUBRICS_EMAIL"] = "***@***"os.environ["TRUBRICS_PASSWORD"] = "***"Usage‚ÄãThe TrubricsCallbackHandler can receive various optional arguments. See here for kwargs that can be passed to Trubrics prompts.class TrubricsCallbackHandler(BaseCallbackHandler):    """    Callback handler for Trubrics.        Args:        project: a trubrics project, default project is "default"        email: a trubrics account email, can equally be set in env variables        password: a trubrics account password, can equally be set in env variables        **kwargs: all other kwargs are parsed and set to trubrics prompt variables, or added to the `metadata` dict    """Examples‚ÄãHere are two examples of how to use the TrubricsCallbackHandler with Langchain LLMs or Chat Models. We will use OpenAI models, so set your OPENAI_API_KEY key here:os.environ["OPENAI_API_KEY"] = "sk-***"1. With an LLM‚Äãfrom langchain.llms import OpenAIfrom langchain.callbacks import TrubricsCallbackHandlerllm = OpenAI(callbacks=[TrubricsCallbackHandler()])    [32m2023-09-26 11:30:02.149[0m | [1mINFO    [0m | [36mtrubrics.platform.auth[0m:[36mget_trubrics_auth_token[0m:[36m61[0m - [1mUser jeff.kayne@trubrics.com has been authenticated.[0mres = llm.generate(["Tell me a joke", "Write me a poem"])    [32m2023-09-26 11:30:07.760[0m | [1mINFO    [0m | [36mtrubrics.platform[0m:[36mlog_prompt[0m:[36m102[0m - [1mUser prompt saved to Trubrics.[0m    [32m2023-09-26 11:30:08.042[0m | [1mINFO    [0m | [36mtrubrics.platform[0m:[36mlog_prompt[0m:[36m102[0m