LangChain
LangChain integration — emit Stratix traces from LangChain chains.
Last updated
Was this helpful?
LangChain integration — emit Stratix traces from LangChain chains.
Private preview. This surface is not yet generally available. Adapters live in the Python SDK today and the rendering / configuration UX is under iteration. Contact [email protected] to request access to the private preview.
Wrap your chain with a Stratix callback. See the cookbook recipe.
from layerlens import Stratix
from langchain_core.callbacks import BaseCallbackHandler
client = Stratix()
class StratixCallback(BaseCallbackHandler):
def on_chain_end(self, outputs, **kwargs):
client.traces.create(...)
chain.invoke(input, config={"callbacks": [StratixCallback()]})Last updated
Was this helpful?
Was this helpful?