blogs icon indicating copy to clipboard operation
blogs copied to clipboard

issue observed when using get_subsequent_chunk_id function in graphreader langgraph notebook

Open jun-li-2020 opened this issue 1 year ago • 2 comments

When running through the graphreader_langgraph notebook, I observed around one out of five chances so far the get_subsequent_chunk_id function below will have this error ClientError: {code: Neo.ClientError.Statement.ParameterMissing} {message: Expected parameter(s): id}. In this example, I have six available actions. Chosen action: {'function_name': 'read_chunk', 'arguments': [['9999fbec5c990d4898b35522343e4eba', 'ddbf9deb5119c6fb9678998578f952cd', '4b3aa3854130edc1178f56a5fc746b32', 'acdd065f5684436bfa685ac0aeadb014', 'e6170aaa2c9d96929b03ad0e2c22902a', '9740f3bff8d39959e0a479c3f61ee072']]}. It went through 4 actions, but showed up above error. Looking at the function below, presumably it tried to match next.id. For some reason, this chunk was missing the id I guess. Not sure what could happen during the graphreader_import notebook where the id was accidentally dropped or missing.

def get_subsequent_chunk_id(chunk): data= neo4j_graph.query(""" MATCH (c:Chunk)-[:NEXT]->(next) WHERE c.id = $id RETURN next.id AS next """)"

jun-li-2020 avatar Nov 27 '24 02:11 jun-li-2020

I am facing the same issue? Any solution you got?

Satishpas2 avatar Dec 25 '24 06:12 Satishpas2

It was just simply missing params={"id": chunk} in the above graph query function.

jun-li-2020 avatar Dec 25 '24 17:12 jun-li-2020