News for hackers. Stuff that matters.
Re:Using LangChainJS and Cloudflare Workers together by tmikaeld on Thursday May 18, 2023 @03:28PM (#35992864)
Tried the github code, looks correct according to the article, but produces: TypeError: Cannot read properties of undefined (reading 'replaceAll')

Same error when tried in deno but with more details:

TypeError: Cannot read properties of undefined (reading 'replaceAll')

    at R.embedQuery (https://esm.sh/v122/[email protected]/deno/embeddings/openai.js:4:319)

    at u.similaritySearch (https://esm.sh/v122/[email protected]/deno/vectorstores/memory.js:2:896)
Re:Using LangChainJS and Cloudflare Workers together by shakes on Thursday May 18, 2023 @04:10PM (#35993419)
Hm.... Thanks for flagging. Taking a look now.
Re:Using LangChainJS and Cloudflare Workers together by tmikaeld on Friday May 19, 2023 @01:51AM (#35998258)
The reason was that I was using json for the input.url input.query - but for some reason, even thought it's just plain strings, it has this error, when i use query strings it just works.