util/convex is not exported by package "langchain"
I have this error. I use tutorial for some llm staff. i need create in folder convex - folder langchain and write this code
but i have problem - Cannot find module 'langchain/util/convex' or its corresponding type declarations.ts(2307)
23 Replies
Do you have langchain community installed
I think langchain automatically installs that
should just need to
npm i langchain
hmm maybe not looking at the sourceyes. i look in folder langchain/util and dont see file this name convex
it would be in your node_modules, not your project source
yes, i know
I think v is right, you'll need to install @langchain/community explicitly, just curious why the convex tutorial and example repo doesn't mention this
I'm going to boot up on PC and see
i install langchain and langchain/community too
Hmmm
If this is broken in recent langchain version you could downgrade to the version used in our demos:
"langchain": "0.0.189",
https://github.com/get-convex/convex-ai-chat-langchain
GitHub
GitHub - get-convex/convex-ai-chat-langchain: AI chat with context ...
AI chat with context retrieval using Convex and LangChain - get-convex/convex-ai-chat-langchain
That's package locked directly to 0.0.189, I believe that semver range will currently resolve to latest (0.2), which has this issue. May need to pin 0.0.189.
But pretty sure it's not broken, just dependencies have moved.
maybe changed path
@Yevhenii TS,React,Next js try
export * from '@langchain/community/util/convex
actually it's "utils", pluralUNPKG - @langchain/community
The CDN for @langchain/community
export * from "@langchain/community/utils/convex";
does this not work for you?
yes . thx. convex should fix docs
also langchain
also erquhart said this first
i was just repeating what he said, hes the goat
thx for help)
thanks guys, now my app working. convex and langchain fix this pls
i made an issue on the langchain github
ig i could make a pr
my pr was merged https://js.langchain.com/v0.2/docs/integrations/vectorstores/convex/
Convex | 🦜️🔗 Langchain
LangChain.js supports Convex as a vector store, and supports the standard similarity search.
I put up a PR to update the template repo - anyone care to see if I missed anything? https://github.com/get-convex/convex-ai-chat-langchain/pull/3
GitHub
Upgrade by ianmacartney · Pull Request #3 · get-convex/convex-ai-ch...
Seems to be working with latest langchain
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.