Skip to content

Commit

Permalink
fix image_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceceliachenen committed Jan 17, 2025
1 parent 8696675 commit c4a51e2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Markdown node parser."""
from llama_index.core.bridge.pydantic import Field, BaseModel
from typing import Any, Iterator, List, Optional, Sequence
import json

from llama_index.core.node_parser.interface import NodeParser
from llama_index.core.node_parser import SentenceSplitter
Expand Down Expand Up @@ -88,7 +87,7 @@ def _format_tree_nodes(
)
nodes_list.append(image_node)
image_info = ImageInfo(image_url=node.content)
chunk_images_list.append(json.dumps(image_info.__dict__))
chunk_images_list.append(image_info.__dict__)
return ""
if not node.children:
return node.content
Expand Down Expand Up @@ -249,7 +248,7 @@ def traverse_tree(
)
nodes_list.append(image_node)
image_info = ImageInfo(image_url=child.content)
chunk_images_list.append(json.dumps(image_info.__dict__))
chunk_images_list.append(image_info.__dict__)
else:
chunk_text += "\n" + self._format_tree_nodes(
child, doc_node, ref_doc, nodes_list, chunk_images_list
Expand Down

0 comments on commit c4a51e2

Please sign in to comment.