I'm having trouble retrieving source_nodes from my agent (Function Calling Agent Worker and Agent Runner). The code below was working previously, but now it fails to return the relevant nodes. I am not understanding the reason for it .
Code :- def get_text_nodes( nodes: List[NodeWithScore], ) -> List[NodeWithScore]: text_nodes = [] for res_node in nodes: text_nodes.append(res_node) return text_nodes
def relevant_nodes(response: AGENT_CHAT_RESPONSE_TYPE): text_nodes = get_text_nodes(response.source_nodes) # Extract the nodes from here,
Previously, I was able to successfully retrieve these source_nodes, but now I am getting an empty list.
It's because of using prompt template or else where is the issue I am not understanding , If possible you share some resources on getting source nodes when I am using (Function Calling Agent Worker and Agent Runner).