mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 22:19:08 +08:00
Fixed: Run failed: Failed to invoke tool: File.__init__() got an unexpected keyword argument (#14073)
Co-authored-by: hobo.l <hobo.l@binance.com>
This commit is contained in:
parent
947c9f70fb
commit
63ea6f1ecf
@ -63,7 +63,9 @@ class File(BaseModel):
|
|||||||
extension: Optional[str] = None,
|
extension: Optional[str] = None,
|
||||||
mime_type: Optional[str] = None,
|
mime_type: Optional[str] = None,
|
||||||
size: int = -1,
|
size: int = -1,
|
||||||
storage_key: str,
|
storage_key: Optional[str] = None,
|
||||||
|
dify_model_identity: Optional[str] = FILE_MODEL_IDENTITY,
|
||||||
|
url: Optional[str] = None,
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
id=id,
|
id=id,
|
||||||
@ -76,8 +78,10 @@ class File(BaseModel):
|
|||||||
extension=extension,
|
extension=extension,
|
||||||
mime_type=mime_type,
|
mime_type=mime_type,
|
||||||
size=size,
|
size=size,
|
||||||
|
dify_model_identity=dify_model_identity,
|
||||||
|
url=url,
|
||||||
)
|
)
|
||||||
self._storage_key = storage_key
|
self._storage_key = str(storage_key)
|
||||||
|
|
||||||
def to_dict(self) -> Mapping[str, str | int | None]:
|
def to_dict(self) -> Mapping[str, str | int | None]:
|
||||||
data = self.model_dump(mode="json")
|
data = self.model_dump(mode="json")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user