Skip to content

The agent engineering platform.

Update ContextCallbackHandler Docstring & metadata key (#10732)

BarberAlecc898a4d7ba8b
diff --git a/libs/langchain/langchain/callbacks/context_callback.py b/libs/langchain/langchain/callbacks/context_callback.py
index 12791d9119..6306763114 100644
--- a/libs/langchain/langchain/callbacks/context_callback.py
+++ b/libs/langchain/langchain/callbacks/context_callback.py
@@ -33,7 +33,7 @@ def import_context() -> Any:
class ContextCallbackHandler(BaseCallbackHandler):
"""Callback Handler that records transcripts to the Context service.
- (https://getcontext.ai).
+ (https://context.ai).
Keyword Args:
token (optional): The token with which to authenticate requests to Context.
@@ -122,7 +122,7 @@ class ContextCallbackHandler(BaseCallbackHandler):
"""Run when the chat model is started."""
llm_model = kwargs.get("invocation_params", {}).get("model", None)
if llm_model is not None:
- self.metadata["llm_model"] = llm_model
+ self.metadata["model"] = llm_model
if len(messages) == 0:
return