fix: jsonToNode for image nodes (#2017)

This commit is contained in:
Marcus Schiesser
2025-06-12 11:59:05 +07:00
committed by GitHub
parent fffe93fac8
commit 1b5af1402d
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/core": patch
---
fix: jsonToNode for image nodes
+2
View File
@@ -347,6 +347,8 @@ export function jsonToNode(json: any, type?: ObjectType) {
return new Document(json);
case ObjectType.IMAGE_DOCUMENT:
return new ImageDocument(json);
case ObjectType.IMAGE:
return new ImageNode(json);
default:
throw new Error(`Invalid node type: ${nodeType}`);
}