Commit graph

96 commits

Author SHA1 Message Date
Krish Dholakia
fa2d8bc794 Merge pull request #4216 from BerriAI/litellm_refactor_logging
refactor(utils.py): Cut down utils.py to <10k lines.
2024-06-15 15:19:42 -07:00
Krrish Dholakia
9d7f5d503c refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
Easier debugging

 Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Ishaan Jaff
113b7e34ce refactor to use _get_async_httpx_client 2024-06-14 21:30:42 -07:00
Ishaan Jaff
d19efd62cf fix async client 2024-06-14 21:12:32 -07:00
Ishaan Jaff
56cd405972 cache anthropic httpx client 2024-06-14 20:55:40 -07:00
Krrish Dholakia
8b1b0f6f70 fix(anthropic.py): fix anthropic async streaming
pass the 'stream' param to the httpx call

Addresses https://github.com/BerriAI/litellm/issues/3728#issuecomment-2143985104
2024-06-02 16:01:44 -07:00
Krrish Dholakia
ccee9e4eb1 fix(anthropic.py): fix parallel streaming on anthropic.py
prevent parallel requests from cancelling each other

Fixes https://github.com/BerriAI/litellm/issues/3881
2024-05-28 16:29:09 -07:00
Krrish Dholakia
4795c56f84 feat(anthropic.py): support anthropic 'tool_choice' param
Closes https://github.com/BerriAI/litellm/issues/3752
2024-05-21 17:50:44 -07:00
Krrish Dholakia
8405fee205 fix(anthropic.py): bump default anthropic api version for tool use 2024-05-17 00:41:11 -07:00
Ishaan Jaff
32815b06cb feat: Anthropic allow users to set anthropic-beta in headers 2024-05-16 14:40:31 -07:00
Krrish Dholakia
9b10ba649f fix(anthropic.py): fix tool calling + streaming issue 2024-05-11 20:15:36 -07:00
Krrish Dholakia
2b1c22f088 fix(anthropic.py): compatibility fix 2024-05-11 19:51:29 -07:00
Krrish Dholakia
cfab989abf fix(anthropic.py): fix version compatibility 2024-05-11 19:46:26 -07:00
Krrish Dholakia
6018c8ab77 fix(anthropic.py): fix linting error 2024-05-11 19:42:14 -07:00
Krrish Dholakia
bd0c3a81cb fix(bedrock_httpx.py): working async bedrock command r calls 2024-05-11 16:45:20 -07:00
Krrish Dholakia
5f93cae3ff feat(proxy_server.py): return litellm version in response headers 2024-05-08 16:00:08 -07:00
Krrish Dholakia
344353d363 fix(anthropic.py): remove raise error on 'empty content'
Fixes https://github.com/BerriAI/litellm/issues/3453
2024-05-06 11:42:09 -07:00
Krrish Dholakia
80a1344c55 fix(utils.py): anthropic error handling 2024-05-06 07:25:12 -07:00
Krrish Dholakia
4efaacc5ce fix(anthropic.py): handle whitespace characters for anthropic calls 2024-05-03 17:31:34 -07:00
Krrish Dholakia
d06702cbf4 fix(anthropic.py): drop unsupported non-whitespace character value when calling anthropic with stop sequences
Fixes https://github.com/BerriAI/litellm/issues/3286
2024-05-03 16:59:49 -07:00
Josh Mandel
7115f74ca6 fix: Stream completion responses from anthropic. (Fix 3129) 2024-04-19 16:13:19 -05:00
Ishaan Jaff
833a64455f ci/cd run async handler 2024-04-06 19:16:27 -07:00
Ishaan Jaff
1dc5b01e01 fix - use anthropic class for clients 2024-04-06 18:19:28 -07:00
Ishaan Jaff
3c10bfb497 async streaming anthropic 2024-04-06 17:53:06 -07:00
Ishaan Jaff
32c3aab34e feat - make anthropic async 2024-04-06 15:50:13 -07:00
Krish Dholakia
9912a80190 Merge pull request #2855 from Caixiaopig/fix_update_default_claude3_maxtokens
Updating the default Anthropic Officlal Claude 3 max_tokens to 4096
2024-04-06 08:39:55 -07:00
Caixiaopig
aa2a1389da Updating the default Anthropic Officlal Claude 3 max_tokens to 4096
fix bug
2024-04-05 09:45:57 -05:00
Zihao Li
017abaa452 Clean up imports of XML processing functions 2024-04-05 22:36:18 +08:00
Zihao Li
4d0975bf4e Move tool definitions from system prompt to parameter and refactor tool calling parse 2024-04-05 16:01:40 +08:00
Caixiaopig
7eb9abba2b Updating the default Anthropic Claude 3 max_tokens to 4096
The default value of max_tokens used to be 256. If the client does not set a larger value, the model's output may be truncated, so the default value has been changed to 4096. This value is also the maximum output value described in the official interface.
see: https://docs.anthropic.com/claude/reference/messages_post
2024-04-05 14:44:40 +08:00
Krrish Dholakia
69f27aa25c fix(factory.py): parse list in xml tool calling response (anthropic)
improves tool calling outparsing to check if list in response. Also returns the raw response back to the user via `response._hidden_params["original_response"]`, so user can see exactly what anthropic returned
2024-03-29 11:51:26 -07:00
Krrish Dholakia
16368fec98 fix(anthropic.py): support async claude 3 tool calling + streaming
https://github.com/BerriAI/litellm/issues/2644
2024-03-22 19:57:01 -07:00
Krrish Dholakia
4dad400b57 fix(anthropic.py): handle multiple system prompts 2024-03-22 18:14:15 -07:00
lucasmrdt
a50b4fb485 fix(anthropic): tool calling detection 2024-03-16 16:06:38 -07:00
Krrish Dholakia
cc36028a76 fix(anthropic.py): add more logging 2024-03-12 21:18:38 -07:00
Krrish Dholakia
c871d61218 fix(anthropic.py): bug fix 2024-03-12 19:32:42 -07:00
Krrish Dholakia
2877bb7e0a fix(anthropic.py): concurrent request fix 2024-03-12 19:25:05 -07:00
Krrish Dholakia
709f6d6fd2 test(anthropic.py): more logging for test 2024-03-12 19:07:52 -07:00
Krrish Dholakia
7c71463d4a test: add more logging for failing test 2024-03-12 11:15:14 -07:00
Krrish Dholakia
0f77f5b6f9 fix(anthropic.py): fix linting errors 2024-03-12 10:23:56 -07:00
Krrish Dholakia
ed2ccf3ad6 fix(anthropic.py): fix streaming 2024-03-12 09:56:26 -07:00
Krrish Dholakia
1c6438c267 fix(anthropic.py): support streaming with function calling 2024-03-12 09:52:11 -07:00
Krrish Dholakia
6d90a02f0a fix(anthropic.py): deep copy messages before popping system prompt 2024-03-09 18:42:13 -08:00
Krrish Dholakia
dd544d0062 test(test_add_function_to_prompt.py): skip as anthropic now supports tool calling 2024-03-04 18:31:18 -08:00
Krrish Dholakia
174cb268d6 refactor(anthropic.py): fix linting error 2024-03-04 13:58:43 -08:00
Krrish Dholakia
83d527f047 fix(test_completion.py): testing for anthropic function calling 2024-03-04 11:31:56 -08:00
Krrish Dholakia
1e2154317c feat(anthropic.py): adds tool calling support 2024-03-04 10:42:28 -08:00
Krrish Dholakia
fed3f98582 fix(anthropic.py): support anthropic system prompt 2024-03-04 10:11:29 -08:00
ishaan-jaff
4a4c4e3466 (test) claude fixes 2024-03-04 08:20:26 -08:00
ishaan-jaff
1defd7b50f (feat) claude-3 test fixes 2024-03-04 07:53:06 -08:00