Replies: 2 comments 4 replies
-
The issue you're encountering is due to the The input_key: str = "query" #: :meta private: This means that the chain expects the input dictionary to have a key named @property
def input_keys(self) -> List[str]:
return [self.input_key] Therefore, when you pass the input dictionary to the principle_nodes = chain.invoke(input={'schema': graph_schema, 'query': question}) This ensures that the input keys are correctly mapped to what the Regarding the schema being passed correctly, the To summarize:
This adjustment should resolve the input key mapping issue you're experiencing [1]. |
Beta Was this translation helpful? Give feedback.
-
Many Thanks the following is invaluable from langchain.globals import set_debug |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
@dosubot Have a lack of understanding why the following code does not work
The inputs from the invoke, should be mapped to the input_variables of the CYPHER_GENERATION_PROMPT as schema and question but it fails with the following error
In response , changing question to query the program works
@dosubot Why are the inputs names in the dict not mapped one for one to the input_variables of the prompt, and is the schema actual being passed
System Info
langchain==0.2.5
langchain-community==0.2.5
langchain-core==0.2.7
langchain-experimental==0.0.61
langchain-google-vertexai==1.0.5
langchain-openai==0.1.8
langchain-pinecone==0.1.1
langchain-text-splitters==0.2.1
MAC M2 Sonoma 14.5
Beta Was this translation helpful? Give feedback.
All reactions