The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: chore warn deprecate the wandb callback handler (#27062)
Bharat Ramanathan103e573f9b01
diff --git a/libs/community/langchain_community/callbacks/wandb_callback.py b/libs/community/langchain_community/callbacks/wandb_callback.pyindex 2a6c0aa251..8fbaf93e8a 100644--- a/libs/community/langchain_community/callbacks/wandb_callback.py+++ b/libs/community/langchain_community/callbacks/wandb_callback.py@@ -4,6 +4,7 @@ from copy import deepcopyfrom pathlib import Pathfrom typing import Any, Dict, List, Optional, Sequence, Union+from langchain_core._api import warn_deprecatedfrom langchain_core.agents import AgentAction, AgentFinishfrom langchain_core.callbacks import BaseCallbackHandlerfrom langchain_core.outputs import LLMResult@@ -206,6 +207,22 @@ class WandbCallbackHandler(BaseMetadataCallbackHandler, BaseCallbackHandler):self.complexity_metrics = complexity_metricsself.visualize = visualizeself.nlp = spacy.load("en_core_web_sm")+ warn_deprecated(+ "0.3.8",+ pending=False,+ message=(+ "Please use the WeaveTracer instead of the WandbCallbackHandler. "+ "The WeaveTracer is a more flexible and powerful tool for logging "+ "and tracing your LangChain callables."+ "Find more information at https://weave-docs.wandb.ai/guides/integrations/langchain"+ ),+ alternative=(+ "Please instantiate the WeaveTracer from "+ "weave.integrations.langchain import WeaveTracer ."+ "For autologging simply use weave.init() and log all traces "+ "from your LangChain callables."+ ),+ )def _init_resp(self) -> Dict:return {k: None for k in self.callback_columns}