How to make jupyter notebook with Deno do import langchain

Hi, I am trying to run the examples locally, but can’t find how to configure the jupyter notebook with Deno to do import like

import { ChatOpenAI } from “@langchain/openai”;

I have a running jupyter with the Deno kernel, but cant import langchaing

Thanks

2 Likes

I am having the same problem when trying to use it in a jupyter notebook.

Code:

import { GithubRepoLoader } from "@langchain/document_loaders/web/github";

Error:

Stack trace:
TypeError: Relative import path "@langchain/document_loaders/web/github" not prefixed with / or ./ or ../
    at async <anonymous>:1:51

I managed to solve the problem by importing directly from the URL:

import { GithubRepoLoader } from "https://esm.sh/langchain@0.1.4/document_loaders/web/github";