mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 04:14:46 +08:00
- Change image result type from 'image' to 'image_url' to match OpenAI API expectations
- Wrap image URL in dict structure: {"url": "..."} instead of plain string
- Update SearchResultPostProcessor to handle dict-based image_url during duplicate removal
- Update tests to validate new image format
This fixes the 400 error: Invalid value: 'image'. Supported values are: 'text', 'image_url'...
Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>
This commit is contained in:
@@ -166,8 +166,8 @@ class TestEnhancedTavilySearchAPIWrapper:
|
||||
|
||||
# Test image result
|
||||
image_result = result[1]
|
||||
assert image_result["type"] == "image"
|
||||
assert image_result["image_url"] == "https://example.com/image.jpg"
|
||||
assert image_result["type"] == "image_url"
|
||||
assert image_result["image_url"] == {"url": "https://example.com/image.jpg"}
|
||||
assert image_result["image_description"] == "Test image description"
|
||||
|
||||
def test_clean_results_without_raw_content(self, wrapper):
|
||||
|
||||
Reference in New Issue
Block a user