fix: streamline file upload configuration handling in manager.py (#15714)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
5f9d236d22
commit
49c952a631
2 changed files with 11 additions and 9 deletions
|
|
@ -18,7 +18,9 @@ def test_convert_with_vision():
|
|||
number_limits=5,
|
||||
transfer_methods=[FileTransferMethod.REMOTE_URL],
|
||||
detail=ImagePromptMessageContent.DETAIL.HIGH,
|
||||
)
|
||||
),
|
||||
allowed_file_upload_methods=[FileTransferMethod.REMOTE_URL],
|
||||
number_limits=5,
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
|
@ -33,7 +35,9 @@ def test_convert_without_vision():
|
|||
}
|
||||
result = FileUploadConfigManager.convert(config, is_vision=False)
|
||||
expected = FileUploadConfig(
|
||||
image_config=ImageConfig(number_limits=5, transfer_methods=[FileTransferMethod.REMOTE_URL])
|
||||
image_config=ImageConfig(number_limits=5, transfer_methods=[FileTransferMethod.REMOTE_URL]),
|
||||
allowed_file_upload_methods=[FileTransferMethod.REMOTE_URL],
|
||||
number_limits=5,
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue