From 4bcf9a4096a05d2e24998ab7dfeaddefb5cca890 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Thu, 12 Sep 2024 14:36:38 -0400 Subject: [PATCH] x --- langserve/api_handler.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/langserve/api_handler.py b/langserve/api_handler.py index 437df869..f6d978c1 100644 --- a/langserve/api_handler.py +++ b/langserve/api_handler.py @@ -27,6 +27,7 @@ from fastapi import HTTPException from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError +from langchain_core._api import beta from langchain_core._api.beta_decorator import warn_beta from langchain_core.callbacks.base import AsyncCallbackHandler from langchain_core.callbacks.manager import BaseCallbackManager @@ -569,6 +570,7 @@ def __init__( If true, the client will be able to show trace information including events that occurred on the server side. Be sure not to include any sensitive information in the callback events. + This is a **beta** API. enable_feedback_endpoint: Whether to enable an endpoint for logging feedback to LangSmith. Disabled by default. If this flag is disabled or LangSmith tracing is not enabled for the runnable, then 4xx errors will be thrown @@ -629,6 +631,11 @@ def __init__( # and when tracing information is logged, we'll be able to see # traces for the path /foo/bar. self._run_name = self._base_url + if include_callback_events: + warn_beta( + message="Including callback events in the response is in beta. " + "This API may change in the future." + ) self._include_callback_events = include_callback_events self._per_req_config_modifier = per_req_config_modifier self._serializer = WellKnownLCSerializer()