Commit graph

42 commits

Author SHA1 Message Date
Krish Dholakia
1a55827a0a test: replace gpt-3.5-turbo-0613 (deprecated model) (#5794) 2024-09-19 15:39:37 -07:00
Krrish Dholakia
e2249961cb fix(types/utils.py): handle null completion tokens
Fixes https://github.com/BerriAI/litellm/issues/5096
2024-08-10 09:23:03 -07:00
Krrish Dholakia
00dde68001 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
57584ce879 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
106f25625a 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
5bc8681412 fix(utils.py): correctly raise openrouter error 2024-06-28 21:50:21 -07:00
Krrish Dholakia
c7b06c42b7 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
ce06123417 test - test_get_llm_provider_ft_models 2024-06-19 16:51:51 -07:00
Krrish Dholakia
f47358ba1d test(test_utils.py): reset env after test complete 2024-06-17 20:33:39 -07:00
Krrish Dholakia
6482e57f56 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
bd05a0ca36 test(test_utils.py): fix import 2024-06-15 14:47:46 -07:00
Krrish Dholakia
af2aeb595d 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
417e25ae08 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
84a546e801 test test_redact_msgs_from_logs 2024-06-13 13:49:23 -07:00
James Braza
cab0e0e703 Added handling of unmapped provider, with test 2024-06-11 18:34:10 -07:00
James Braza
85b8724484 Added simple test of get_supported_openai_params with no custom provider 2024-06-11 18:18:21 -07:00
Krrish Dholakia
ecbb3c54c3 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
8b4bc4c832 include methods in init import, add test, fix encode/decode param ordering 2024-05-02 15:49:22 +10:00
Chen Wang
2567f9a3a6 Use max_input_token for trim_messages 2024-04-16 13:36:25 +01:00
Ishaan Jaff
c356173d73 test groq tool calling 2024-04-15 08:41:53 -07:00
Mikhail Khludnev
2686d0368e utils.validate_environment to handle OLLAMA_API_BASE env 2024-03-02 13:41:59 +03:00
ishaan-jaff
2ecb649302 (test) supports_function_calling 2024-02-28 17:51:34 -08:00
ishaan-jaff
86d1aabf22 (test) supports_function_calling 2024-02-28 17:36:15 -08:00
ishaan-jaff
ac19302d0d (test) stream chunk builder - azure prompt tokens 2023-12-29 15:45:41 +05:30
ishaan-jaff
95a98f5463 (test) test_token_counter_azure 2023-12-29 15:37:46 +05:30
ishaan-jaff
a20331e47a (test) token_counter - prompt tokens == tokens from API 2023-12-29 15:15:39 +05:30
Krrish Dholakia
79978c44ba refactor: add black formatting 2023-12-25 14:11:20 +05:30
Krrish Dholakia
6556f060f7 test: fix flaky test 2023-12-01 15:46:39 -08:00
ishaan-jaff
cf244fc5bf (test) token_counter 2023-11-13 08:02:46 -08:00
ishaan-jaff
ea2c029c50 (test) add test token counter 2023-11-13 07:42:08 -08:00
Duc Pham
61f2e37349 Reverted error while refactoring 2023-11-10 01:35:41 +07:00
Duc Pham
c74e6f8cdd Improved trimming logic and OpenAI token counter 2023-11-10 01:26:13 +07:00
Krrish Dholakia
743dda9724 fix(init.py): fix linting errors 2023-10-24 15:54:21 -07:00
ishaan-jaff
c0f7c7a001 (feat) new function_to_dict litellm.util 2023-10-14 18:26:15 -07:00
Krrish Dholakia
7f62b5b6e0 fix llama index validate environment error 2023-09-26 17:53:22 -07:00
ishaan-jaff
7d5f3c48c6 bump version + check_valid_key 2023-09-12 11:56:04 -07:00
ishaan-jaff
25e97882f0 update testing key 2023-09-12 11:50:30 -07:00
ishaan-jaff
78c7ad7c68 add test_valid_key to utils 2023-09-12 11:45:55 -07:00
ishaan-jaff
22fa1f6cd9 add test for test_get_valid_models 2023-09-12 11:29:18 -07:00
ishaan-jaff
9f1a8844cd rename safe_messages to trim_messages 2023-09-11 18:54:18 -07:00
ishaan-jaff
d0984d8c60 add safe_message trimmer 2023-09-11 17:58:37 -07:00
ishaan-jaff
df80e62566 add test cases for token trimmer 2023-09-11 17:58:37 -07:00