Commit graph

1263 commits

Author SHA1 Message Date
Krrish Dholakia
2dd616bad0 fix(ollama_chat.py): fix passing assistant message with tool call param
Fixes https://github.com/BerriAI/litellm/issues/5319
2024-08-22 10:00:03 -07:00
Ishaan Jaff
0435101df4 add multi modal vtx embedding 2024-08-21 15:05:59 -07:00
Ishaan Jaff
be6eb52036 add initial support for multimodal_embedding vertex 2024-08-21 14:29:05 -07:00
Krish Dholakia
85c5d4f8c2 Merge branch 'main' into litellm_fix_azure_api_version 2024-08-20 11:40:53 -07:00
Krrish Dholakia
bc0710a3e6 fix(main.py): response_format typing for acompletion
Fixes https://github.com/BerriAI/litellm/issues/5239
2024-08-20 08:14:14 -07:00
Krrish Dholakia
d08479b52c feat(azure.py): support dynamic api versions
Closes https://github.com/BerriAI/litellm/issues/5228
2024-08-19 12:17:43 -07:00
Krish Dholakia
0916197c9d Merge pull request #5244 from BerriAI/litellm_better_error_logging_sentry
refactor: replace .error() with .exception() logging for better debugging on sentry
2024-08-16 19:16:20 -07:00
Krrish Dholakia
9efe9982f5 fix(health_check.py): return 'missing mode' error message, if error with health check, and mode is missing 2024-08-16 17:24:29 -07:00
Krrish Dholakia
2874b94fb1 refactor: replace .error() with .exception() logging for better debugging on sentry 2024-08-16 09:22:47 -07:00
Ishaan Jaff
953a67ba4c refactor sagemaker to be async 2024-08-15 18:18:02 -07:00
Krrish Dholakia
3026e69926 fix(utils.py): support calling openai models via azure_ai/ 2024-08-14 13:41:04 -07:00
Krrish Dholakia
3fd02a1587 fix(main.py): safely fail stream_chunk_builder calls 2024-08-10 10:22:26 -07:00
Krrish Dholakia
5357bd7799 docs(main.py): clarify 'num_retries' usage 2024-08-09 16:57:06 -07:00
Krrish Dholakia
abda7e37ec fix(utils.py): set max_retries = num_retries, if given 2024-08-09 16:54:54 -07:00
Ishaan Jaff
0561c06bcf fix cohere / cohere_chat when timeout is None 2024-08-09 12:10:02 -07:00
Krish Dholakia
ab487f0cf9 Merge pull request #5079 from BerriAI/litellm_add_pydantic_model_support
feat(utils.py): support passing response_format as pydantic model
2024-08-07 14:43:05 -07:00
Krish Dholakia
78d72acc44 Merge branch 'main' into litellm_anthropic_streaming_tool_call_fix 2024-08-07 14:33:30 -07:00
Krrish Dholakia
661529beb7 fix(main.py): fix linting error for python3.8 2024-08-07 13:21:35 -07:00
Krish Dholakia
77a33baabb Merge branch 'main' into litellm_add_pydantic_model_support 2024-08-07 13:07:46 -07:00
Krrish Dholakia
ec4051592b fix(anthropic.py): handle scenario where anthropic returns invalid json string for tool call while streaming
Fixes https://github.com/BerriAI/litellm/issues/5063
2024-08-07 09:24:11 -07:00
Ishaan Jaff
7d6d7f2bab fix use extra headers for open router 2024-08-07 08:15:05 -07:00
Krrish Dholakia
2b132c6bef feat(utils.py): support passing response_format as pydantic model
Related issue - https://github.com/BerriAI/litellm/issues/5074
2024-08-06 18:16:07 -07:00
Krrish Dholakia
8a671aa20b fix(main.py): log hidden params for text completion calls 2024-08-05 21:26:48 -07:00
Krrish Dholakia
8500f6d087 feat(caching.py): enable caching on provider-specific optional params
Closes https://github.com/BerriAI/litellm/issues/5049
2024-08-05 11:18:59 -07:00
Krish Dholakia
88a2428ee6 Merge branch 'main' into litellm_anthropic_api_streaming 2024-08-03 21:16:50 -07:00
Krrish Dholakia
5810708c71 feat(anthropic_adapter.py): support streaming requests for /v1/messages endpoint
Fixes https://github.com/BerriAI/litellm/issues/5011
2024-08-03 20:16:19 -07:00
Joe Cheng
fa9298d588 Use correct key name 2024-08-03 11:58:46 -07:00
Joe Cheng
b4df896ac9 Fix tool call coalescing
The previous code seemed to assume that the tool call index property
started at 0, but Anthropic sometimes returns them starting at 1.
This was causing an extra null-ish tool call to be materialized.
2024-08-02 13:05:23 -07:00
Joe Cheng
0f301a120f fix(main.py): Handle bedrock tool calling in stream_chunk_builder
Fixes #5022.

The streaming chunks from Anthropic seem to violate an assumption
that is implicit in the stream_chunk_builder implementation: that
only tool_calls OR function_calls OR content will appear in a
streamed response. The repro in #5022 shows that you can get
content followed by tool calls.

These changes properly handle these combinations by building
separate lists of each type of chunk (note that in theory a chunk
could appear in multiple lists, e.g. both delta.tool_calls and
delta.content being present on one chunk).
2024-08-02 12:41:13 -07:00
Krish Dholakia
0fc50a69ee Merge branch 'main' into litellm_fix_streaming_usage_calc 2024-08-01 21:29:04 -07:00
Krrish Dholakia
a072edaf0b fix(vertex_ai_partner.py): add /chat/completion codestral support
Closes https://github.com/BerriAI/litellm/issues/4984
2024-08-01 18:06:40 -07:00
Krrish Dholakia
4972c993a2 fix(main.py): fix linting error 2024-08-01 17:33:29 -07:00
Krrish Dholakia
cb9b19e887 feat(vertex_ai_partner.py): add vertex ai codestral FIM support
Closes https://github.com/BerriAI/litellm/issues/4984
2024-08-01 17:10:27 -07:00
Krrish Dholakia
2121738137 fix(vertex_ai_partner.py): add /chat/completion codestral support
Closes https://github.com/BerriAI/litellm/issues/4984
2024-08-01 16:12:05 -07:00
Krrish Dholakia
a502914f13 fix(utils.py): fix anthropic streaming usage calculation
Fixes https://github.com/BerriAI/litellm/issues/4965
2024-08-01 14:45:54 -07:00
Krish Dholakia
ee375edcbf Merge branch 'main' into litellm_async_cohere_calls 2024-07-30 15:35:20 -07:00
Krrish Dholakia
3a92468765 fix(cohere.py): support async cohere embedding calls 2024-07-30 14:49:07 -07:00
Krrish Dholakia
b29d2fcd7c fix(main.py): fix linting error 2024-07-30 13:55:04 -07:00
Krrish Dholakia
17ac0f0636 feat(huggingface_restapi.py): Support multiple hf embedding types + async hf embeddings
Closes https://github.com/BerriAI/litellm/issues/3261
2024-07-30 13:32:03 -07:00
Krrish Dholakia
e3c02a1754 docs(main.py): update acompletion_with_retries docstring
Closes https://github.com/BerriAI/litellm/issues/4908
2024-07-29 15:50:12 -07:00
Krish Dholakia
166a07a869 Merge pull request #4943 from dleen/logs
Fix: #4942. Remove verbose logging when exception can be handled
2024-07-29 12:12:28 -07:00
David Leen
394ff28033 Fix: #4942. Remove verbose logging when exception can be handled 2024-07-29 12:05:10 -07:00
Krrish Dholakia
7de70a19e4 fix(exceptions.py): use correct status code for content policy exceptions
Fixes https://github.com/BerriAI/litellm/issues/4941#issuecomment-2256578732
2024-07-29 12:01:54 -07:00
Krish Dholakia
1c50339580 Merge pull request #4925 from BerriAI/litellm_vertex_mistral
feat(vertex_ai_partner.py): Vertex AI Mistral Support
2024-07-27 21:51:26 -07:00
Krish Dholakia
0525fb75f3 Merge branch 'main' into litellm_vertex_migration 2024-07-27 20:25:12 -07:00
Ishaan Jaff
b6b8bb4f02 fix checking mode on health checks 2024-07-27 20:21:39 -07:00
Krrish Dholakia
56ba0c62f3 feat(utils.py): fix openai-like streaming 2024-07-27 15:32:57 -07:00
Krrish Dholakia
ce7257ec5e feat(vertex_ai_partner.py): initial working commit for calling vertex ai mistral
Closes https://github.com/BerriAI/litellm/issues/4874
2024-07-27 12:54:14 -07:00
Krrish Dholakia
a2de16582a fix(custom_llm.py): pass input params to custom llm 2024-07-25 19:03:52 -07:00
Krrish Dholakia
bf23aac11d feat(utils.py): support sync streaming for custom llm provider 2024-07-25 16:47:32 -07:00