diff --git a/python/src/reag/client.py b/python/src/reag/client.py index b7d4a3e..778052b 100644 --- a/python/src/reag/client.py +++ b/python/src/reag/client.py @@ -5,6 +5,7 @@ from typing import List, Optional, TypeVar, Dict, Union from pydantic import BaseModel from litellm import acompletion +import litellm from reag.prompt import REAG_SYSTEM_PROMPT from reag.schema import ResponseSchemaMessage @@ -50,6 +51,9 @@ def __init__( self.schema = schema or ResponseSchemaMessage self.model_kwargs = model_kwargs or {} self._http_client = None + + # Configure LiteLLM to use AgentOps + litellm.success_callback = ["agentops"] async def __aenter__(self): self._http_client = httpx.AsyncClient()