mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(types/utils.py): support openai 'file' message type
Closes https://github.com/BerriAI/litellm/issues/9365
This commit is contained in:
parent
fe24b9d90b
commit
8ef9129556
2 changed files with 33 additions and 0 deletions
|
@ -1094,6 +1094,26 @@ def test_is_base64_encoded_2():
|
|||
[
|
||||
([{"role": "user", "content": "hi"}], True),
|
||||
([{"role": "user", "content": [{"type": "text", "text": "hi"}]}], True),
|
||||
(
|
||||
[
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "file",
|
||||
"file": {
|
||||
"file_id": "123",
|
||||
"file_name": "test.txt",
|
||||
"file_size": 100,
|
||||
"file_type": "text/plain",
|
||||
"file_url": "https://example.com/test.txt",
|
||||
},
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
True,
|
||||
),
|
||||
(
|
||||
[
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue