Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
Empty nodes list trying to fetch all nodes from get_llama_nodes method
  • Loading branch information
abhishekshingadiya authored Oct 9, 2024
1 parent 65946eb commit fcd067b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ async def async_add_source_text(

def _retrieve(self, query_bundle: QueryBundle) -> List[NodeWithScore]:
nodes = self.retrieve_from_graph(query_bundle)
if self.include_text:
if self.include_text and nodes:
nodes = self.add_source_text(nodes)
return nodes

async def _aretrieve(self, query_bundle: QueryBundle) -> List[NodeWithScore]:
nodes = await self.aretrieve_from_graph(query_bundle)
if self.include_text:
if self.include_text and nodes:
nodes = await self.async_add_source_text(nodes)
return nodes

Expand Down

0 comments on commit fcd067b

Please sign in to comment.