Commit graph

40 commits

Author SHA1 Message Date
Krrish Dholakia
ae4bcd8a41 fix(utils.py): fix trim_messages to handle tool calling
Fixes https://github.com/BerriAI/litellm/issues/4931
2024-07-29 13:04:41 -07:00
Krrish Dholakia
1ba3fcc3fb feat(utils.py): accept 'api_key' as param for validate_environment
Closes https://github.com/BerriAI/litellm/issues/4375
2024-07-11 12:02:23 -07:00
Krrish Dholakia
5718d1e205 fix(utils.py): new helper function to check if provider/model supports 'response_schema' param 2024-06-29 12:40:29 -07:00
Krrish Dholakia
ca04244a0a fix(utils.py): correctly raise openrouter error 2024-06-28 21:50:21 -07:00
Krrish Dholakia
2584120012 refactor(litellm_logging.py): refactors how slack_alerting generates langfuse trace url
gets the url from logging object
2024-06-21 16:12:25 -07:00
Ishaan Jaff
c14b1751db test - test_get_llm_provider_ft_models 2024-06-19 16:51:51 -07:00
Krrish Dholakia
f1b0cc756b test(test_utils.py): reset env after test complete 2024-06-17 20:33:39 -07:00
Krrish Dholakia
b886812787 fix(__init__.py): add gemini models to all model list
Fixes https://github.com/BerriAI/litellm/issues/4240
2024-06-17 10:54:28 -07:00
Krrish Dholakia
6a0b71c1eb test(test_utils.py): fix import 2024-06-15 14:47:46 -07:00
Krrish Dholakia
d8acda9f39 fix(proxy/utils.py): fix reset monthly budget
fix to reset at the same time each month (not at start of month)
2024-06-14 14:41:06 -07:00
Krrish Dholakia
f65752c18b feat(proxy/utils.py): allow budget duration in months
Closes https://github.com/BerriAI/litellm/issues/4042
2024-06-13 16:52:17 -07:00
Ishaan Jaff
d274cfeb3f test test_redact_msgs_from_logs 2024-06-13 13:49:23 -07:00
James Braza
ef6e920161 Added handling of unmapped provider, with test 2024-06-11 18:34:10 -07:00
James Braza
8be37bee04 Added simple test of get_supported_openai_params with no custom provider 2024-06-11 18:18:21 -07:00
Krrish Dholakia
7523f803d2 fix(utils.py): support get_max_tokens() call with same model_name as completion
Closes https://github.com/BerriAI/litellm/issues/3921
2024-05-31 21:37:51 -07:00
Christian Privitelli
2d43153efa include methods in init import, add test, fix encode/decode param ordering 2024-05-02 15:49:22 +10:00
Chen Wang
ebc889d77a
Use max_input_token for trim_messages 2024-04-16 13:36:25 +01:00
Ishaan Jaff
c8832489d6 test groq tool calling 2024-04-15 08:41:53 -07:00
Mikhail Khludnev
381858139e utils.validate_environment to handle OLLAMA_API_BASE env 2024-03-02 13:41:59 +03:00
ishaan-jaff
01f1dfdba3 (test) supports_function_calling 2024-02-28 17:51:34 -08:00
ishaan-jaff
56d20cd073 (test) supports_function_calling 2024-02-28 17:36:15 -08:00
ishaan-jaff
73f60b7315 (test) stream chunk builder - azure prompt tokens 2023-12-29 15:45:41 +05:30
ishaan-jaff
b1077ebc38 (test) test_token_counter_azure 2023-12-29 15:37:46 +05:30
ishaan-jaff
4a028d012a (test) token_counter - prompt tokens == tokens from API 2023-12-29 15:15:39 +05:30
Krrish Dholakia
4905929de3 refactor: add black formatting 2023-12-25 14:11:20 +05:30
Krrish Dholakia
2c1103247d test: fix flaky test 2023-12-01 15:46:39 -08:00
ishaan-jaff
7a3607e00c (test) token_counter 2023-11-13 08:02:46 -08:00
ishaan-jaff
e5ec4a92fe (test) add test token counter 2023-11-13 07:42:08 -08:00
Duc Pham
eeac3954d5 Reverted error while refactoring 2023-11-10 01:35:41 +07:00
Duc Pham
07e8cf1d9a Improved trimming logic and OpenAI token counter 2023-11-10 01:26:13 +07:00
Krrish Dholakia
f967d6af5e fix(init.py): fix linting errors 2023-10-24 15:54:21 -07:00
ishaan-jaff
7848f1b5b7 (feat) new function_to_dict litellm.util 2023-10-14 18:26:15 -07:00
Krrish Dholakia
076affbff2 fix llama index validate environment error 2023-09-26 17:53:22 -07:00
ishaan-jaff
e6d48d91ce bump version + check_valid_key 2023-09-12 11:56:04 -07:00
ishaan-jaff
33f0da2d69 update testing key 2023-09-12 11:50:30 -07:00
ishaan-jaff
ff36b9c6da add test_valid_key to utils 2023-09-12 11:45:55 -07:00
ishaan-jaff
a48cb49820 add test for test_get_valid_models 2023-09-12 11:29:18 -07:00
ishaan-jaff
dda87a55ff rename safe_messages to trim_messages 2023-09-11 18:54:18 -07:00
ishaan-jaff
be5a92c40a add safe_message trimmer 2023-09-11 17:58:37 -07:00
ishaan-jaff
bcb89dcf4a add test cases for token trimmer 2023-09-11 17:58:37 -07:00