I am currently running the ai beta through Railway.app, using a dockerfile in a github repo.
Langchain runs great!
So now I want to use a custom langchain code node to retrieve relevant documents with relevancy score.
/**
* Search for the most similar documents to a query,
* and return their similarity score
*/
similaritySearchWithScore(
query: string,
k = 4,
filter: object | undefined = undefined
): Promise<[object, number][]>;
Hi @Jelle_de_Rijke, from quickly taking a look at the n8n codebase it doesn’t look like n8n calls Supabase through a custom package, but instead simply sends the required HTTP requests directly to the Supabase API.
So if you’d like to use the @supabase/supabase-js you’d to install it first, then allow n8n to use it by setting the NODE_FUNCTION_ALLOW_EXTERNALenvironment variable.
Oh shoot, you’re right. I was only looking at the release version, not the AI beta . Sorry for the confusion.
Did you allow the use of this npm module through the environment variable? Perhaps @oleg can confirm if there are any other steps needed to use the module as part of n8n’s langchain functionality?
I have now set my env variables in railway like so:
I also tried adding them to the dockerfile.
But after redeploying I still get the same error. Perhaps I don’t understand correctly what you mean. I have used these docs: Configuration methods | n8n Docs
Thanks for any input in this regard. Super excited to try out Langchainjs in n8n instead of using Langchain Python in vscode!