mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
fix: jsonToNode for image nodes (#2017)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@llamaindex/core": patch
|
||||
---
|
||||
|
||||
fix: jsonToNode for image nodes
|
||||
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user