Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix team-based logging to langfuse + allow custom tokenizer on /token_counter endpoint #7493

Merged
merged 7 commits into from
Jan 1, 2025

Conversation

krrishdholakia
Copy link
Contributor

@krrishdholakia krrishdholakia commented Jan 1, 2025

Title

  • Fixes team-based logging to langfuse
  • allow custom tokenizer on /token_counter endpoint (docs pending)

Relevant issues

Closes #6787
Closes #4944

Type

🆕 New Feature
🐛 Bug Fix

Changes

  • adds dynamic logging to langfuse prompt management class (success + failure events)
  • supports setting hf token counter on config.yaml

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

Project 1

Screenshot 2024-12-31 at 10 56 43 PM

Project 2

Screenshot 2024-12-31 at 10 57 07 PM

Verified

This commit was signed with the committer’s verified signature.
snorrees Snorre Eskeland Brekke
…se custom logger compatible class
…to langfuse as well
Allows customizing value for `/utils/token_counter`
Copy link

vercel bot commented Jan 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2025 7:04am

@krrishdholakia krrishdholakia changed the title Litellm dev 12 31 2024 p3 Fix team-based logging to langfuse + allow custom tokenizer on /token_counter endpoint Jan 1, 2025
Copy link

codecov bot commented Jan 1, 2025

Codecov Report

Attention: Patch coverage is 90.62500% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ntegrations/langfuse/langfuse_prompt_management.py 66.66% 3 Missing ⚠️
litellm/utils.py 66.66% 2 Missing ⚠️
...m_core_utils/initialize_dynamic_callback_params.py 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@krrishdholakia krrishdholakia merged commit 080de89 into main Jan 1, 2025
24 of 28 checks passed
@krrishdholakia krrishdholakia deleted the litellm_dev_12_31_2024_p3 branch January 1, 2025 07:18
rajatvig pushed a commit to rajatvig/litellm that referenced this pull request Jan 16, 2025
…n_counter` endpoint (BerriAI#7493)

* fix(langfuse_prompt_management.py): migrate dynamic logging to langfuse custom logger compatible class

* fix(langfuse_prompt_management.py): support failure callback logging to langfuse as well

* feat(proxy_server.py): support setting custom tokenizer on config.yaml

Allows customizing value for `/utils/token_counter`

* fix(proxy_server.py): fix linting errors

* test: skip if file not found

* style: cleanup unused import

* docs(configs.md): add docs on setting custom tokenizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant