langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Request failed with status code 500

Open yashrajeshhiray opened this issue 2 years ago • 5 comments

Hi friends, image

I tried running this setup for the document question answering, its giving this error Error building node VectorStoreAgent: 1 validation error for VectorStoreToolkit llm Can't instantiate abstract class BaseLLM with abstract methods _agenerate, _generate, _llm_type (type=type_error)

also I am not able to integrate prompt template in this setup.

yashrajeshhiray avatar Apr 27 '23 09:04 yashrajeshhiray

Did you try with OpenAI instead of ChatOpenAI? (you would be using GTP3 instead of GPT4). I had to do that to make it work. I think there's issues with the chat version of OpenAI, which are now fixed in langchain, but langflow uses month old version of langchain where issues are still not resolved. I'm not 100% sure of this though, but was waiting for future releases where langchain version is bumped up to see if that fixes it. Edit: This is the langchain issue (still open and PR not merged yet) I found that might be the cause for the issues in Langflow, but I did not do any tests to confirm this, just a suspicion:

  • https://github.com/hwchase17/langchain/issues/1358
  • https://github.com/hwchase17/langchain/pull/1707

ATL64 avatar Apr 27 '23 10:04 ATL64

Thanks @ATL64 it works, but do you know how to integrate langchain with this setup?

yashrajeshhiray avatar Apr 27 '23 10:04 yashrajeshhiray

Haven't tried myself yet. Maybe this issue is related to your question https://github.com/logspace-ai/langflow/issues/206

ATL64 avatar Apr 27 '23 10:04 ATL64

@ATL64 thanks for pointing that out. We'll update the LangChain version to the most recent one today.

ogabrielluiz avatar Apr 27 '23 15:04 ogabrielluiz

@ogabrielluiz Nice. PR still not merged on Langchain side though, so not sure it will fix this particular issue. Worth a try I guess, and if not I will track their progress and ping you as soon as the fix is deployed on Langchain.

ATL64 avatar Apr 27 '23 16:04 ATL64

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 11 '23 23:06 stale[bot]