mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
fix: The url output by the list_operator is null
The url can be output in the first or last data obtained by list_operator. After reference, url is not a field of File model, but a field processed by self.generate_url(). However, the code uses the direct output of remote_url, which is often an incomplete field or null, so it is more reasonable to replace it with a field generated by generate_url()
This commit is contained in:
parent
62642443ef
commit
c83fbb789a
|
@ -176,7 +176,7 @@ def _get_file_extract_string_func(*, key: str) -> Callable[[File], str]:
|
|||
case "transfer_method":
|
||||
return lambda x: x.transfer_method
|
||||
case "url":
|
||||
return lambda x: x.remote_url or ""
|
||||
return lambda x: x.generate_url() or ""
|
||||
case _:
|
||||
raise InvalidKeyError(f"Invalid key: {key}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user