pipelines
pipelines copied to clipboard
fix: Get usage from usage field in message response body in langfuse filter pipeline example
Description
- This retrieves usage data if it exists from the usage field as passed by the chatCompleted handler in OpenWebUI as implemented in open-webui/open-webui#10711. I'm assuming this was functional at one point because this pipeline seems to assume it will be available but usage would never be passed to the outlet as code is currently. This filter is looking for usage in the info field but this doesn't seem consistent with OpenAI or other models so I left it as usage.
Fixed
- This retrieves usage data if it exists in the usage field of the response body which allows it to be processed in filter pipeline outlet function.