BerriAI / litellm

Call all LLM APIs using the OpenAI format. Use Bedrock, Azure, OpenAI, Cohere, Anthropic, Ollama, Sagemaker, HuggingFace, Replicate (100+ LLMs)
https://docs.litellm.ai/docs/
Other
10.16k stars 1.13k forks source link

fix(token_counter.py): New `get_modified_max_tokens' helper func #4446

Closed krrishdholakia closed 3 days ago

krrishdholakia commented 3 days ago

Title

New `get_modified_max_tokens' helper func

Returns the user's max output tokens, adjusted for:

Relevant issues

Fixes https://github.com/BerriAI/litellm/issues/4439

Type

๐Ÿ†• New Feature ๐Ÿ› Bug Fix ๐Ÿงน Refactoring

Changes

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

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

new test in test_token_counter.py

Screenshot 2024-06-27 at 3 40 03 PM
vercel[bot] commented 3 days ago

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 Jun 27, 2024 10:43pm