Closed kongzii closed 2 weeks ago
I asked them about (3) https://github.com/orgs/langfuse/discussions/2949
I think this can be closed, https://github.com/orgs/langfuse/discussions/2949 isn't getting much traction and the current solution of using get_langfuse_config
function + observing everything by default, because it can be (1) easily disabled and (2) un-observed version of underlying function can be accessed by __wrapped__
attribute.
Check out this comment https://github.com/gnosis/prediction-market-agent-tooling/pull/345/files#r1718271854
How could it be done nicer? Some ideas:
Where
existing_config
could be just None.callbacks
in function arguments, and always create a second function that will pass the callback, ifadd_langfuse_callback
is True:Monkey-patch all Langchain invoke methods, automatically adding the langfuse callback. But this would be nicer as an experimental feature in Langfuse itself.
Create a wrapper class around Langchain classes that we can import from PMAT, and it will include the callback automatically.
???