Commit graph

14 commits

Author SHA1 Message Date
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