LangChain Middleware No-Op Nodes #4011
MaxStenklyft
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently upgraded to langchain 1.2 and noticed that openllmetry was creating no-op nodes in my graph for every middleware regardless of if the middleware implemented a given function. For example, one middleware may only be applicable for
before_agentbut openllmetry was creating nodes for all all permutations of that middleware (before_agent,after_agent,before_model,after_model).Extra nodes negatively impact the graph visibility, latency, and recursion limits. I've implemented a fix below and would love some feedback.
#4000
Beta Was this translation helpful? Give feedback.
All reactions