open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
1.03k stars 321 forks source link

feat: track user.email in langfuse filter pipeline and remove wrong token count #249

Closed marcklingen closed 2 months ago

marcklingen commented 2 months ago

This change logs the user.email to langfuse as user_id. This makes langfuse much more useful as it allows to easily map usage to a certain person with the organization using openwebui.

Also I removed the logging of characters to Langfuse as this is wrong for almost all models. I'd love to add token tracking but were not able to figure out were openwebui tracks token counts. I'll create an issue for this on the main repo.

cc @samuelpetermoshi who suggested this

tjbck commented 2 months ago

LGTM, Thanks!

marcklingen commented 2 months ago

thanks for review/merge!