Krrish Dholakia
3560f0ef2c
refactor: move all testing to top-level of repo
...
Closes https://github.com/BerriAI/litellm/issues/486
2024-09-28 21:08:14 -07:00
Krish Dholakia
d46660ea0f
LiteLLM Minor Fixes & Improvements (09/18/2024) ( #5772 )
...
* fix(proxy_server.py): fix azure key vault logic to not require client id/secret
* feat(cost_calculator.py): support fireworks ai cost tracking
* build(docker-compose.yml): add lines for mounting config.yaml to docker compose
Closes https://github.com/BerriAI/litellm/issues/5739
* fix(input.md): update docs to clarify litellm supports content as a list of dictionaries
Fixes https://github.com/BerriAI/litellm/issues/5755
* fix(input.md): update input.md to include all message values
* fix(image_handling.py): follow image url redirects
Fixes https://github.com/BerriAI/litellm/issues/5763
* fix(router.py): Fix model key/base leak in error message
Fixes https://github.com/BerriAI/litellm/issues/5762
* fix(http_handler.py): fix linting error
* fix(azure.py): fix logging to show azure_ad_token being used
Fixes https://github.com/BerriAI/litellm/issues/5767
* fix(_redis.py): add redis sentinel support
Closes https://github.com/BerriAI/litellm/issues/4381
* feat(_redis.py): add redis sentinel support
Closes https://github.com/BerriAI/litellm/issues/4381
* test(test_completion_cost.py): fix test
* Databricks Integration: Integrate Databricks SDK as optional mechanism for fetching API base and token, if unspecified (#5746 )
* LiteLLM Minor Fixes & Improvements (09/16/2024) (#5723 )
* coverage (#5713 )
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* Move (#5714 )
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix(litellm_logging.py): fix logging client re-init (#5710 )
Fixes https://github.com/BerriAI/litellm/issues/5695
* fix(presidio.py): Fix logging_hook response and add support for additional presidio variables in guardrails config
Fixes https://github.com/BerriAI/litellm/issues/5682
* feat(o1_handler.py): fake streaming for openai o1 models
Fixes https://github.com/BerriAI/litellm/issues/5694
* docs: deprecated traceloop integration in favor of native otel (#5249 )
* fix: fix linting errors
* fix: fix linting errors
* fix(main.py): fix o1 import
---------
Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Corey Zumar <39497902+dbczumar@users.noreply.github.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
* feat(spend_management_endpoints.py): expose `/global/spend/refresh` endpoint for updating material view (#5730 )
* feat(spend_management_endpoints.py): expose `/global/spend/refresh` endpoint for updating material view
Supports having `MonthlyGlobalSpend` view be a material view, and exposes an endpoint to refresh it
* fix(custom_logger.py): reset calltype
* fix: fix linting errors
* fix: fix linting error
* fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix: fix import
* Fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* DB test
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* Coverage
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* progress
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix
Signed-off-by: dbczumar <corey.zumar@databricks.com>
* fix test name
Signed-off-by: dbczumar <corey.zumar@databricks.com>
---------
Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
* test: fix test
* test(test_databricks.py): fix test
* fix(databricks/chat.py): handle custom endpoint (e.g. sagemaker)
* Apply code scanning fix for clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix(__init__.py): fix known fireworks ai models
---------
Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Corey Zumar <39497902+dbczumar@users.noreply.github.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-09-19 13:25:29 -07:00
Krish Dholakia
f584021f7c
LiteLLM Minor Fixes and Improvements ( #5537 )
...
* fix(vertex_ai): Fixes issue where multimodal message without text was failing vertex calls
Fixes https://github.com/BerriAI/litellm/issues/5515
* fix(azure.py): move to using httphandler for oidc token calls
Fixes issue where ssl certificates weren't being picked up as expected
Closes https://github.com/BerriAI/litellm/issues/5522
* feat: Allows admin to set a default_max_internal_user_budget in config, and allow setting more specific values as env vars
* fix(proxy_server.py): fix read for max_internal_user_budget
* build(model_prices_and_context_window.json): add regional gpt-4o-2024-08-06 pricing
Closes https://github.com/BerriAI/litellm/issues/5540
* test: skip re-test
2024-09-05 18:03:34 -07:00
Krrish Dholakia
88b415c9eb
fix(factory.py): fix merging consecutive tool blocks for bedrock converse
...
Fixes https://github.com/BerriAI/litellm/issues/5277
2024-08-20 08:53:34 -07:00
Ishaan Jaff
9791352dc6
add testing for test_anthropic_cache_controls_pt
2024-08-14 14:07:48 -07:00
Ishaan Jaff
68e24fbf14
test passing cache controls through anthropic msg
2024-08-14 13:49:07 -07:00
Krrish Dholakia
da0413f0a4
fix(factory.py): handle openai function message having tool call id
2024-08-08 17:06:50 -07:00
Marc Abramowitz
a50fe3e1ca
Fix test_prompt_factory flake8 warning
...
```shell
$ poetry run flake8 litellm/tests/test_prompt_factory.py
<unknown>:215: SyntaxWarning: invalid escape sequence '\/'
litellm/tests/test_prompt_factory.py:215:21: W605 invalid escape sequence '\/'
```
Fixed by making the string a raw string, which is equivalent:
```
$ python
Python 3.11.6 (main, Oct 25 2023, 19:49:20) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> "data:image\/jpeg;base64,1234" == r"data:image\/jpeg;base64,1234"
True
```
See: https://stackoverflow.com/questions/52335970/how-to-fix-syntaxwarning-invalid-escape-sequence-in-python
2024-07-24 09:14:22 -07:00
Krrish Dholakia
30d6c1d171
fix(factory.py): handle escape characters in image url
...
prevents mimetype errors in vertex ai calls
2024-07-18 17:36:58 -07:00
Krrish Dholakia
9771edb302
fix(factory.py): use stronger typing for anthropic translation
...
Fixes https://github.com/BerriAI/litellm/issues/4738
2024-07-16 19:58:27 -07:00
Ishaan Jaff
03933de775
fix exception raised in factory.py
2024-07-13 09:54:32 -07:00
Krrish Dholakia
f15cb2bdc8
fix(factory.py): flexible handling of image file type in b64 encode
...
Fixes https://github.com/BerriAI/litellm/issues/4589
2024-07-08 09:46:47 -07:00
Krrish Dholakia
d66d35349f
test(test_prompt_factory.py): fix test
2024-07-03 22:16:03 -07:00
Krrish Dholakia
2faa6f704a
fix(factory.py): get image type from response headers
...
Fixes https://github.com/BerriAI/litellm/issues/4441
2024-06-27 18:19:16 -07:00
Krrish Dholakia
7d2230bd7f
test(test_prompt_factory.py): cleanup test
2024-06-07 12:07:15 -07:00
Krrish Dholakia
a995a0b172
fix(bedrock_httpx.py): working claude 3 function calling
2024-06-06 20:12:41 -07:00
Krrish Dholakia
df7db2b870
fix(factory.py): support llama3 instuct chat template
...
allows automatic templating for llama3 instruct requests
2024-04-24 20:35:10 -07:00
Stefan Dobrev
1cfea955aa
Fix Anthropic system message handling
2024-04-14 16:23:59 +03:00
spdustin@gmail.com
5d074f5b56
Adds tests and updates docs for Claude "pre-fill"
2024-01-05 22:58:41 +00:00
Krrish Dholakia
4905929de3
refactor: add black formatting
2023-12-25 14:11:20 +05:30
Krrish Dholakia
4b0f8825f3
fix(proxy_server): fix prompt template for proxy server
2023-10-11 21:08:42 -07:00