mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
multiple: permit optional fields on multimodal content blocks (#30887)
Instead of stuffing provider-specific fields in `metadata`, they can go directly on the content block.
This commit is contained in:
@@ -96,7 +96,7 @@ class TestOpenAIStandard(ChatModelIntegrationTests):
|
||||
"source_type": "base64",
|
||||
"mime_type": "application/pdf",
|
||||
"data": pdf_data,
|
||||
"metadata": {"filename": "my-pdf"}, # OpenAI requires a filename
|
||||
"filename": "my-pdf", # OpenAI requires a filename
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
@@ -676,7 +676,7 @@ def test_format_message_content() -> None:
|
||||
"source_type": "base64",
|
||||
"data": "<base64 data>",
|
||||
"mime_type": "application/pdf",
|
||||
"metadata": {"filename": "my_file"},
|
||||
"filename": "my_file",
|
||||
}
|
||||
]
|
||||
expected = [
|
||||
|
||||
Reference in New Issue
Block a user