File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 import pydantic # type: ignore
7272
7373from langfuse ._task_manager .task_manager import TaskManager
74- from langfuse .api .client import FernLangfuse
74+ from langfuse .api .client import AsyncFernLangfuse , FernLangfuse
7575from langfuse .environment import get_common_release_envs
7676from langfuse .logging import clean_logger
7777from langfuse .media import LangfuseMedia
@@ -299,9 +299,19 @@ def __init__(
299299 httpx_client = self .httpx_client ,
300300 timeout = timeout ,
301301 )
302+ async_public_api_client = AsyncFernLangfuse (
303+ base_url = self .base_url ,
304+ username = public_key ,
305+ password = secret_key ,
306+ x_langfuse_sdk_name = "python" ,
307+ x_langfuse_sdk_version = version ,
308+ x_langfuse_public_key = public_key ,
309+ timeout = timeout ,
310+ )
302311
303312 self .api = public_api_client
304313 self .client = public_api_client # legacy, to be removed in next major release
314+ self .async_api = async_public_api_client
305315
306316 langfuse_client = LangfuseClient (
307317 public_key = public_key ,
You can’t perform that action at this time.
0 commit comments