krishnaik06 / Complete-Langchain-Tutorials

GNU General Public License v2.0
351 stars 289 forks source link

{'output_text': 'Answer is not available in the context'} #4

Open saibalfb opened 9 months ago

saibalfb commented 9 months ago

chatmultipledocuments -- I try to run this code, but whatever question I am asking getting "{'output_text': 'Answer is not available in the context'}" this reply. I have checked google_api_key which is working fine. Index created, but getting the above reply. Please help me to know what went wrong.

RATHOD-SHUBHAM commented 9 months ago

First, try this: Increase the context length to 10000 in charactersplitter.

If that doesn't happen: Try changing response = chain( {"input_documents": docs, "question": query} , return_only_outputs=True) to response = chain.invoke( {"input_documents": docs, "question": query} , return_only_outputs=True).

I just wanted to let you know that this worked for me.

AMEERAZAM08 commented 8 months ago

@RATHOD-SHUBHAM its still same