CA
flat-fuchsia
Getting error from Axios
Hi, I am following the sample code from langchain site https://js.langchain.com/docs/modules/indexes/document_loaders/examples/web_loaders/apify_dataset and I am getting into error. Any idea what could be wrong?
Apify Dataset | 🦜️🔗 Langchain
This guide shows how to use Apify with LangChain to load documents from an Apify Dataset.
9 Replies
judicial-coral•3y ago
Hey there? Could you please elaborate - which exactly example are you following there? Did you already create an Apify acc. and ran an actor there? Would be great if you could provide more details.
flat-fuchsiaOP•3y ago
Absolutely. I'm following second example from the page I linked, nodejs example of loading data from the existing dataset (therefore, yes, I ran the actor and scraped the web successfully). Basically the only difference is that I've turned the example to the nestjs service. I'll remove the hardcoded security and share the code
flat-fuchsiaOP•3y ago
here is the repo: https://github.com/vorcigernix/apifipt
GitHub
GitHub - vorcigernix/apifipt
Contribute to vorcigernix/apifipt development by creating an account on GitHub.
judicial-coral•2y ago
Thanks, sent to the team for furhter investigation!
hey, sorry for late reply, was rather sick for a couple of days. Response from one of our devs (not much news though):
I'm sorry but I can't get much out of the error. Can he wrap stuff inside the askGPT method in https://github.com/vorcigernix/apifipt/blob/master/src/app.service.ts in try-catch blocks to determine which part of the code is failing?
flat-fuchsiaOP•2y ago
No worries
lemme check
The error is in last function that call the chain. More specific error is:
judicial-coral•2y ago
Thanks! Passed to the team for further investigation 👍
Hello @Vorcigernix ,
I am curious, and maybe I am missing something.
Based on the error is see your variable
chain
is undefined
. The instance is constructed based on model
and vectorStore
. Non of these are related to the Apify enviroment right?flat-fuchsiaOP•2y ago
Yeah, correct. Can't figure out why though. But nvm, I gave up on this.
@Vorcigernix just advanced to level 1! Thanks for your contributions! 🎉