这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/src/reag/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down