#LangchainCallbackHandler custom input/output?
1 messages · Page 1 of 1 (latest)
Overriding single observation/span/generation outputs is tricky. You could fetch the trace via the fetch_* methods to then update it.
If you want to change the trace output you could wrap this with the decorator and handle the trace yourself. Details: https://langfuse.com/docs/integrations/langchain/tracing#interoperability
What do you try to achieve here? Maybe I can help in a better way with more context
Thank you for marking this question as solved!
I wanted to explore truncating the input/output to a certain length on certain conditions so we don't persist too much into the DB.