diff --git a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/api_utils.py b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/api_utils.py index 63fdf79a042541b7ba22662b600d4b0068809a79..e90b68b9a5dbfe64ea2a0cc75570bd4a27894ab5 100644 --- a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/api_utils.py +++ b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/llama_index/indices/managed/llama_cloud/api_utils.py @@ -1,4 +1,4 @@ -from typing import Optional, Tuple, Union +from typing import Any, Optional, Tuple, Union, Dict import urllib.parse from httpx import Request @@ -197,8 +197,13 @@ async def aimage_nodes_to_node_with_score( image_bytes_list = await run_jobs(tasks) for image_bytes, raw_image_node in zip(image_bytes_list, raw_image_nodes): image_base64 = base64.b64encode(image_bytes).decode("utf-8") + image_node_metadata: Dict[str, Any] = { + "file_id": raw_image_node.node.file_id, + "page_index": raw_image_node.node.page_index, + } image_node_with_score = NodeWithScore( - node=ImageNode(image=image_base64), score=raw_image_node.score + node=ImageNode(image=image_base64, metadata=image_node_metadata), + score=raw_image_node.score, ) image_nodes.append(image_node_with_score) return image_nodes diff --git a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml index f967eca32286361984841a52c546042d4d5717f4..298588c94ce4d3a52b3dc1b363659f19e733ad5a 100644 --- a/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml +++ b/llama-index-integrations/indices/llama-index-indices-managed-llama-cloud/pyproject.toml @@ -34,7 +34,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-indices-managed-llama-cloud" readme = "README.md" -version = "0.6.5" +version = "0.6.6" [tool.poetry.dependencies] python = ">=3.9,<4.0"