Back to Llama Index

LlamaIndex Callbacks Integration: Opik

llama-index-integrations/callbacks/llama-index-callbacks-opik/README.md

0.14.211.1 KB
Original Source

LlamaIndex Callbacks Integration: Opik

shell
pip install llama-index-callbacks-opik

This integration allows you to get one-click observability of your LlamaIndex RAG pipelines on Opik.

The simplest way to get started and try out Opik is to signup on our cloud instance. You can then get you API key from the quickstart page or the user menu and start logging !

You can initialize globally using

python
from llama_index.core import set_global_handler

# You should provide your OPIK API key and Workspace using the following environment variables:
# OPIK_API_KEY, OPIK_WORKSPACE
set_global_handler("opik")

or:

python
from llama_index.core import Settings
from llama_index.core.callbacks import CallbackManager
from opik.integrations.llama_index import LlamaIndexCallbackHandler

opik_callback_handler = LlamaIndexCallbackHandler()
Settings.callback_manager = CallbackManager([opik_callback_handler])