-
Checked other resources
Commit to Help
Example Code# ...
app = graph_builder.compile(checkpointer=memory, interrupt_before=["brain"])
config = {"configurable": {"thread_id": 1}}
# I want to track this
app.invoke({"messages": [("human", "Hello")]}, config=config)
# I don't want to track this
app.update_state(config, {"messages": [("huma", "hi")]}) DescriptionWhen I use How do I set some content not to be tracked? System Infolangchain==0.2.11 platform linux |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To configure LangSmith to exclude specific content, such as the Here is an example of how you might configure this: from langchain_core.callbacks.manager import CallbackManager
# Define a custom callback manager that excludes the `update_state` method
class CustomCallbackManager(CallbackManager):
def on_method_start(self, method_name: str, *args, **kwargs):
if method_name == "update_state":
return # Skip tracking for this method
super().on_method_start(method_name, *args, **kwargs)
# Create a RunnableConfig with the custom callback manager
config = RunnableConfig(
callbacks=CustomCallbackManager()
)
# Set the config context
_set_config_context(config) This code sets up a custom callback manager that skips tracking for the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
langchain-ai/langgraph#1212 (comment)