diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 96246412bff5..f42d9144fdbe 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -108,6 +108,6 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build
- run: yarn workspace langchain build
+ run: yarn workspace langchain-gpt4all build
- name: Test Exports
run: yarn run test:exports:docker
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 27a5fb20276b..cf0290ad739e 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -26,4 +26,4 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- run: yarn run ci
- - run: yarn workspace langchain run test:integration
+ - run: yarn workspace langchain-gpt4all run test:integration
diff --git a/.gitignore b/.gitignore
index 0ecedac18cd7..80ebbce2b39d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,7 @@ yarn-error.log
!.yarn/sdks
!.yarn/versions
-langchain/docs/
+langchain-gpt4all/docs/
.idea/
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 493a8f88b388..cb6ea76d8d64 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,10 +1,10 @@
{
"eslint.workingDirectories": [
- "./langchain",
+ "./langchain-gpt4all",
"./examples",
"./docs",
"./test-exports-vercel",
- "./test-exports-cra",
+ "./test-exports-cra"
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "./.github/workflows/deploy.yml"
diff --git a/.watchmanconfig b/.watchmanconfig
index ef1c9e09ff67..74d785372b5a 100644
--- a/.watchmanconfig
+++ b/.watchmanconfig
@@ -1,10 +1,10 @@
{
"ignore_dirs": [
- "langchain/dist",
- "langchain/dist-cjs",
+ "langchain-gpt4all/dist",
+ "langchain-gpt4all/dist-cjs",
"docs/build",
"node_modules",
- "langchain/.turbo",
+ "langchain-gpt4all/.turbo",
"docs/.turbo",
"test-exports/.turbo",
"test-exports-cjs/.turbo"
diff --git a/.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch b/.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch
index 03020c91b2c5..705a4e97d962 100644
--- a/.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch
+++ b/.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch
@@ -11,7 +11,7 @@ index 4346548126fcf7e3687f243ee53fd0456778c29c..73cefe121e927285d305d57e89f3c87f
+ typedoc_1.ReflectionKind.Module,
+ typedoc_1.ReflectionKind.Namespace,
+ ]) ? [
-+ "`langchain/" + (fullname ? reflection.getFullName() : reflection.name) + "`",
++ "`langchain-gpt4all/" + (fullname ? reflection.getFullName() : reflection.name) + "`",
+ ] : [
(0, utils_1.escapeChars)(fullname ? reflection.getFullName() : reflection.name),
];
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a736da2ea158..50f3d4e58490 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,8 +12,8 @@ To contribute to this project, please follow a ["fork and pull request"](https:/
If you are not sure what to work on, we have a few suggestions:
-- Look at the issues with the [help wanted](https://github.com/hwchase17/langchainjs/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label. These are issues that we think are good targets for new contributors. If you are interested in working on one of these, please comment on the issue so that we can assign it to you. And any questions let us know, we're happy to guide you!
-- At the moment our main focus is reaching parity with the Python version across both [integrations](https://langchain.com/integrations.html) and [features](https://langchain.com/features.html). If you are interested in working on a specific integration or feature, just pick anything from those lists not done yet, please let us know and we can help you get started.
+- Look at the issues with the [help wanted](https://github.com/lucasjohnston/langchainjs-gpt4all/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label. These are issues that we think are good targets for new contributors. If you are interested in working on one of these, please comment on the issue so that we can assign it to you. And any questions let us know, we're happy to guide you!
+- At the moment our main focus is reaching parity with the Python version across both [integrations](https://langchain-gpt4all.com/integrations.html) and [features](https://langchain-gpt4all.com/features.html). If you are interested in working on a specific integration or feature, just pick anything from those lists not done yet, please let us know and we can help you get started.
### New abstractions
@@ -23,7 +23,7 @@ We are currently trying to keep API parity between the Python and JS versions of
### 🚩GitHub Issues
-Our [issues](https://github.com/hwchase17/langchainjs/issues) page is kept up to date
+Our [issues](https://github.com/lucasjohnston/langchainjs-gpt4all/issues) page is kept up to date
with bugs, improvements, and feature requests. There is a taxonomy of labels to help
with sorting and discovery of issues of interest. These include:
@@ -61,7 +61,7 @@ good code into the codebase.
> TODO:
As of now, LangChain has an ad hoc release process: releases are cut with high frequency via by
-a developer and published to [npm](https://www.npmjs.com/package/langchain).
+a developer and published to [npm](https://www.npmjs.com/package/langchain-gpt4all).
LangChain follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).
@@ -194,13 +194,13 @@ level of the repo.
LangChain exposes multiple subpaths the user can import from, e.g.
```ts
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
We call these subpaths "entrypoints". In general, you should create a new entrypoint if you are adding a new integration with a 3rd party library. If you're adding self-contained functionality without any external dependencies, you can add it to an existing entrypoint.
In order to declare a new entrypoint that users can import from, you
-should edit the `langchain/scripts/create-entrypoints.js` script. To add an
+should edit the `langchain-gpt4all/scripts/create-entrypoints.js` script. To add an
entrypoint `tools` that imports from `tools/index.ts` you'd add
the following to the `entrypoints` variable:
diff --git a/LICENSE b/LICENSE
index d5c9d8189aa9..faeaf10a1194 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) Harrison Chase
+Copyright (c) Harrison Chase. GPT4All additions by Lucas Johnston.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
+THE SOFTWARE.
diff --git a/README.md b/README.md
index 8a5c38e2b5fc..4d56fd9ff35a 100644
--- a/README.md
+++ b/README.md
@@ -2,19 +2,19 @@
⚡ Building applications with LLMs through composability ⚡
-[![CI](https://github.com/hwchase17/langchainjs/actions/workflows/ci.yml/badge.svg)](https://github.com/hwchase17/langchainjs/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS)
+[![CI](https://github.com/lucasjohnston/langchainjs-gpt4all/actions/workflows/ci.yml/badge.svg)](https://github.com/lucasjohnston/langchainjs-gpt4all/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS)
-Looking for the Python version? Check out [LangChain](https://github.com/hwchase17/langchain).
+Looking for the Python version? Check out [LangChain](https://github.com/hwchase17/langchain-gpt4all).
**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.
Please fill out [this form](https://forms.gle/57d8AmXBYp8PP8tZA) and we'll set up a dedicated support Slack channel.
## Quick Install
-`yarn add langchain`
+`yarn add langchain-gpt4all`
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
## Supported Environments
@@ -39,13 +39,13 @@ This library is aimed at assisting in the development of those types of applicat
## 📖 Full Documentation
-For full documentation of prompts, chains, agents and more, please see [here](https://js.langchain.com/docs/).
+For full documentation of prompts, chains, agents and more, please see [here](https://js.langchain-gpt4all.com/docs/).
## Relationship with Python LangChain
-This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
+This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain-gpt4all). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
-The [LangChainHub](https://github.com/hwchase17/langchain-hub) is a central place for the serialized versions of these prompts, chains, and agents.
+The [LangChainHub](https://github.com/hwchase17/langchain-gpt4all-hub) is a central place for the serialized versions of these prompts, chains, and agents.
## 💁 Contributing
diff --git a/docker-compose.yml b/docker-compose.yml
index 9ec4ce3d0d62..694d7e61ae09 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,11 +1,11 @@
-version: '3'
+version: "3"
services:
test-exports-esbuild:
image: node:18
working_dir: /app
volumes:
- ./test-exports-esbuild:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-esm:
@@ -13,7 +13,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-esm:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-cjs:
@@ -21,7 +21,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-cjs:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-cra:
@@ -29,7 +29,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-cra:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-cf:
@@ -37,7 +37,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-cf:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-vercel:
@@ -45,7 +45,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-vercel:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-vite:
@@ -53,7 +53,7 @@ services:
working_dir: /app
volumes:
- ./test-exports-vite:/package
- - ./langchain:/langchain
+ - ./langchain-gpt4all:/langchain-gpt4all
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
success:
diff --git a/docs/code-block-loader.js b/docs/code-block-loader.js
index 044e4552dc8f..67850bb630f6 100644
--- a/docs/code-block-loader.js
+++ b/docs/code-block-loader.js
@@ -31,7 +31,7 @@ async function webpackLoader(content, map, meta) {
if (node.type === "ImportDeclaration") {
const source = node.source.value;
- if (!source.startsWith("langchain")) {
+ if (!source.startsWith("langchain-gpt4all")) {
return;
}
diff --git a/docs/docs/ecosystem/databerry.md b/docs/docs/ecosystem/databerry.md
index e5fabd04a5aa..ebf1248db852 100644
--- a/docs/docs/ecosystem/databerry.md
+++ b/docs/docs/ecosystem/databerry.md
@@ -13,7 +13,7 @@ Databerry is an [open source](https://github.com/gmpetrov/databerry) document re
Retrieving documents stored in Databerry from LangChain is very easy!
```typescript
-import { DataberryRetriever } from "langchain/retrievers/databerry";
+import { DataberryRetriever } from "langchain-gpt4all/retrievers/databerry";
const retriever = new DataberryRetriever({
datastoreUrl: "https://api.databerry.ai/query/clg1xg2h80000l708dymr0fxc",
diff --git a/docs/docs/ecosystem/unstructured.mdx b/docs/docs/ecosystem/unstructured.mdx
index b0272d2e2f2f..ced75b37e469 100644
--- a/docs/docs/ecosystem/unstructured.mdx
+++ b/docs/docs/ecosystem/unstructured.mdx
@@ -14,7 +14,7 @@ Currently (as of April 26th, 2023), the Unstructured API does not require an API
## Quick start
-You can use Unstructured in `langchain` with the following code.
+You can use Unstructured in `langchain-gpt4all` with the following code.
Replace the filename with the file you would like to process.
If you are running the container locally, switch the url to `http://127.0.0.1:8000/general/v0/general`.
Check out the [API documentation page](https://api.unstructured.io/general/docs) for additional details.
diff --git a/docs/docs/getting-started/guide-chat.mdx b/docs/docs/getting-started/guide-chat.mdx
index 6fd905753665..45ecf9f502dc 100644
--- a/docs/docs/getting-started/guide-chat.mdx
+++ b/docs/docs/getting-started/guide-chat.mdx
@@ -22,8 +22,8 @@ To get started, follow the [installation instructions](./install) to install Lan
This section covers how to get started with chat models. The interface is based around messages rather than raw text.
```typescript
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage, SystemChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage, SystemChatMessage } from "langchain-gpt4all/schema";
const chat = new ChatOpenAI({ temperature: 0 });
```
@@ -128,7 +128,7 @@ import {
SystemMessagePromptTemplate,
HumanMessagePromptTemplate,
ChatPromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
```
First we create a reusable template:
diff --git a/docs/docs/getting-started/guide-llm.mdx b/docs/docs/getting-started/guide-llm.mdx
index 59c969f42abf..f89b4d29eff2 100644
--- a/docs/docs/getting-started/guide-llm.mdx
+++ b/docs/docs/getting-started/guide-llm.mdx
@@ -32,7 +32,7 @@ The most basic building block of LangChain is calling an LLM on some input. Let'
In order to do this, we first need to import the LLM wrapper.
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
We will then need to set the environment variable for the OpenAI key. Three options here:
@@ -119,7 +119,7 @@ This is easy to do with LangChain!
First lets define the prompt template:
```typescript
-import { PromptTemplate } from "langchain/prompts";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
const template = "What is a good name for a company that makes {product}?";
const prompt = new PromptTemplate({
@@ -150,8 +150,8 @@ The most core type of chain is an LLMChain, which consists of a PromptTemplate a
Extending the previous example, we can construct an LLMChain which takes user input, formats it with a PromptTemplate, and then passes the formatted response to an LLM.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
const model = new OpenAI({ temperature: 0.9 });
const template = "What is a good name for a company that makes {product}?";
@@ -164,7 +164,7 @@ const prompt = new PromptTemplate({
We can now create a very simple chain that will take user input, format the prompt with it, and then send it to the LLM:
```typescript
-import { LLMChain } from "langchain/chains";
+import { LLMChain } from "langchain-gpt4all/chains";
const chain = new LLMChain({ llm: model, prompt: prompt });
```
@@ -211,10 +211,10 @@ npm install -S serpapi
Now we can get started!
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
const model = new OpenAI({ temperature: 0 });
const tools = [
@@ -242,8 +242,8 @@ console.log(`Got output ${result.output}`);
```
```shell
-langchain-examples:start: Executing with input "Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?"...
-langchain-examples:start: Got output Olivia Wilde's boyfriend is Jason Sudeikis, and his current age raised to the 0.23 power is 2.4242784855673896.
+langchain-gpt4all-examples:start: Executing with input "Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?"...
+langchain-gpt4all-examples:start: Got output Olivia Wilde's boyfriend is Jason Sudeikis, and his current age raised to the 0.23 power is 2.4242784855673896.
```
### Memory: Add State to Chains and Agents
@@ -255,9 +255,9 @@ LangChain provides several specially created chains just for this purpose. This
By default, the `ConversationChain` has a simple type of memory that remembers all previous inputs/outputs and adds them to the context that is passed. Let's take a look at using this chain.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { BufferMemory } from "langchain/memory";
-import { ConversationChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { BufferMemory } from "langchain-gpt4all/memory";
+import { ConversationChain } from "langchain-gpt4all/chains";
const model = new OpenAI({});
const memory = new BufferMemory();
diff --git a/docs/docs/getting-started/install.md b/docs/docs/getting-started/install.md
index 8bb9f17136c7..8d086fba0cdb 100644
--- a/docs/docs/getting-started/install.md
+++ b/docs/docs/getting-started/install.md
@@ -21,7 +21,7 @@ LangChain is written in TypeScript and can be used in:
## Quickstart
-If you want to get started quickly on using LangChain in Node.js, [clone this repository](https://github.com/domeccleston/langchain-ts-starter) and follow the README instructions for a boilerplate project with those dependencies set up.
+If you want to get started quickly on using LangChain in Node.js, [clone this repository](https://github.com/domeccleston/langchain-gpt4all-ts-starter) and follow the README instructions for a boilerplate project with those dependencies set up.
If you prefer to set things up yourself, or you want to run LangChain in other environments, read on for instructions.
@@ -30,7 +30,7 @@ If you prefer to set things up yourself, or you want to run LangChain in other e
To get started, install LangChain with the following command:
```bash npm2yarn
-npm install -S langchain
+npm install -S langchain-gpt4all
```
### TypeScript
@@ -44,7 +44,7 @@ LangChain is written in TypeScript and provides type definitions for all of its
LangChain provides an ESM build targeting Node.js environments. You can import it using the following syntax:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
If you are using TypeScript in an ESM project we suggest updating your `tsconfig.json` to include the following:
@@ -64,7 +64,7 @@ If you are using TypeScript in an ESM project we suggest updating your `tsconfig
LangChain provides a CommonJS build targeting Node.js environments. You can import it using the following syntax:
```typescript
-const { OpenAI } = require("langchain/llms/openai");
+const { OpenAI } = require("langchain-gpt4all/llms/openai");
```
### Cloudflare Workers
@@ -72,7 +72,7 @@ const { OpenAI } = require("langchain/llms/openai");
LangChain can be used in Cloudflare Workers. You can import it using the following syntax:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
### Vercel / Next.js
@@ -80,7 +80,7 @@ import { OpenAI } from "langchain/llms/openai";
LangChain can be used in Vercel / Next.js. We support using LangChain in frontend components, in Serverless functions and in Edge functions. You can import it using the following syntax:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
To use LangChain with Next.js (either with app/ or pages/), add the following to your `next.config.js` to enable support for WebAssembly modules (which is required by the tokenizer library `@dqbd/tiktoken`):
@@ -103,17 +103,17 @@ const nextConfig = {
LangChain can be used in Deno / Supabase Edge Functions. You can import it using the following syntax:
```typescript
-import { OpenAI } from "https://esm.sh/langchain/llms/openai";
+import { OpenAI } from "https://esm.sh/langchain-gpt4all/llms/openai";
```
-We recommend looking at our [Supabase Template](https://github.com/langchain-ai/langchain-template-supabase) for an example of how to use LangChain in Supabase Edge Functions.
+We recommend looking at our [Supabase Template](https://github.com/langchain-gpt4all-ai/langchain-gpt4all-template-supabase) for an example of how to use LangChain in Supabase Edge Functions.
### Browser
LangChain can be used in the browser. In our CI we test bundling LangChain with Webpack and Vite, but other bundlers should work too. You can import it using the following syntax:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
#### Create React App
@@ -145,38 +145,38 @@ If you are updating from a version of LangChain prior to 0.0.52, you will need t
For example, if you were previously doing
```typescript
-import { OpenAI } from "langchain/llms";
+import { OpenAI } from "langchain-gpt4all/llms";
```
you will now need to do
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
This applies to all imports from the following 6 modules, which have been split into submodules for each integration. The combined modules are deprecated, do not work outside of Node.js, and will be removed in a future version.
-- If you were using `langchain/llms`, see [LLMs](../modules/models/llms/integrations) for updated import paths.
-- If you were using `langchain/chat_models`, see [Chat Models](../modules/models/chat/integrations) for updated import paths.
-- If you were using `langchain/embeddings`, see [Embeddings](../modules/models/embeddings/integrations) for updated import paths.
-- If you were using `langchain/vectorstores`, see [Vector Stores](../modules/indexes/vector_stores/integrations/) for updated import paths.
-- If you were using `langchain/document_loaders`, see [Document Loaders](../modules/indexes/document_loaders/examples/) for updated import paths.
-- If you were using `langchain/retrievers`, see [Retrievers](../modules/indexes/retrievers/) for updated import paths.
+- If you were using `langchain-gpt4all/llms`, see [LLMs](../modules/models/llms/integrations) for updated import paths.
+- If you were using `langchain-gpt4all/chat_models`, see [Chat Models](../modules/models/chat/integrations) for updated import paths.
+- If you were using `langchain-gpt4all/embeddings`, see [Embeddings](../modules/models/embeddings/integrations) for updated import paths.
+- If you were using `langchain-gpt4all/vectorstores`, see [Vector Stores](../modules/indexes/vector_stores/integrations/) for updated import paths.
+- If you were using `langchain-gpt4all/document_loaders`, see [Document Loaders](../modules/indexes/document_loaders/examples/) for updated import paths.
+- If you were using `langchain-gpt4all/retrievers`, see [Retrievers](../modules/indexes/retrievers/) for updated import paths.
Other modules are not affected by this change, and you can continue to import them from the same path.
Additionally, there are some breaking changes that were needed to support new environments:
-- `import { Calculator } from "langchain/tools";` now moved to
- - `import { Calculator } from "langchain/tools/calculator";`
-- `import { loadLLM } from "langchain/llms";` now moved to
- - `import { loadLLM } from "langchain/llms/load";`
-- `import { loadAgent } from "langchain/agents";` now moved to
- - `import { loadAgent } from "langchain/agents/load";`
-- `import { loadPrompt } from "langchain/prompts";` now moved to
- - `import { loadPrompt } from "langchain/prompts/load";`
-- `import { loadChain } from "langchain/chains";` now moved to
- - `import { loadChain } from "langchain/chains/load";`
+- `import { Calculator } from "langchain-gpt4all/tools";` now moved to
+ - `import { Calculator } from "langchain-gpt4all/tools/calculator";`
+- `import { loadLLM } from "langchain-gpt4all/llms";` now moved to
+ - `import { loadLLM } from "langchain-gpt4all/llms/load";`
+- `import { loadAgent } from "langchain-gpt4all/agents";` now moved to
+ - `import { loadAgent } from "langchain-gpt4all/agents/load";`
+- `import { loadPrompt } from "langchain-gpt4all/prompts";` now moved to
+ - `import { loadPrompt } from "langchain-gpt4all/prompts/load";`
+- `import { loadChain } from "langchain-gpt4all/chains";` now moved to
+ - `import { loadChain } from "langchain-gpt4all/chains/load";`
## Unsupported: Node.js 16
diff --git a/docs/docs/index.md b/docs/docs/index.md
index 6fc60cf31ccc..f2198934b0fa 100644
--- a/docs/docs/index.md
+++ b/docs/docs/index.md
@@ -51,7 +51,7 @@ These including:
Additional collection of resources we think may be useful as you develop your application!
-- [LangChainHub](https://github.com/hwchase17/langchain-hub): The LangChainHub is a place to share and explore other prompts, chains, and agents.
+- [LangChainHub](https://github.com/hwchase17/langchain-gpt4all-hub): The LangChainHub is a place to share and explore other prompts, chains, and agents.
- [Discord](https://discord.gg/6adMQxSpJS): Join us on our Discord to discuss all things LangChain!
diff --git a/docs/docs/modules/agents/agents/index.mdx b/docs/docs/modules/agents/agents/index.mdx
index 06fd3ffcf86a..9e3622bc5f2f 100644
--- a/docs/docs/modules/agents/agents/index.mdx
+++ b/docs/docs/modules/agents/agents/index.mdx
@@ -7,7 +7,7 @@ import DocCardList from "@theme/DocCardList";
# Agents
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/agents/agent)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/agents/agent)
:::
An agent is a stateless wrapper around an agent prompt chain (such as MRKL) which takes care of formatting tools into the prompt, as well as parsing the responses obtained from the chat model. It takes in user input and returns a response corresponding to an “action” to take and a corresponding “action input”.
diff --git a/docs/docs/modules/agents/executor/getting-started.md b/docs/docs/modules/agents/executor/getting-started.md
index 77fc8af7fc7f..b8a0e3c9b4d6 100644
--- a/docs/docs/modules/agents/executor/getting-started.md
+++ b/docs/docs/modules/agents/executor/getting-started.md
@@ -24,10 +24,10 @@ SERPAPI_API_KEY="..."
Now we can get started!
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
const model = new OpenAI({ temperature: 0 });
const tools = [
@@ -55,6 +55,6 @@ console.log(`Got output ${result.output}`);
```
```shell
-langchain-examples:start: Executing with input "Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?"...
-langchain-examples:start: Got output Olivia Wilde's boyfriend is Jason Sudeikis, and his current age raised to the 0.23 power is 2.4242784855673896.
+langchain-gpt4all-examples:start: Executing with input "Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?"...
+langchain-gpt4all-examples:start: Got output Olivia Wilde's boyfriend is Jason Sudeikis, and his current age raised to the 0.23 power is 2.4242784855673896.
```
diff --git a/docs/docs/modules/agents/executor/index.mdx b/docs/docs/modules/agents/executor/index.mdx
index 9c724a5f0641..9cb38be183f3 100644
--- a/docs/docs/modules/agents/executor/index.mdx
+++ b/docs/docs/modules/agents/executor/index.mdx
@@ -5,7 +5,7 @@ hide_table_of_contents: true
# Agent Executors
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/agents/agent-executor)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/agents/agent-executor)
:::
To make agents more powerful we need to make them iterative, ie. call the model multiple times until they arrive at the final answer. That's the job of the AgentExecutor.
diff --git a/docs/docs/modules/agents/index.mdx b/docs/docs/modules/agents/index.mdx
index 20840e230440..e3b679faab56 100644
--- a/docs/docs/modules/agents/index.mdx
+++ b/docs/docs/modules/agents/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Agents
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/agents)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/agents)
:::
diff --git a/docs/docs/modules/agents/toolkits/index.mdx b/docs/docs/modules/agents/toolkits/index.mdx
index 057e90338bd4..5c68e7ad0a57 100644
--- a/docs/docs/modules/agents/toolkits/index.mdx
+++ b/docs/docs/modules/agents/toolkits/index.mdx
@@ -7,7 +7,7 @@ hide_table_of_contents: true
# Getting Started: Toolkits
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/agents/toolkit)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/agents/toolkit)
:::
Groups of [tools](../tools/) that can be used/are necessary to solve a particular problem.
diff --git a/docs/docs/modules/agents/toolkits/json.md b/docs/docs/modules/agents/toolkits/json.md
index f197159a0ddf..f8c0cfc1d433 100644
--- a/docs/docs/modules/agents/toolkits/json.md
+++ b/docs/docs/modules/agents/toolkits/json.md
@@ -5,9 +5,9 @@ This example shows how to load and use an agent with a JSON toolkit.
```typescript
import * as fs from "fs";
import * as yaml from "js-yaml";
-import { OpenAI } from "langchain/llms/openai";
-import { JsonSpec, JsonObject } from "langchain/tools";
-import { JsonToolkit, createJsonAgent } from "langchain/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { JsonSpec, JsonObject } from "langchain-gpt4all/tools";
+import { JsonToolkit, createJsonAgent } from "langchain-gpt4all/agents";
export const run = async () => {
let data: JsonObject;
diff --git a/docs/docs/modules/agents/toolkits/openapi.md b/docs/docs/modules/agents/toolkits/openapi.md
index a6d7d4bc60de..2e7fb92161a3 100644
--- a/docs/docs/modules/agents/toolkits/openapi.md
+++ b/docs/docs/modules/agents/toolkits/openapi.md
@@ -5,9 +5,9 @@ This example shows how to load and use an agent with a OpenAPI toolkit.
```typescript
import * as fs from "fs";
import * as yaml from "js-yaml";
-import { OpenAI } from "langchain/llms/openai";
-import { JsonSpec, JsonObject } from "langchain/tools";
-import { createOpenApiAgent, OpenApiToolkit } from "langchain/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { JsonSpec, JsonObject } from "langchain-gpt4all/tools";
+import { createOpenApiAgent, OpenApiToolkit } from "langchain-gpt4all/agents";
export const run = async () => {
let data: JsonObject;
diff --git a/docs/docs/modules/agents/toolkits/vectorstore.md b/docs/docs/modules/agents/toolkits/vectorstore.md
index bc931fec6595..ca6454cbb039 100644
--- a/docs/docs/modules/agents/toolkits/vectorstore.md
+++ b/docs/docs/modules/agents/toolkits/vectorstore.md
@@ -3,16 +3,16 @@
This example shows how to load and use an agent with a vectorstore toolkit.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
import {
VectorStoreToolkit,
createVectorStoreAgent,
VectorStoreInfo,
-} from "langchain/agents";
+} from "langchain-gpt4all/agents";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/docs/docs/modules/agents/tools/agents_with_vectorstores.md b/docs/docs/modules/agents/tools/agents_with_vectorstores.md
index d0a8f74b3781..620f7291f521 100644
--- a/docs/docs/modules/agents/tools/agents_with_vectorstores.md
+++ b/docs/docs/modules/agents/tools/agents_with_vectorstores.md
@@ -7,14 +7,14 @@ The recommended method for doing so is to create a VectorDBQAChain and then use
First, you'll want to import the relevant modules:
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI, ChainTool } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
-import { VectorDBQAChain } from "langchain/chains";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI, ChainTool } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
+import { VectorDBQAChain } from "langchain-gpt4all/chains";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
```
diff --git a/docs/docs/modules/agents/tools/index.mdx b/docs/docs/modules/agents/tools/index.mdx
index d2b1ae8fa1f2..ed01b3a241fa 100644
--- a/docs/docs/modules/agents/tools/index.mdx
+++ b/docs/docs/modules/agents/tools/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Tools
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/agents/tool)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/agents/tool)
:::
A tool is an abstraction around a function that makes it easy for a language model to interact with it. Specifically, the interface of a tool has a single text input and a single text output. It includes a name and description that communicate to the [Model](../../models/) what the tool does and when to use it.
@@ -47,9 +47,9 @@ The `DynamicTool` class takes as input a name, a description, and a function. Im
See below for an example of defining and using `DynamicTool`s.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { DynamicTool } from "langchain/tools";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { DynamicTool } from "langchain-gpt4all/tools";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/docs/docs/modules/agents/tools/lambda_agent.md b/docs/docs/modules/agents/tools/lambda_agent.md
index bbdc0d5a2f7f..048d6f918bdf 100644
--- a/docs/docs/modules/agents/tools/lambda_agent.md
+++ b/docs/docs/modules/agents/tools/lambda_agent.md
@@ -21,10 +21,10 @@ This quick start will demonstrate how an Agent could use a Lambda function to se
- The IAM role corresponding to those credentials must have permission to invoke the lambda function.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { SerpAPI } from "langchain/tools";
-import { AWSLambda } from "langchain/tools/aws_lambda";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { AWSLambda } from "langchain-gpt4all/tools/aws_lambda";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
const model = new OpenAI({ temperature: 0 });
const emailSenderTool = new AWSLambda({
diff --git a/docs/docs/modules/chains/index.mdx b/docs/docs/modules/chains/index.mdx
index 5f1cebd2c9e8..568c6f7b9536 100644
--- a/docs/docs/modules/chains/index.mdx
+++ b/docs/docs/modules/chains/index.mdx
@@ -10,7 +10,7 @@ import CodeBlock from "@theme/CodeBlock";
# Getting Started: Chains
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/chains)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/chains)
:::info
Using a language model in isolation is fine for some applications, but it is often useful to combine language models with other sources of information, third-party APIs, or even other language models. This is where the concept of a chain comes in.
diff --git a/docs/docs/modules/chains/index_related_chains/index.mdx b/docs/docs/modules/chains/index_related_chains/index.mdx
index ee89a5011499..57da03dc3601 100644
--- a/docs/docs/modules/chains/index_related_chains/index.mdx
+++ b/docs/docs/modules/chains/index_related_chains/index.mdx
@@ -9,7 +9,7 @@ import DocCardList from "@theme/DocCardList";
# Index Related Chains
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/chains/index_related_chains)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/chains/index_related_chains)
:::
Chains related to working with unstructured data stored in indexes.
diff --git a/docs/docs/modules/chains/llmchain.mdx b/docs/docs/modules/chains/llmchain.mdx
index 8792138205b3..ada32519f89a 100644
--- a/docs/docs/modules/chains/llmchain.mdx
+++ b/docs/docs/modules/chains/llmchain.mdx
@@ -10,7 +10,7 @@ import Example from "@examples/chains/llm_chain.ts";
# Getting Started: LLMChain
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/chains/llm-chain)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/chains/llm-chain)
:::
An `LLMChain` is a simple chain that adds some functionality around language models. It is used widely throughout LangChain, including in other chains and agents.
diff --git a/docs/docs/modules/chains/prompt_selectors/index.mdx b/docs/docs/modules/chains/prompt_selectors/index.mdx
index 4c91d32df6d6..d054d8fc8d56 100644
--- a/docs/docs/modules/chains/prompt_selectors/index.mdx
+++ b/docs/docs/modules/chains/prompt_selectors/index.mdx
@@ -6,7 +6,7 @@ sidebar_label: Prompt Selectors
# Prompt Selectors
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/chains/prompt-selector)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/chains/prompt-selector)
:::
Oftentimes, you will want to programmatically select a prompt based on the type of model you are using in a chain. This is especially relevant when swapping chat models and LLMs.
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/csv.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/csv.md
index e482cd3717e3..eea7b2e38b3d 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/csv.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/csv.md
@@ -21,7 +21,7 @@ id,text
Example code:
```typescript
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
const loader = new CSVLoader("src/document_loaders/example_data/example.csv");
@@ -61,7 +61,7 @@ id,text
Example code:
```typescript
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
const loader = new CSVLoader(
"src/document_loaders/example_data/example.csv",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/directory.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/directory.md
index 675bd341dda6..6b80bf3fc85a 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/directory.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/directory.md
@@ -20,13 +20,13 @@ src/document_loaders/example_data/example/
Example code:
```typescript
-import { DirectoryLoader } from "langchain/document_loaders/fs/directory";
+import { DirectoryLoader } from "langchain-gpt4all/document_loaders/fs/directory";
import {
JSONLoader,
JSONLinesLoader,
-} from "langchain/document_loaders/fs/json";
-import { TextLoader } from "langchain/document_loaders/fs/text";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+} from "langchain-gpt4all/document_loaders/fs/json";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
const loader = new DirectoryLoader(
"src/document_loaders/example_data/example",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/docx.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/docx.md
index 605a15c0fbc2..5663a56b7959 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/docx.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/docx.md
@@ -15,7 +15,7 @@ npm install mammoth
# Usage
```typescript
-import { DocxLoader } from "langchain/document_loaders/fs/docx";
+import { DocxLoader } from "langchain-gpt4all/document_loaders/fs/docx";
const loader = new DocxLoader(
"src/document_loaders/tests/example_data/attention.docx"
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/epub.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/epub.md
index df9c1faaedad..b1a529670d93 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/epub.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/epub.md
@@ -15,7 +15,7 @@ npm install epub2 html-to-text
# Usage, one document per chapter
```typescript
-import { EPubLoader } from "langchain/document_loaders/fs/epub";
+import { EPubLoader } from "langchain-gpt4all/document_loaders/fs/epub";
const loader = new EPubLoader("src/document_loaders/example_data/example.epub");
@@ -25,7 +25,7 @@ const docs = await loader.load();
# Usage, one document per file
```typescript
-import { EPubLoader } from "langchain/document_loaders/fs/epub";
+import { EPubLoader } from "langchain-gpt4all/document_loaders/fs/epub";
const loader = new EPubLoader(
"src/document_loaders/example_data/example.epub",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/json.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/json.md
index 61fed3477d1d..0d409f7033ae 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/json.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/json.md
@@ -18,7 +18,7 @@ Example JSON file:
Example code:
```typescript
-import { JSONLoader } from "langchain/document_loaders/fs/json";
+import { JSONLoader } from "langchain-gpt4all/document_loaders/fs/json";
const loader = new JSONLoader("src/document_loaders/example_data/example.json");
@@ -73,7 +73,7 @@ In this example, we want to only extract information from "from" and "surname" e
Example code:
```typescript
-import { JSONLoader } from "langchain/document_loaders/fs/json";
+import { JSONLoader } from "langchain-gpt4all/document_loaders/fs/json";
const loader = new JSONLoader(
"src/document_loaders/example_data/example.json",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/jsonlines.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/jsonlines.md
index 5aa125649b6a..4518ce33fa79 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/jsonlines.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/jsonlines.md
@@ -16,7 +16,7 @@ Example JSONLines file:
Example code:
```typescript
-import { JSONLinesLoader } from "langchain/document_loaders/fs/json";
+import { JSONLinesLoader } from "langchain-gpt4all/document_loaders/fs/json";
const loader = new JSONLinesLoader(
"src/document_loaders/example_data/example.jsonl",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/pdf.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/pdf.md
index 80f1794276c5..c35fdab85a45 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/pdf.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/pdf.md
@@ -11,7 +11,7 @@ npm install pdf-parse
## Usage, one document per page
```typescript
-import { PDFLoader } from "langchain/document_loaders/fs/pdf";
+import { PDFLoader } from "langchain-gpt4all/document_loaders/fs/pdf";
const loader = new PDFLoader("src/document_loaders/example_data/example.pdf");
@@ -21,7 +21,7 @@ const docs = await loader.load();
## Usage, one document per file
```typescript
-import { PDFLoader } from "langchain/document_loaders/fs/pdf";
+import { PDFLoader } from "langchain-gpt4all/document_loaders/fs/pdf";
const loader = new PDFLoader("src/document_loaders/example_data/example.pdf", {
splitPages: false,
@@ -41,7 +41,7 @@ npm install pdfjs-dist
```
```typescript
-import { PDFLoader } from "langchain/document_loaders/fs/pdf";
+import { PDFLoader } from "langchain-gpt4all/document_loaders/fs/pdf";
const loader = new PDFLoader("src/document_loaders/example_data/example.pdf", {
// you may need to add `.then(m => m.default)` to the end of the import
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/subtitles.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/subtitles.md
index 035c51e903e2..8ea577927a51 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/subtitles.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/subtitles.md
@@ -15,7 +15,7 @@ npm install srt-parser-2
## Usage
```typescript
-import { SRTLoader } from "langchain/document_loaders/fs/srt";
+import { SRTLoader } from "langchain-gpt4all/document_loaders/fs/srt";
const loader = new SRTLoader(
"src/document_loaders/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt"
diff --git a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/text.md b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/text.md
index d20d7c1942d2..362965acc2cd 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/file_loaders/text.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/file_loaders/text.md
@@ -7,7 +7,7 @@ hide_table_of_contents: true
This example goes over how to load data from text files.
```typescript
-import { TextLoader } from "langchain/document_loaders/fs/text";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
const loader = new TextLoader("src/document_loaders/example_data/example.txt");
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/college_confidential.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/college_confidential.md
index de141ce97f14..59f7e375c357 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/college_confidential.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/college_confidential.md
@@ -15,7 +15,7 @@ npm install cheerio
## Usage
```typescript
-import { CollegeConfidentialLoader } from "langchain/document_loaders/web/college_confidential";
+import { CollegeConfidentialLoader } from "langchain-gpt4all/document_loaders/web/college_confidential";
const loader = new CollegeConfidentialLoader(
"https://www.collegeconfidential.com/colleges/brown-university/"
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/gitbook.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/gitbook.md
index 06d88da2ecc7..29e5e2e2c58c 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/gitbook.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/gitbook.md
@@ -15,7 +15,7 @@ npm install cheerio
## Load from single GitBook page
```typescript
-import { GitbookLoader } from "langchain/document_loaders/web/gitbook";
+import { GitbookLoader } from "langchain-gpt4all/document_loaders/web/gitbook";
const loader = new GitbookLoader(
"https://docs.gitbook.com/product-tour/navigation"
@@ -29,7 +29,7 @@ const docs = await loader.load();
For this to work, the GitbookLoader needs to be initialized with the root path (https://docs.gitbook.com in this example) and have `shouldLoadAllPaths` set to `true`.
```typescript
-import { GitbookLoader } from "langchain/document_loaders/web/gitbook";
+import { GitbookLoader } from "langchain-gpt4all/document_loaders/web/gitbook";
const loader = new GitbookLoader("https://docs.gitbook.com", {
shouldLoadAllPaths: true,
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/github.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/github.md
index deab43a83a0b..7d2b677c0c9d 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/github.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/github.md
@@ -8,10 +8,10 @@ This example goes over how to load data from a GitHub repository.
You can set the `GITHUB_ACCESS_TOKEN` environment variable to a GitHub access token to increase the rate limit and access private repositories.
```typescript
-import { GithubRepoLoader } from "langchain/document_loaders/web/github";
+import { GithubRepoLoader } from "langchain-gpt4all/document_loaders/web/github";
const loader = new GithubRepoLoader(
- "https://github.com/hwchase17/langchainjs",
+ "https://github.com/lucasjohnston/langchainjs-gpt4all",
{ branch: "main", recursive: false, unknown: "warn" }
);
const docs = await loader.load();
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/hn.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/hn.md
index 65d6b44d9e1d..dbc20a60a019 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/hn.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/hn.md
@@ -15,7 +15,7 @@ npm install cheerio
## Usage
```typescript
-import { HNLoader } from "langchain/document_loaders/web/hn";
+import { HNLoader } from "langchain-gpt4all/document_loaders/web/hn";
const loader = new HNLoader("https://news.ycombinator.com/item?id=34817881");
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/imsdb.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/imsdb.md
index 27df8ee34f72..32e72a4bcb9e 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/imsdb.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/imsdb.md
@@ -15,7 +15,7 @@ npm install cheerio
## Usage
```typescript
-import { IMSDBLoader } from "langchain/document_loaders/web/imsdb";
+import { IMSDBLoader } from "langchain-gpt4all/document_loaders/web/imsdb";
const loader = new IMSDBLoader("https://imsdb.com/scripts/BlacKkKlansman.html");
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/s3.mdx b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/s3.mdx
index 7f49424ed664..9ee059002397 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/s3.mdx
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/s3.mdx
@@ -15,7 +15,7 @@ This covers how to load document objects from an s3 file object.
To run this index you'll need to have Unstructured already set up and ready to use at an available URL endpoint. It can also be configured to run locally.
-See the docs [here](https://js.langchain.com/docs/modules/indexes/document_loaders/examples/file_loaders/unstructured) for information on how to do that.
+See the docs [here](https://js.langchain-gpt4all.com/docs/modules/indexes/document_loaders/examples/file_loaders/unstructured) for information on how to do that.
## Usage
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_cheerio.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_cheerio.md
index 4229a0aef17b..882fc63e5092 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_cheerio.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_cheerio.md
@@ -21,7 +21,7 @@ npm install cheerio
## Usage
```typescript
-import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio";
+import { CheerioWebBaseLoader } from "langchain-gpt4all/document_loaders/web/cheerio";
const loader = new CheerioWebBaseLoader(
"https://news.ycombinator.com/item?id=34817881"
@@ -33,7 +33,7 @@ const docs = await loader.load();
## Usage, with a custom selector
```typescript
-import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio";
+import { CheerioWebBaseLoader } from "langchain-gpt4all/document_loaders/web/cheerio";
const loader = new CheerioWebBaseLoader(
"https://news.ycombinator.com/item?id=34817881",
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_playwright.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_playwright.md
index 1a031c281048..ba42449b84b7 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_playwright.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_playwright.md
@@ -26,7 +26,7 @@ npm install playwright
## Usage
```typescript
-import { PlaywrightWebBaseLoader } from "langchain/document_loaders/web/playwright";
+import { PlaywrightWebBaseLoader } from "langchain-gpt4all/document_loaders/web/playwright";
/**
* Loader uses `page.content()`
@@ -60,7 +60,7 @@ By passing these options to the `PlaywrightWebBaseLoader` constructor, you can c
Here is a basic example to do it:
```typescript
-import { PlaywrightWebBaseLoader } from "langchain/document_loaders/web/playwright";
+import { PlaywrightWebBaseLoader } from "langchain-gpt4all/document_loaders/web/playwright";
const loader = new PlaywrightWebBaseLoader("https://www.tabnews.com.br/", {
launchOptions: {
diff --git a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_puppeteer.md b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_puppeteer.md
index e8ed03147494..d0ac1eda1c4f 100644
--- a/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_puppeteer.md
+++ b/docs/docs/modules/indexes/document_loaders/examples/web_loaders/web_puppeteer.md
@@ -26,7 +26,7 @@ npm install puppeteer
## Usage
```typescript
-import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer";
+import { PuppeteerWebBaseLoader } from "langchain-gpt4all/document_loaders/web/puppeteer";
/**
* Loader uses `page.evaluate(() => document.body.innerHTML)`
@@ -60,7 +60,7 @@ By passing these options to the `PuppeteerWebBaseLoader` constructor, you can cu
Here is a basic example to do it:
```typescript
-import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer";
+import { PuppeteerWebBaseLoader } from "langchain-gpt4all/document_loaders/web/puppeteer";
const loader = new PuppeteerWebBaseLoader("https://www.tabnews.com.br/", {
launchOptions: {
diff --git a/docs/docs/modules/indexes/document_loaders/index.mdx b/docs/docs/modules/indexes/document_loaders/index.mdx
index 8e406842c4dc..e788eb55e707 100644
--- a/docs/docs/modules/indexes/document_loaders/index.mdx
+++ b/docs/docs/modules/indexes/document_loaders/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: Document Loaders
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/indexing/document-loaders)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/indexing/document-loaders)
:::
Document loaders make it easy to create [Documents](../../schema/document.md) from a variety of sources. These documents can then be loaded onto [Vector Stores](../vector_stores/) to load documents from a source.
diff --git a/docs/docs/modules/indexes/index.mdx b/docs/docs/modules/indexes/index.mdx
index 18664cf1eb8d..30a5ebcac6ca 100644
--- a/docs/docs/modules/indexes/index.mdx
+++ b/docs/docs/modules/indexes/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Indexes
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/indexing)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/indexing)
:::
This section deals with everything related to bringing your own data into LangChain, indexing it, and making it available for LLMs/Chat Models.
diff --git a/docs/docs/modules/indexes/retrievers/index.mdx b/docs/docs/modules/indexes/retrievers/index.mdx
index 12940ad0e1a9..3b22477dfa92 100644
--- a/docs/docs/modules/indexes/retrievers/index.mdx
+++ b/docs/docs/modules/indexes/retrievers/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Retrievers
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/indexing/retriever)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/indexing/retriever)
:::
A way of storing data such that it can be queried by a language model. The only interface this object must expose is a `getRelevantDocuments` method which takes in a string query and returns a list of Documents.
diff --git a/docs/docs/modules/indexes/text_splitters/examples/character.mdx b/docs/docs/modules/indexes/text_splitters/examples/character.mdx
index a4924294525f..f7875d3b9744 100644
--- a/docs/docs/modules/indexes/text_splitters/examples/character.mdx
+++ b/docs/docs/modules/indexes/text_splitters/examples/character.mdx
@@ -7,8 +7,8 @@ hide_table_of_contents: true
Besides the `RecursiveCharacterTextSplitter`, there is also the more standard `CharacterTextSplitter`. This splits only on one type of character (defaults to `"\n\n"`). You can use it in the exact same way.
```typescript
-import { Document } from "langchain/document";
-import { CharacterTextSplitter } from "langchain/text_splitter";
+import { Document } from "langchain-gpt4all/document";
+import { CharacterTextSplitter } from "langchain-gpt4all/text_splitter";
const text = "foo bar baz 123";
const splitter = new CharacterTextSplitter({
diff --git a/docs/docs/modules/indexes/text_splitters/examples/markdown.mdx b/docs/docs/modules/indexes/text_splitters/examples/markdown.mdx
index e5c07ffcadf4..7736ec1fe4ed 100644
--- a/docs/docs/modules/indexes/text_splitters/examples/markdown.mdx
+++ b/docs/docs/modules/indexes/text_splitters/examples/markdown.mdx
@@ -23,7 +23,7 @@ This is even more content.
Then the `MarkdownTextSplitter` will split the content into three documents:
```typescript
-import { MarkdownTextSplitter } from "langchain/text_splitter";
+import { MarkdownTextSplitter } from "langchain-gpt4all/text_splitter";
const text = `# Header 1
diff --git a/docs/docs/modules/indexes/text_splitters/examples/recursive_character.mdx b/docs/docs/modules/indexes/text_splitters/examples/recursive_character.mdx
index b1073c09f652..87871ebfe88c 100644
--- a/docs/docs/modules/indexes/text_splitters/examples/recursive_character.mdx
+++ b/docs/docs/modules/indexes/text_splitters/examples/recursive_character.mdx
@@ -9,7 +9,7 @@ The recommended TextSplitter is the `RecursiveCharacterTextSplitter`. This will
Important parameters to know here are `chunkSize` and `chunkOverlap`. `chunkSize` controls the max size (in terms of number of characters) of the final documents. `chunkOverlap` specifies how much overlap there should be between chunks. This is often helpful to make sure that the text isn't split weirdly. In the example below we set these values to be small (for illustration purposes), but in practice they default to `4000` and `200` respectively.
```typescript
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
const text = `Hi.\n\nI'm Harrison.\n\nHow? Are? You?\nOkay then f f f f.
This is a weird text to write, but gotta test the splittingggg some how.\n\n
@@ -25,8 +25,8 @@ const output = await splitter.createDocuments([text]);
You'll note that in the above example we are splitting a raw text string and getting back a list of documents. We can also split documents directly.
```typescript
-import { Document } from "langchain/document";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { Document } from "langchain-gpt4all/document";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
const text = `Hi.\n\nI'm Harrison.\n\nHow? Are? You?\nOkay then f f f f.
This is a weird text to write, but gotta test the splittingggg some how.\n\n
diff --git a/docs/docs/modules/indexes/text_splitters/examples/token.mdx b/docs/docs/modules/indexes/text_splitters/examples/token.mdx
index 7f1397d972a3..8aed0bdb034c 100644
--- a/docs/docs/modules/indexes/text_splitters/examples/token.mdx
+++ b/docs/docs/modules/indexes/text_splitters/examples/token.mdx
@@ -15,8 +15,8 @@ npm install -S @dqbd/tiktoken
Then, you can use it like so:
```typescript
-import { Document } from "langchain/document";
-import { TokenTextSplitter } from "langchain/text_splitter";
+import { Document } from "langchain-gpt4all/document";
+import { TokenTextSplitter } from "langchain-gpt4all/text_splitter";
const text = "foo bar baz 123";
diff --git a/docs/docs/modules/indexes/text_splitters/index.mdx b/docs/docs/modules/indexes/text_splitters/index.mdx
index c67941353db2..066e5f5e7dbe 100644
--- a/docs/docs/modules/indexes/text_splitters/index.mdx
+++ b/docs/docs/modules/indexes/text_splitters/index.mdx
@@ -9,7 +9,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: Text Splitters
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/indexing/text-splitters)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/indexing/text-splitters)
:::
Language Models are often limited by the amount of text that you can pass to them. Therefore, it is neccessary to split them up into smaller chunks. LangChain provides several utilities for doing so.
diff --git a/docs/docs/modules/indexes/vector_stores/index.mdx b/docs/docs/modules/indexes/vector_stores/index.mdx
index 21bb5350b0a7..0e6423f0809e 100644
--- a/docs/docs/modules/indexes/vector_stores/index.mdx
+++ b/docs/docs/modules/indexes/vector_stores/index.mdx
@@ -6,7 +6,7 @@ sidebar_position: 3
# Getting Started: Vector Stores
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/indexing/vectorstore)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/indexing/vectorstore)
:::
A vector store is a particular type of database optimized for storing documents and their [embeddings](../../models/embeddings/), and then fetching of the most relevant documents for a particular query, ie. those whose embeddings are most similar to the embedding of the query.
diff --git a/docs/docs/modules/indexes/vector_stores/integrations/milvus.md b/docs/docs/modules/indexes/vector_stores/integrations/milvus.md
index eb46a1a0228e..053b765f529d 100644
--- a/docs/docs/modules/indexes/vector_stores/integrations/milvus.md
+++ b/docs/docs/modules/indexes/vector_stores/integrations/milvus.md
@@ -43,8 +43,8 @@ Only available on Node.js.
## Index and query docs
```typescript
-import { Milvus } from "langchain/vectorstores/milvus";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { Milvus } from "langchain-gpt4all/vectorstores/milvus";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
// text sample from Godel, Escher, Bach
const vectorStore = await Milvus.fromTexts(
@@ -78,8 +78,8 @@ const response = await vectorStore.similaritySearch("scared", 2);
## Query docs from existing collection
```typescript
-import { Milvus } from "langchain/vectorstores/milvus";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { Milvus } from "langchain-gpt4all/vectorstores/milvus";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = await Milvus.fromExistingCollection(
new OpenAIEmbeddings(),
diff --git a/docs/docs/modules/indexes/vector_stores/integrations/opensearch.md b/docs/docs/modules/indexes/vector_stores/integrations/opensearch.md
index 6612e2681be2..9905964965cc 100644
--- a/docs/docs/modules/indexes/vector_stores/integrations/opensearch.md
+++ b/docs/docs/modules/indexes/vector_stores/integrations/opensearch.md
@@ -18,15 +18,15 @@ Langchain.js accepts [@opensearch-project/opensearch](https://opensearch.org/doc
npm install -S @opensearch-project/opensearch
```
-You'll also need to have an OpenSearch instance running. You can use the [official Docker image](https://opensearch.org/docs/latest/opensearch/install/docker/) to get started. You can also find an example docker-compose file [here](https://github.com/hwchase17/langchainjs/blob/main/examples/src/indexes/vector_stores/opensearch/docker-compose.yml).
+You'll also need to have an OpenSearch instance running. You can use the [official Docker image](https://opensearch.org/docs/latest/opensearch/install/docker/) to get started. You can also find an example docker-compose file [here](https://github.com/lucasjohnston/langchainjs-gpt4all/blob/main/examples/src/indexes/vector_stores/opensearch/docker-compose.yml).
## Index docs
```typescript
import { Client } from "@opensearch-project/opensearch";
-import { Document } from "langchain/document";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenSearchVectorStore } from "langchain/vectorstores/opensearch";
+import { Document } from "langchain-gpt4all/document";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenSearchVectorStore } from "langchain-gpt4all/vectorstores/opensearch";
const client = new Client({
nodes: [process.env.OPENSEARCH_URL ?? "http://127.0.0.1:9200"],
@@ -62,10 +62,10 @@ await OpenSearchVectorStore.fromDocuments(docs, new OpenAIEmbeddings(), {
```typescript
import { Client } from "@opensearch-project/opensearch";
-import { VectorDBQAChain } from "langchain/chains";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenAI } from "langchain/llms/openai";
-import { OpenSearchVectorStore } from "langchain/vectorstores/opensearch";
+import { VectorDBQAChain } from "langchain-gpt4all/chains";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { OpenSearchVectorStore } from "langchain-gpt4all/vectorstores/opensearch";
const client = new Client({
nodes: [process.env.OPENSEARCH_URL ?? "http://127.0.0.1:9200"],
diff --git a/docs/docs/modules/indexes/vector_stores/integrations/pinecone.md b/docs/docs/modules/indexes/vector_stores/integrations/pinecone.md
index a0c5d760b1ea..a4a693c29054 100644
--- a/docs/docs/modules/indexes/vector_stores/integrations/pinecone.md
+++ b/docs/docs/modules/indexes/vector_stores/integrations/pinecone.md
@@ -11,7 +11,7 @@ Only available on Node.js.
Langchain.js accepts [@pinecone-database/pinecone](https://docs.pinecone.io/docs/node-client) as the client for Pinecone vectorstore. Install the library with
```bash npm2yarn
-npm install -S dotenv langchain @pinecone-database/pinecone
+npm install -S dotenv langchain-gpt4all @pinecone-database/pinecone
```
## Index docs
@@ -19,9 +19,9 @@ npm install -S dotenv langchain @pinecone-database/pinecone
```typescript
import { PineconeClient } from "@pinecone-database/pinecone";
import * as dotenv from "dotenv";
-import { Document } from "langchain/document";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { PineconeStore } from "langchain/vectorstores/pinecone";
+import { Document } from "langchain-gpt4all/document";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { PineconeStore } from "langchain-gpt4all/vectorstores/pinecone";
dotenv.config();
@@ -61,10 +61,10 @@ await PineconeStore.fromDocuments(docs, new OpenAIEmbeddings(), {
```typescript
import { PineconeClient } from "@pinecone-database/pinecone";
import * as dotenv from "dotenv";
-import { VectorDBQAChain } from "langchain/chains";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenAI } from "langchain/llms/openai";
-import { PineconeStore } from "langchain/vectorstores/pinecone";
+import { VectorDBQAChain } from "langchain-gpt4all/chains";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PineconeStore } from "langchain-gpt4all/vectorstores/pinecone";
dotenv.config();
diff --git a/docs/docs/modules/memory/examples/buffer_memory.md b/docs/docs/modules/memory/examples/buffer_memory.md
index 28ccd33afd53..90c96c30b5bd 100644
--- a/docs/docs/modules/memory/examples/buffer_memory.md
+++ b/docs/docs/modules/memory/examples/buffer_memory.md
@@ -3,9 +3,9 @@
BufferMemory is the simplest type of memory - it just remembers previous conversational back and forths directly.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { BufferMemory } from "langchain/memory";
-import { ConversationChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { BufferMemory } from "langchain-gpt4all/memory";
+import { ConversationChain } from "langchain-gpt4all/chains";
const model = new OpenAI({});
const memory = new BufferMemory();
@@ -31,8 +31,8 @@ You can also load messages into a `BufferMemory` instance by creating and passin
This lets you easily pick up state from past conversations:
```typescript
-import { ChatMessageHistory } from "langchain/memory";
-import { HumanChatMessage, AIChatMessage } from "langchain/schema";
+import { ChatMessageHistory } from "langchain-gpt4all/memory";
+import { HumanChatMessage, AIChatMessage } from "langchain-gpt4all/schema";
const pastMessages = [
new HumanChatMessage("My name's Jonas"),
diff --git a/docs/docs/modules/memory/examples/buffer_window_memory.md b/docs/docs/modules/memory/examples/buffer_window_memory.md
index 9ef526c468de..29bb3a82cddc 100644
--- a/docs/docs/modules/memory/examples/buffer_window_memory.md
+++ b/docs/docs/modules/memory/examples/buffer_window_memory.md
@@ -3,9 +3,9 @@
BufferWindowMemory keeps track of the back-and-forths in conversation, and then uses a window of size `k` to surface the last `k` back-and-forths to use as memory.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { BufferWindowMemory } from "langchain/memory";
-import { ConversationChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { BufferWindowMemory } from "langchain-gpt4all/memory";
+import { ConversationChain } from "langchain-gpt4all/chains";
const model = new OpenAI({});
const memory = new BufferWindowMemory({ k: 1 });
diff --git a/docs/docs/modules/memory/examples/dynamodb.mdx b/docs/docs/modules/memory/examples/dynamodb.mdx
index a2bed03573f5..8ddd3fc1a2df 100644
--- a/docs/docs/modules/memory/examples/dynamodb.mdx
+++ b/docs/docs/modules/memory/examples/dynamodb.mdx
@@ -16,7 +16,7 @@ First, install the AWS DynamoDB client in your project:
npm install @aws-sdk/client-dynamodb
```
-Next, sign into your AWS account and create a DynamoDB table. Name the table `langchain`, and name your partition key `id` and make sure it's a string. You can leave sort key and the other settings alone.
+Next, sign into your AWS account and create a DynamoDB table. Name the table `langchain-gpt4all`, and name your partition key `id` and make sure it's a string. You can leave sort key and the other settings alone.
You'll also need to retrieve an AWS access key and secret key for a role or user that has access to the table and add them to your environment variables.
diff --git a/docs/docs/modules/memory/examples/motorhead_memory.md b/docs/docs/modules/memory/examples/motorhead_memory.md
index 079689a2133c..e2214e70214e 100644
--- a/docs/docs/modules/memory/examples/motorhead_memory.md
+++ b/docs/docs/modules/memory/examples/motorhead_memory.md
@@ -9,9 +9,9 @@ See instructions at [Motörhead](https://github.com/getmetal/motorhead) for runn
## Usage
```typescript
-import { ConversationChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models";
-import { MotorheadMemory } from "langchain/memory";
+import { ConversationChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models";
+import { MotorheadMemory } from "langchain-gpt4all/memory";
const model = new ChatOpenAI({});
const memory = new MotorheadMemory({
diff --git a/docs/docs/modules/memory/index.mdx b/docs/docs/modules/memory/index.mdx
index c5fde57b6cf6..aaa8f81a2a03 100644
--- a/docs/docs/modules/memory/index.mdx
+++ b/docs/docs/modules/memory/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: Memory
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/memory)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/memory)
:::
Memory is the concept of storing and retrieving data in the process of a conversation. There are two main methods, `loadMemoryVariables` and `saveContext`. The first method is used to retrieve data from memory (optionally using the current input values), and the second method is used to store data in memory.
diff --git a/docs/docs/modules/models/chat/additional_functionality.mdx b/docs/docs/modules/models/chat/additional_functionality.mdx
index c4b0867ac05f..9dbea97cf7e3 100644
--- a/docs/docs/modules/models/chat/additional_functionality.mdx
+++ b/docs/docs/modules/models/chat/additional_functionality.mdx
@@ -40,7 +40,7 @@ For example, if you set `maxConcurrency: 5`, then LangChain will only send 5 req
To use this feature, simply pass `maxConcurrency: ` when you instantiate the LLM. For example:
```typescript
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const model = new ChatOpenAI({ maxConcurrency: 5 });
```
@@ -50,7 +50,7 @@ const model = new ChatOpenAI({ maxConcurrency: 5 });
If the model provider returns an error from their API, by default LangChain will retry up to 6 times on an exponential backoff. This enables error recovery without any additional effort from you. If you want to change this behavior, you can pass a `maxRetries` option when you instantiate the model. For example:
```typescript
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const model = new ChatOpenAI({ maxRetries: 10 });
```
diff --git a/docs/docs/modules/models/chat/index.mdx b/docs/docs/modules/models/chat/index.mdx
index 0a5ae719ad65..5bf4320b55b3 100644
--- a/docs/docs/modules/models/chat/index.mdx
+++ b/docs/docs/modules/models/chat/index.mdx
@@ -10,7 +10,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: Chat Models
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/models/chat-model)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/models/chat-model)
:::
LangChain provides a standard interface for using chat models. Chat models are a variation on language models.
diff --git a/docs/docs/modules/models/embeddings/additional_functionality.mdx b/docs/docs/modules/models/embeddings/additional_functionality.mdx
index 7aa80f3298d5..ebf5e51398be 100644
--- a/docs/docs/modules/models/embeddings/additional_functionality.mdx
+++ b/docs/docs/modules/models/embeddings/additional_functionality.mdx
@@ -26,7 +26,7 @@ For example, if you set `maxConcurrency: 5`, then LangChain will only send 5 req
To use this feature, simply pass `maxConcurrency: ` when you instantiate the LLM. For example:
```typescript
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const model = new OpenAIEmbeddings({ maxConcurrency: 5 });
```
@@ -36,7 +36,7 @@ const model = new OpenAIEmbeddings({ maxConcurrency: 5 });
If the model provider returns an error from their API, by default LangChain will retry up to 6 times on an exponential backoff. This enables error recovery without any additional effort from you. If you want to change this behavior, you can pass a `maxRetries` option when you instantiate the model. For example:
```typescript
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const model = new OpenAIEmbeddings({ maxRetries: 10 });
```
diff --git a/docs/docs/modules/models/embeddings/index.mdx b/docs/docs/modules/models/embeddings/index.mdx
index 6d052bd8ee48..e6089d63ad18 100644
--- a/docs/docs/modules/models/embeddings/index.mdx
+++ b/docs/docs/modules/models/embeddings/index.mdx
@@ -8,7 +8,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: Embeddings
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/models/text-embedding-model)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/models/text-embedding-model)
:::
Embeddings can be used to create a numerical representation of textual data. This numerical representation is useful because it can be used to find similar documents.
@@ -16,7 +16,7 @@ Embeddings can be used to create a numerical representation of textual data. Thi
Below is an example of how to use the OpenAI embeddings. Embeddings occasionally have different embedding methods for queries versus documents, so the embedding class exposes a `embedQuery` and `embedDocuments` method.
```typescript
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
/* Create instance */
const embeddings = new OpenAIEmbeddings();
diff --git a/docs/docs/modules/models/embeddings/integrations.mdx b/docs/docs/modules/models/embeddings/integrations.mdx
index 20687dac836c..f94146425d74 100644
--- a/docs/docs/modules/models/embeddings/integrations.mdx
+++ b/docs/docs/modules/models/embeddings/integrations.mdx
@@ -12,7 +12,7 @@ LangChain offers a number of Embeddings implementations that integrate with vari
The `OpenAIEmbeddings` class uses the OpenAI API to generate embeddings for a given text. By default it strips new line characters from the text, as recommended by OpenAI, but you can disable this by passing `stripNewLines: false` to the constructor.
```typescript
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const embeddings = new OpenAIEmbeddings({
openAIApiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.OPENAI_API_KEY
@@ -24,7 +24,7 @@ const embeddings = new OpenAIEmbeddings({
The `OpenAIEmbeddings` class uses the OpenAI API on Azure to generate embeddings for a given text. By default it strips new line characters from the text, as recommended by OpenAI, but you can disable this by passing `stripNewLines: false` to the constructor.
```typescript
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const embeddings = new OpenAIEmbeddings({
azureOpenAIApiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.AZURE_OPENAI_API_KEY
@@ -43,7 +43,7 @@ npm install cohere-ai
```
```typescript
-import { CohereEmbeddings } from "langchain/embeddings/cohere";
+import { CohereEmbeddings } from "langchain-gpt4all/embeddings/cohere";
const embeddings = new CohereEmbeddings({
apiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.COHERE_API_KEY
@@ -60,7 +60,7 @@ npm install @tensorflow/tfjs-core @tensorflow/tfjs-converter @tensorflow-models/
```typescript
import "@tensorflow/tfjs-backend-cpu";
-import { TensorFlowEmbeddings } from "langchain/embeddings/tensorflow";
+import { TensorFlowEmbeddings } from "langchain-gpt4all/embeddings/tensorflow";
const embeddings = new TensorFlowEmbeddings();
```
@@ -76,7 +76,7 @@ npm install @huggingface/inference@1
```
```typescript
-import { HuggingFaceInferenceEmbeddings } from "langchain/embeddings/hf";
+import { HuggingFaceInferenceEmbeddings } from "langchain-gpt4all/embeddings/hf";
const embeddings = new HuggingFaceInferenceEmbeddings({
apiKey: "YOUR-API-KEY", // In Node.js defaults to process.env.HUGGINGFACEHUB_API_KEY
diff --git a/docs/docs/modules/models/index.mdx b/docs/docs/modules/models/index.mdx
index ae76e9ab69f8..ab14808c9352 100644
--- a/docs/docs/modules/models/index.mdx
+++ b/docs/docs/modules/models/index.mdx
@@ -9,7 +9,7 @@ import DocCardList from "@theme/DocCardList";
# Models
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/models/)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/models/)
:::
Models are a core component of LangChain. LangChain is not a provider of models, but rather provides a standard interface through which you can interact with a variety of language models.
diff --git a/docs/docs/modules/models/llms/additional_functionality.mdx b/docs/docs/modules/models/llms/additional_functionality.mdx
index 67f0724e60c8..2d177419a44a 100644
--- a/docs/docs/modules/models/llms/additional_functionality.mdx
+++ b/docs/docs/modules/models/llms/additional_functionality.mdx
@@ -40,7 +40,7 @@ The default cache is stored in-memory. This means that if you restart your appli
To enable it you can pass `cache: true` when you instantiate the LLM. For example:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({ cache: true });
```
@@ -56,8 +56,8 @@ npm install redis
Then, you can pass a `cache` option when you instantiate the LLM. For example:
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { RedisCache } from "langchain/cache/redis";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RedisCache } from "langchain-gpt4all/cache/redis";
import { createClient } from "redis";
// See https://github.com/redis/node-redis for connection options
@@ -92,7 +92,7 @@ For example, if you set `maxConcurrency: 5`, then LangChain will only send 5 req
To use this feature, simply pass `maxConcurrency: ` when you instantiate the LLM. For example:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({ maxConcurrency: 5 });
```
@@ -102,7 +102,7 @@ const model = new OpenAI({ maxConcurrency: 5 });
If the model provider returns an error from their API, by default LangChain will retry up to 6 times on an exponential backoff. This enables error recovery without any additional effort from you. If you want to change this behavior, you can pass a `maxRetries` option when you instantiate the model. For example:
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({ maxRetries: 10 });
```
diff --git a/docs/docs/modules/models/llms/index.mdx b/docs/docs/modules/models/llms/index.mdx
index 8473c024ee63..9b41e9bd40d8 100644
--- a/docs/docs/modules/models/llms/index.mdx
+++ b/docs/docs/modules/models/llms/index.mdx
@@ -10,7 +10,7 @@ import DocCardList from "@theme/DocCardList";
# Getting Started: LLMs
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/models/language-model)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/models/language-model)
:::
LangChain provides a standard interface for using a variety of LLMs.
diff --git a/docs/docs/modules/models/llms/integrations.mdx b/docs/docs/modules/models/llms/integrations.mdx
index aaab240a96db..0360985192c8 100644
--- a/docs/docs/modules/models/llms/integrations.mdx
+++ b/docs/docs/modules/models/llms/integrations.mdx
@@ -10,7 +10,7 @@ LangChain offers a number of LLM implementations that integrate with various mod
## `OpenAI`
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({
temperature: 0.9,
@@ -25,7 +25,7 @@ console.log({ res });
## Azure `OpenAI`
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({
temperature: 0.9,
@@ -47,7 +47,7 @@ npm install @huggingface/inference@1
```
```typescript
-import { HuggingFaceInference } from "langchain/llms/hf";
+import { HuggingFaceInference } from "langchain-gpt4all/llms/hf";
const model = new HuggingFaceInference({
model: "gpt2",
@@ -64,7 +64,7 @@ npm install cohere-ai
```
```typescript
-import { Cohere } from "langchain/llms/cohere";
+import { Cohere } from "langchain-gpt4all/llms/cohere";
const model = new Cohere({
maxTokens: 20,
@@ -83,7 +83,7 @@ npm install replicate
```
```typescript
-import { Replicate } from "langchain/llms/replicate";
+import { Replicate } from "langchain-gpt4all/llms/replicate";
const model = new Replicate({
model:
@@ -103,7 +103,7 @@ npm install gpt4all
```
```typescript
-import { GPT4All } from "langchain/llms/gpt4all";
+import { GPT4All } from "langchain-gpt4all/llms/gpt4all";
const model = new GPT4All({
model: "gpt4all-lora-unfiltered-quantized",
@@ -126,7 +126,7 @@ LangChain integrates with PromptLayer for logging and debugging prompts and resp
2. Create an API token and pass it either as `promptLayerApiKey` argument in the `PromptLayerOpenAI` constructor or in the `PROMPTLAYER_API_KEY` environment variable.
```typescript
-import { PromptLayerOpenAI } from "langchain/llms/openai";
+import { PromptLayerOpenAI } from "langchain-gpt4all/llms/openai";
const model = new PromptLayerOpenAI({
temperature: 0.9,
@@ -146,7 +146,7 @@ LangChain integrates with PromptLayer for logging and debugging prompts and resp
2. Create an API token and pass it either as `promptLayerApiKey` argument in the `PromptLayerOpenAI` constructor or in the `PROMPTLAYER_API_KEY` environment variable.
```typescript
-import { PromptLayerOpenAI } from "langchain/llms/openai";
+import { PromptLayerOpenAI } from "langchain-gpt4all/llms/openai";
const model = new PromptLayerOpenAI({
temperature: 0.9,
diff --git a/docs/docs/modules/prompts/example_selectors/index.mdx b/docs/docs/modules/prompts/example_selectors/index.mdx
index 984ab5e4dfcc..62d83e0564f4 100644
--- a/docs/docs/modules/prompts/example_selectors/index.mdx
+++ b/docs/docs/modules/prompts/example_selectors/index.mdx
@@ -8,7 +8,7 @@ import CodeBlock from "@theme/CodeBlock";
# Example Selectors
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/prompts/example-selectors)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/prompts/example-selectors)
:::
If you have a large number of examples, you may need to programmatically select which ones to include in the prompt. The ExampleSelector is the class responsible for doing so. The base interface is defined as below.
diff --git a/docs/docs/modules/prompts/index.mdx b/docs/docs/modules/prompts/index.mdx
index f44bf9de5352..80ac99ad746d 100644
--- a/docs/docs/modules/prompts/index.mdx
+++ b/docs/docs/modules/prompts/index.mdx
@@ -9,7 +9,7 @@ import DocCardList from "@theme/DocCardList";
# Prompts
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/prompts)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/prompts)
:::
LangChain provides several utilities to help manage prompts for language models, including chat models.
diff --git a/docs/docs/modules/prompts/output_parsers/index.mdx b/docs/docs/modules/prompts/output_parsers/index.mdx
index e28c68da367d..096658918228 100644
--- a/docs/docs/modules/prompts/output_parsers/index.mdx
+++ b/docs/docs/modules/prompts/output_parsers/index.mdx
@@ -8,7 +8,7 @@ import CodeBlock from "@theme/CodeBlock";
# Output Parsers
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/prompts/output-parser)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/prompts/output-parser)
:::
Language models output text. But many times you may want to get more structured information than just text back. This is where output parsers come in.
diff --git a/docs/docs/modules/prompts/prompt_templates/index.mdx b/docs/docs/modules/prompts/prompt_templates/index.mdx
index e20b0a79d6eb..7e571dd3c309 100644
--- a/docs/docs/modules/prompts/prompt_templates/index.mdx
+++ b/docs/docs/modules/prompts/prompt_templates/index.mdx
@@ -11,7 +11,7 @@ import DocCardList from "@theme/DocCardList";
# Prompt Templates
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/components/prompts/prompt-template)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/components/prompts/prompt-template)
:::
A `PromptTemplate` allows you to make use of templating to generate a prompt. This is useful for when you want to use the same prompt outline in multiple places, but with certain values changed.
diff --git a/docs/docs/modules/schema/chat-messages.md b/docs/docs/modules/schema/chat-messages.md
index ba3bdf7dafff..b520a9bb1520 100644
--- a/docs/docs/modules/schema/chat-messages.md
+++ b/docs/docs/modules/schema/chat-messages.md
@@ -12,7 +12,7 @@ The primary interface through which end users interact with LLMs is a chat inter
A chat message representing information that should be instructions to the AI system.
```typescript
-import { SystemChatMessage } from "langchain/schema";
+import { SystemChatMessage } from "langchain-gpt4all/schema";
new SystemChatMessage("You are a nice assistant");
```
@@ -22,7 +22,7 @@ new SystemChatMessage("You are a nice assistant");
A chat message representing information coming from a human interacting with the AI system.
```typescript
-import { HumanChatMessage } from "langchain/schema";
+import { HumanChatMessage } from "langchain-gpt4all/schema";
new HumanChatMessage("Hello, how are you?");
```
@@ -32,7 +32,7 @@ new HumanChatMessage("Hello, how are you?");
A chat message representing information coming from the AI system.
```typescript
-import { AIChatMessage } from "langchain/schema";
+import { AIChatMessage } from "langchain-gpt4all/schema";
new AIChatMessage("I am doing well, thank you!");
```
diff --git a/docs/docs/modules/schema/document.md b/docs/docs/modules/schema/document.md
index 2efe793b3030..0a130e3015c0 100644
--- a/docs/docs/modules/schema/document.md
+++ b/docs/docs/modules/schema/document.md
@@ -16,7 +16,7 @@ interface Document {
You can create a document object rather easily in LangChain with:
```typescript
-import { Document } from "langchain/document";
+import { Document } from "langchain-gpt4all/document";
const doc = new Document({ pageContent: "foo" });
```
@@ -24,7 +24,7 @@ const doc = new Document({ pageContent: "foo" });
You can create one with metadata with:
```typescript
-import { Document } from "langchain/document";
+import { Document } from "langchain-gpt4all/document";
const doc = new Document({ pageContent: "foo", metadata: { source: "1" } });
```
diff --git a/docs/docs/production/callbacks/index.mdx b/docs/docs/production/callbacks/index.mdx
index 45d58169fb86..5c16d2bc78e0 100644
--- a/docs/docs/production/callbacks/index.mdx
+++ b/docs/docs/production/callbacks/index.mdx
@@ -49,7 +49,7 @@ import VerboseExample from "@examples/callbacks/docs_verbose.ts";
### Built-in handlers
-LangChain provides a few built-in handlers that you can use to get started. These are available in the `langchain/callbacks` module. The most basic handler is the `ConsoleCallbackHandler`, which simply logs all events to the console. In the future we will add more default handlers to the library. Note that when the `verbose` flag on the object is set to `true`, the `ConsoleCallbackHandler` will be invoked even without being explicitly passed in.
+LangChain provides a few built-in handlers that you can use to get started. These are available in the `langchain-gpt4all/callbacks` module. The most basic handler is the `ConsoleCallbackHandler`, which simply logs all events to the console. In the future we will add more default handlers to the library. Note that when the `verbose` flag on the object is set to `true`, the `ConsoleCallbackHandler` will be invoked even without being explicitly passed in.
import ConsoleExample from "@examples/callbacks/console_handler.ts";
diff --git a/docs/docs/production/deployment.md b/docs/docs/production/deployment.md
index a34b467efd87..5492441bda95 100644
--- a/docs/docs/production/deployment.md
+++ b/docs/docs/production/deployment.md
@@ -32,4 +32,4 @@ See below for a list of deployment options for your LangChain app. If you don't
[Fly.io](https://fly.io) is a platform for deploying apps to the cloud. It's a great option for deploying your app to a container environment.
-See [our Fly.io template](https://github.com/hwchase17/langchain-template-node-fly) for an example of how to deploy your app to Fly.io.
+See [our Fly.io template](https://github.com/hwchase17/langchain-gpt4all-template-node-fly) for an example of how to deploy your app to Fly.io.
diff --git a/docs/docs/production/tracing.md b/docs/docs/production/tracing.md
index d6dad9ef8a55..e10568ca1849 100644
--- a/docs/docs/production/tracing.md
+++ b/docs/docs/production/tracing.md
@@ -1,18 +1,18 @@
# Tracing
-Similar to the Python `langchain` package, JS `langchain` also supports tracing.
+Similar to the Python `langchain-gpt4all` package, JS `langchain-gpt4all` also supports tracing.
-You can view an overview of tracing [here.](https://langchain.readthedocs.io/en/latest/tracing.html)
-To spin up the tracing backend, run `docker compose up` (or `docker-compose up` if on using an older version of `docker`) in the `langchain` directory.
-You can also use the `langchain-server` command if you have the python `langchain` package installed.
+You can view an overview of tracing [here.](https://langchain-gpt4all.readthedocs.io/en/latest/tracing.html)
+To spin up the tracing backend, run `docker compose up` (or `docker-compose up` if on using an older version of `docker`) in the `langchain-gpt4all` directory.
+You can also use the `langchain-gpt4all-server` command if you have the python `langchain-gpt4all` package installed.
-Here's an example of how to use tracing in `langchain.js`. All that needs to be done is setting the `LANGCHAIN_TRACING` environment variable to `true`.
+Here's an example of how to use tracing in `langchain-gpt4all.js`. All that needs to be done is setting the `LANGCHAIN_TRACING` environment variable to `true`.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
import process from "process";
export const run = async () => {
@@ -48,10 +48,10 @@ export const run = async () => {
Tracing works with concurrency out of the box.
```typescript
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
import process from "process";
export const run = async () => {
diff --git a/docs/docs/use_cases/api.mdx b/docs/docs/use_cases/api.mdx
index 35e4745f5a66..b5c19e6ce2b2 100644
--- a/docs/docs/use_cases/api.mdx
+++ b/docs/docs/use_cases/api.mdx
@@ -6,7 +6,7 @@ sidebar_position: 4
# Interacting with APIs
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/use-cases/apis)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/use-cases/apis)
:::
Lots of data and information is stored behind APIs.
diff --git a/docs/docs/use_cases/personal_assistants.mdx b/docs/docs/use_cases/personal_assistants.mdx
index ff7bf363bb04..4b96240d8ad7 100644
--- a/docs/docs/use_cases/personal_assistants.mdx
+++ b/docs/docs/use_cases/personal_assistants.mdx
@@ -6,7 +6,7 @@ sidebar_position: 1
# Personal Assistants
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/use-cases/personal-assistants)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/use-cases/personal-assistants)
:::
We use "personal assistant" here in a very broad sense.
diff --git a/docs/docs/use_cases/question_answering.mdx b/docs/docs/use_cases/question_answering.mdx
index ed70e2971403..e0ddf176d0e3 100644
--- a/docs/docs/use_cases/question_answering.mdx
+++ b/docs/docs/use_cases/question_answering.mdx
@@ -6,7 +6,7 @@ sidebar_position: 2
# Question Answering
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/use-cases/qa-docs)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/use-cases/qa-docs)
:::
Question answering in this context refers to question answering over your document data.
diff --git a/docs/docs/use_cases/summarization.mdx b/docs/docs/use_cases/summarization.mdx
index 846c54efd904..83d1fe7c5bb4 100644
--- a/docs/docs/use_cases/summarization.mdx
+++ b/docs/docs/use_cases/summarization.mdx
@@ -6,7 +6,7 @@ sidebar_position: 6
# Summarization
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/use-cases/summarization)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/use-cases/summarization)
:::
A common use case is wanting to summarize long documents.
diff --git a/docs/docs/use_cases/tabular.mdx b/docs/docs/use_cases/tabular.mdx
index daa48e48f7ab..f5a0da839b45 100644
--- a/docs/docs/use_cases/tabular.mdx
+++ b/docs/docs/use_cases/tabular.mdx
@@ -6,7 +6,7 @@ sidebar_position: 3
# Tabular Question Answering
:::info
-[Conceptual Guide](https://docs.langchain.com/docs/use-cases/qa-tabular)
+[Conceptual Guide](https://docs.langchain-gpt4all.com/docs/use-cases/qa-tabular)
:::
Lots of data and information is stored in tabular data, whether it be csvs, excel sheets, or SQL tables.
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index 88875b7c235d..44add424005c 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -17,7 +17,7 @@ const config = {
mendableAnonKey: process.env.MENDABLE_ANON_KEY,
},
// Set the production url of your site here
- url: "https://js.langchain.com",
+ url: "https://js.langchain-gpt4all.com",
// Set the // pathname under which your site is served
// For GitHub pages deployment, it is often '//'
baseUrl: "/",
@@ -29,7 +29,7 @@ const config = {
[
"docusaurus-plugin-typedoc",
{
- tsconfig: "../langchain/tsconfig.json",
+ tsconfig: "../langchain-gpt4all/tsconfig.json",
},
],
() => ({
@@ -74,7 +74,8 @@ const config = {
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
- editUrl: "https://github.com/hwchase17/langchainjs/edit/main/docs/",
+ editUrl:
+ "https://github.com/lucasjohnston/langchainjs-gpt4all/edit/main/docs/",
remarkPlugins: [
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
],
@@ -120,12 +121,12 @@ const config = {
title: "🦜️🔗 LangChain",
items: [
{
- href: "https://docs.langchain.com/docs/",
+ href: "https://docs.langchain-gpt4all.com/docs/",
label: "Concepts",
position: "left",
},
{
- href: "https://python.langchain.com/en/latest/",
+ href: "https://python.langchain-gpt4all.com/en/latest/",
label: "Python Docs",
position: "left",
},
@@ -136,7 +137,7 @@ const config = {
},
// Please keep GitHub link to the right for consistency.
{
- href: "https://github.com/hwchase17/langchainjs",
+ href: "https://github.com/lucasjohnston/langchainjs-gpt4all",
label: "GitHub",
position: "right",
},
@@ -163,11 +164,11 @@ const config = {
items: [
{
label: "Python",
- href: "https://github.com/hwchase17/langchain",
+ href: "https://github.com/hwchase17/langchain-gpt4all",
},
{
label: "JS/TS",
- href: "https://github.com/hwchase17/langchainjs",
+ href: "https://github.com/lucasjohnston/langchainjs-gpt4all",
},
],
},
@@ -176,11 +177,11 @@ const config = {
items: [
{
label: "Homepage",
- href: "https://langchain.com",
+ href: "https://langchain-gpt4all.com",
},
{
label: "Blog",
- href: "https://blog.langchain.dev",
+ href: "https://blog.langchain-gpt4all.dev",
},
],
},
diff --git a/examples/package.json b/examples/package.json
index 762d78377469..27f9b5507a32 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -34,7 +34,7 @@
"chromadb": "^1.4.0",
"graphql": "^16.6.0",
"js-yaml": "^4.1.0",
- "langchain": "workspace:*",
+ "langchain-gpt4all": "workspace:*",
"ml-distance": "^4.0.0",
"mongodb": "^5.2.0",
"prisma": "^4.11.0",
diff --git a/examples/src/README.md b/examples/src/README.md
index efc655c92d25..2c839f225ba6 100644
--- a/examples/src/README.md
+++ b/examples/src/README.md
@@ -1,4 +1,4 @@
-# langchain-examples
+# langchain-gpt4all-examples
This folder contains examples of how to use LangChain.
@@ -6,7 +6,7 @@ This folder contains examples of how to use LangChain.
What you'll usually want to do.
-First, build langchain. From the repository root, run:
+First, build langchain-gpt4all. From the repository root, run:
```sh
yarn
diff --git a/examples/src/agents/aiplugin-tool.ts b/examples/src/agents/aiplugin-tool.ts
index 02b3ed2c44fa..d10fb4956ad1 100644
--- a/examples/src/agents/aiplugin-tool.ts
+++ b/examples/src/agents/aiplugin-tool.ts
@@ -1,10 +1,10 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
import {
RequestsGetTool,
RequestsPostTool,
AIPluginTool,
-} from "langchain/tools";
+} from "langchain-gpt4all/tools";
export const run = async () => {
const tools = [
diff --git a/examples/src/agents/chat_convo_with_tracing.ts b/examples/src/agents/chat_convo_with_tracing.ts
index ad47f4020cff..ef0a483a987c 100644
--- a/examples/src/agents/chat_convo_with_tracing.ts
+++ b/examples/src/agents/chat_convo_with_tracing.ts
@@ -1,10 +1,10 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
export const run = async () => {
- process.env.LANGCHAIN_HANDLER = "langchain";
+ process.env.LANGCHAIN_HANDLER = "langchain-gpt4all";
const model = new ChatOpenAI({ temperature: 0 });
const tools = [
new SerpAPI(process.env.SERPAPI_API_KEY, {
diff --git a/examples/src/agents/chat_mrkl.ts b/examples/src/agents/chat_mrkl.ts
index 474d3145ca98..19b1a78f828f 100644
--- a/examples/src/agents/chat_mrkl.ts
+++ b/examples/src/agents/chat_mrkl.ts
@@ -1,7 +1,7 @@
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
export const run = async () => {
const model = new ChatOpenAI({ temperature: 0 });
diff --git a/examples/src/agents/chat_mrkl_with_tracing.ts b/examples/src/agents/chat_mrkl_with_tracing.ts
index c837bc2fe442..48563c18ac96 100644
--- a/examples/src/agents/chat_mrkl_with_tracing.ts
+++ b/examples/src/agents/chat_mrkl_with_tracing.ts
@@ -1,7 +1,7 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
export const run = async () => {
process.env.LANGCHAIN_TRACING = "true";
diff --git a/examples/src/agents/concurrent_mrkl.ts b/examples/src/agents/concurrent_mrkl.ts
index e0effd8058be..ee91e367f880 100644
--- a/examples/src/agents/concurrent_mrkl.ts
+++ b/examples/src/agents/concurrent_mrkl.ts
@@ -1,7 +1,7 @@
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
import process from "process";
export const run = async () => {
diff --git a/examples/src/agents/custom_agent.ts b/examples/src/agents/custom_agent.ts
index 67490a0d60e0..dc6f1e12b44a 100644
--- a/examples/src/agents/custom_agent.ts
+++ b/examples/src/agents/custom_agent.ts
@@ -1,8 +1,8 @@
-import { AgentExecutor, ZeroShotAgent } from "langchain/agents";
-import { LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { AgentExecutor, ZeroShotAgent } from "langchain-gpt4all/agents";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/agents/custom_llm_agent.ts b/examples/src/agents/custom_llm_agent.ts
index a26b35e3ac4c..7dded1df254d 100644
--- a/examples/src/agents/custom_llm_agent.ts
+++ b/examples/src/agents/custom_llm_agent.ts
@@ -2,24 +2,24 @@ import {
LLMSingleActionAgent,
AgentActionOutputParser,
AgentExecutor,
-} from "langchain/agents";
-import { LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
+} from "langchain-gpt4all/agents";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
import {
BasePromptTemplate,
BaseStringPromptTemplate,
SerializedBasePromptTemplate,
renderTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
import {
InputValues,
PartialValues,
AgentStep,
AgentAction,
AgentFinish,
-} from "langchain/schema";
-import { SerpAPI, Tool } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+} from "langchain-gpt4all/schema";
+import { SerpAPI, Tool } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
const PREFIX = `Answer the following questions as best you can. You have access to the following tools:`;
const formatInstructions = (
diff --git a/examples/src/agents/custom_llm_agent_chat.ts b/examples/src/agents/custom_llm_agent_chat.ts
index a2887c5bf6c2..de9fc7c98dd6 100644
--- a/examples/src/agents/custom_llm_agent_chat.ts
+++ b/examples/src/agents/custom_llm_agent_chat.ts
@@ -2,15 +2,15 @@ import {
AgentActionOutputParser,
AgentExecutor,
LLMSingleActionAgent,
-} from "langchain/agents";
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+} from "langchain-gpt4all/agents";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
BaseChatPromptTemplate,
BasePromptTemplate,
SerializedBasePromptTemplate,
renderTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
import {
AgentAction,
AgentFinish,
@@ -19,9 +19,9 @@ import {
HumanChatMessage,
InputValues,
PartialValues,
-} from "langchain/schema";
-import { SerpAPI, Tool } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+} from "langchain-gpt4all/schema";
+import { SerpAPI, Tool } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
const PREFIX = `Answer the following questions as best you can. You have access to the following tools:`;
const formatInstructions = (
diff --git a/examples/src/agents/custom_tool.ts b/examples/src/agents/custom_tool.ts
index d8c0336b60b9..ddad67cdbdb1 100644
--- a/examples/src/agents/custom_tool.ts
+++ b/examples/src/agents/custom_tool.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { DynamicTool } from "langchain/tools";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { DynamicTool } from "langchain-gpt4all/tools";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/agents/json.ts b/examples/src/agents/json.ts
index 9d61dea29c5e..d647f48c5f80 100644
--- a/examples/src/agents/json.ts
+++ b/examples/src/agents/json.ts
@@ -1,8 +1,8 @@
import * as fs from "fs";
import * as yaml from "js-yaml";
-import { OpenAI } from "langchain/llms/openai";
-import { JsonSpec, JsonObject } from "langchain/tools";
-import { JsonToolkit, createJsonAgent } from "langchain/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { JsonSpec, JsonObject } from "langchain-gpt4all/tools";
+import { JsonToolkit, createJsonAgent } from "langchain-gpt4all/agents";
export const run = async () => {
let data: JsonObject;
diff --git a/examples/src/agents/load_from_hub.ts b/examples/src/agents/load_from_hub.ts
index 31d90d586969..eaa721e44e90 100644
--- a/examples/src/agents/load_from_hub.ts
+++ b/examples/src/agents/load_from_hub.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { AgentExecutor } from "langchain/agents";
-import { loadAgent } from "langchain/agents/load";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { AgentExecutor } from "langchain-gpt4all/agents";
+import { loadAgent } from "langchain-gpt4all/agents/load";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/agents/mrkl.ts b/examples/src/agents/mrkl.ts
index b1e2a6e0b736..e1445875a4fe 100644
--- a/examples/src/agents/mrkl.ts
+++ b/examples/src/agents/mrkl.ts
@@ -1,7 +1,7 @@
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { OpenAI } from "langchain/llms/openai";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
const model = new OpenAI({ temperature: 0 });
const tools = [
diff --git a/examples/src/agents/mrkl_browser.ts b/examples/src/agents/mrkl_browser.ts
index b25821ece38f..3cfd7fd8567e 100644
--- a/examples/src/agents/mrkl_browser.ts
+++ b/examples/src/agents/mrkl_browser.ts
@@ -1,9 +1,9 @@
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
-import { WebBrowser } from "langchain/tools/webbrowser";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
+import { WebBrowser } from "langchain-gpt4all/tools/webbrowser";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/agents/mrkl_with_tracing.ts b/examples/src/agents/mrkl_with_tracing.ts
index 4a85aaea5462..e58ff7a848a5 100644
--- a/examples/src/agents/mrkl_with_tracing.ts
+++ b/examples/src/agents/mrkl_with_tracing.ts
@@ -1,7 +1,7 @@
-import { OpenAI } from "langchain/llms/openai";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
-import { Calculator } from "langchain/tools/calculator";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
import process from "process";
export const run = async () => {
diff --git a/examples/src/agents/openapi.ts b/examples/src/agents/openapi.ts
index 130a61cc186f..dc2ae8b17b81 100644
--- a/examples/src/agents/openapi.ts
+++ b/examples/src/agents/openapi.ts
@@ -1,8 +1,8 @@
import * as fs from "fs";
import * as yaml from "js-yaml";
-import { JsonSpec, JsonObject } from "langchain/tools";
-import { createOpenApiAgent, OpenApiToolkit } from "langchain/agents";
-import { OpenAI } from "langchain/llms/openai";
+import { JsonSpec, JsonObject } from "langchain-gpt4all/tools";
+import { createOpenApiAgent, OpenApiToolkit } from "langchain-gpt4all/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
let data: JsonObject;
diff --git a/examples/src/agents/sql.ts b/examples/src/agents/sql.ts
index 9be3d101e663..7b871a4233b5 100644
--- a/examples/src/agents/sql.ts
+++ b/examples/src/agents/sql.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { SqlDatabase } from "langchain/sql_db";
-import { createSqlAgent, SqlToolkit } from "langchain/agents";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { SqlDatabase } from "langchain-gpt4all/sql_db";
+import { createSqlAgent, SqlToolkit } from "langchain-gpt4all/agents";
import { DataSource } from "typeorm";
/** This example uses Chinook database, which is a sample database available for SQL Server, Oracle, MySQL, etc.
diff --git a/examples/src/agents/streaming.ts b/examples/src/agents/streaming.ts
index b44b8728473e..f5c1955cffeb 100644
--- a/examples/src/agents/streaming.ts
+++ b/examples/src/agents/streaming.ts
@@ -1,9 +1,9 @@
-import { LLMChain } from "langchain/chains";
-import { AgentExecutor, ZeroShotAgent } from "langchain/agents";
-import { BaseCallbackHandler } from "langchain/callbacks";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { Calculator } from "langchain/tools/calculator";
-import { AgentAction } from "langchain/schema";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { AgentExecutor, ZeroShotAgent } from "langchain-gpt4all/agents";
+import { BaseCallbackHandler } from "langchain-gpt4all/callbacks";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { Calculator } from "langchain-gpt4all/tools/calculator";
+import { AgentAction } from "langchain-gpt4all/schema";
export const run = async () => {
// You can implement your own callback handler by extending BaseCallbackHandler
diff --git a/examples/src/agents/vectorstore.ts b/examples/src/agents/vectorstore.ts
index 6ccd847c01d3..72e4f86ae24d 100644
--- a/examples/src/agents/vectorstore.ts
+++ b/examples/src/agents/vectorstore.ts
@@ -1,13 +1,13 @@
-import { OpenAI } from "langchain/llms/openai";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
import {
VectorStoreToolkit,
createVectorStoreAgent,
VectorStoreInfo,
-} from "langchain/agents";
+} from "langchain-gpt4all/agents";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/agents/zapier_mrkl.ts b/examples/src/agents/zapier_mrkl.ts
index 30b0b8cbe8ec..73e872b70c37 100644
--- a/examples/src/agents/zapier_mrkl.ts
+++ b/examples/src/agents/zapier_mrkl.ts
@@ -1,9 +1,9 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ZapierNLAWrapper } from "langchain/tools";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ZapierNLAWrapper } from "langchain-gpt4all/tools";
import {
initializeAgentExecutorWithOptions,
ZapierToolKit,
-} from "langchain/agents";
+} from "langchain-gpt4all/agents";
const model = new OpenAI({ temperature: 0 });
const zapier = new ZapierNLAWrapper();
diff --git a/examples/src/callbacks/console_handler.ts b/examples/src/callbacks/console_handler.ts
index f5beaec0d38c..17c654cd2daf 100644
--- a/examples/src/callbacks/console_handler.ts
+++ b/examples/src/callbacks/console_handler.ts
@@ -1,7 +1,7 @@
-import { ConsoleCallbackHandler } from "langchain/callbacks";
-import { LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+import { ConsoleCallbackHandler } from "langchain-gpt4all/callbacks";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
const handler = new ConsoleCallbackHandler();
diff --git a/examples/src/callbacks/custom_handler.ts b/examples/src/callbacks/custom_handler.ts
index 4501cd7abde0..4336fd98d881 100644
--- a/examples/src/callbacks/custom_handler.ts
+++ b/examples/src/callbacks/custom_handler.ts
@@ -1,5 +1,9 @@
-import { BaseCallbackHandler } from "langchain/callbacks";
-import { AgentAction, AgentFinish, ChainValues } from "langchain/schema";
+import { BaseCallbackHandler } from "langchain-gpt4all/callbacks";
+import {
+ AgentAction,
+ AgentFinish,
+ ChainValues,
+} from "langchain-gpt4all/schema";
export class MyCallbackHandler extends BaseCallbackHandler {
name = "MyCallbackHandler";
diff --git a/examples/src/callbacks/docs_constructor_callbacks.ts b/examples/src/callbacks/docs_constructor_callbacks.ts
index 640970888417..8d3d0ff65ebc 100644
--- a/examples/src/callbacks/docs_constructor_callbacks.ts
+++ b/examples/src/callbacks/docs_constructor_callbacks.ts
@@ -1,5 +1,5 @@
-import { ConsoleCallbackHandler } from "langchain/callbacks";
-import { OpenAI } from "langchain/llms/openai";
+import { ConsoleCallbackHandler } from "langchain-gpt4all/callbacks";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const llm = new OpenAI({
temperature: 0,
diff --git a/examples/src/callbacks/docs_request_callbacks.ts b/examples/src/callbacks/docs_request_callbacks.ts
index 790b56c0f5d4..4953daf16b35 100644
--- a/examples/src/callbacks/docs_request_callbacks.ts
+++ b/examples/src/callbacks/docs_request_callbacks.ts
@@ -1,5 +1,5 @@
-import { ConsoleCallbackHandler } from "langchain/callbacks";
-import { OpenAI } from "langchain/llms/openai";
+import { ConsoleCallbackHandler } from "langchain-gpt4all/callbacks";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const llm = new OpenAI({
temperature: 0,
diff --git a/examples/src/callbacks/docs_verbose.ts b/examples/src/callbacks/docs_verbose.ts
index e1f63a640530..7b4c92e71cb7 100644
--- a/examples/src/callbacks/docs_verbose.ts
+++ b/examples/src/callbacks/docs_verbose.ts
@@ -1,6 +1,6 @@
-import { PromptTemplate } from "langchain/prompts";
-import { LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const chain = new LLMChain({
llm: new OpenAI({ temperature: 0 }),
diff --git a/examples/src/chains/advanced_subclass.ts b/examples/src/chains/advanced_subclass.ts
index 806709013ac8..8aa902cb3d49 100644
--- a/examples/src/chains/advanced_subclass.ts
+++ b/examples/src/chains/advanced_subclass.ts
@@ -1,7 +1,7 @@
-import { CallbackManagerForChainRun } from "langchain/callbacks";
-import { BaseChain as _ } from "langchain/chains";
-import { BaseMemory } from "langchain/memory";
-import { ChainValues } from "langchain/schema";
+import { CallbackManagerForChainRun } from "langchain-gpt4all/callbacks";
+import { BaseChain as _ } from "langchain-gpt4all/chains";
+import { BaseMemory } from "langchain-gpt4all/memory";
+import { ChainValues } from "langchain-gpt4all/schema";
abstract class BaseChain {
memory?: BaseMemory;
diff --git a/examples/src/chains/advanced_subclass_call.ts b/examples/src/chains/advanced_subclass_call.ts
index 9b120751cf22..587aa90b47bb 100644
--- a/examples/src/chains/advanced_subclass_call.ts
+++ b/examples/src/chains/advanced_subclass_call.ts
@@ -1,8 +1,8 @@
-import { BasePromptTemplate, PromptTemplate } from "langchain/prompts";
-import { BaseLanguageModel } from "langchain/base_language";
-import { CallbackManagerForChainRun } from "langchain/callbacks";
-import { BaseChain, ChainInputs } from "langchain/chains";
-import { ChainValues } from "langchain/schema";
+import { BasePromptTemplate, PromptTemplate } from "langchain-gpt4all/prompts";
+import { BaseLanguageModel } from "langchain-gpt4all/base_language";
+import { CallbackManagerForChainRun } from "langchain-gpt4all/callbacks";
+import { BaseChain, ChainInputs } from "langchain-gpt4all/chains";
+import { ChainValues } from "langchain-gpt4all/schema";
export interface MyCustomChainInputs extends ChainInputs {
llm: BaseLanguageModel;
diff --git a/examples/src/chains/analyze_document_chain_summarize.ts b/examples/src/chains/analyze_document_chain_summarize.ts
index d65cbd39d4ef..2862be5c9438 100644
--- a/examples/src/chains/analyze_document_chain_summarize.ts
+++ b/examples/src/chains/analyze_document_chain_summarize.ts
@@ -1,5 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadSummarizationChain, AnalyzeDocumentChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import {
+ loadSummarizationChain,
+ AnalyzeDocumentChain,
+} from "langchain-gpt4all/chains";
import * as fs from "fs";
export const run = async () => {
diff --git a/examples/src/chains/chat_vector_db_chroma.ts b/examples/src/chains/chat_vector_db_chroma.ts
index a6834ee7f89d..8385765020aa 100644
--- a/examples/src/chains/chat_vector_db_chroma.ts
+++ b/examples/src/chains/chat_vector_db_chroma.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ConversationalRetrievalQAChain } from "langchain/chains";
-import { Chroma } from "langchain/vectorstores/chroma";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ConversationalRetrievalQAChain } from "langchain-gpt4all/chains";
+import { Chroma } from "langchain-gpt4all/vectorstores/chroma";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
// to run this first run chroma's docker-container with `docker-compose up -d --build`
diff --git a/examples/src/chains/constitutional_chain.ts b/examples/src/chains/constitutional_chain.ts
index 9843d10d2731..e8b9b52de3c8 100644
--- a/examples/src/chains/constitutional_chain.ts
+++ b/examples/src/chains/constitutional_chain.ts
@@ -2,9 +2,9 @@ import {
ConstitutionalPrinciple,
ConstitutionalChain,
LLMChain,
-} from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+} from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export async function run() {
// LLMs can produce harmful, toxic, or otherwise undesirable outputs. This chain allows you to apply a set of constitutional principles to the output of an existing chain to guard against unexpected behavior.
diff --git a/examples/src/chains/conversation_chain.ts b/examples/src/chains/conversation_chain.ts
index 221a60bfda1c..34620f46f548 100644
--- a/examples/src/chains/conversation_chain.ts
+++ b/examples/src/chains/conversation_chain.ts
@@ -1,5 +1,5 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ConversationChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ConversationChain } from "langchain-gpt4all/chains";
export const run = async () => {
const model = new OpenAI({});
diff --git a/examples/src/chains/conversational_qa.ts b/examples/src/chains/conversational_qa.ts
index 1a86dd399ebe..55838cef7346 100644
--- a/examples/src/chains/conversational_qa.ts
+++ b/examples/src/chains/conversational_qa.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ConversationalRetrievalQAChain } from "langchain/chains";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ConversationalRetrievalQAChain } from "langchain-gpt4all/chains";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
export const run = async () => {
diff --git a/examples/src/chains/llm_chain.ts b/examples/src/chains/llm_chain.ts
index 90ccff6fdbdb..a365ca078f10 100644
--- a/examples/src/chains/llm_chain.ts
+++ b/examples/src/chains/llm_chain.ts
@@ -1,12 +1,12 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
PromptTemplate,
SystemMessagePromptTemplate,
-} from "langchain/prompts";
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+} from "langchain-gpt4all/prompts";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
export const run = async () => {
// We can construct an LLMChain from a PromptTemplate and an LLM.
diff --git a/examples/src/chains/llm_chain_stream.ts b/examples/src/chains/llm_chain_stream.ts
index f1771fe3c8cd..894929daddad 100644
--- a/examples/src/chains/llm_chain_stream.ts
+++ b/examples/src/chains/llm_chain_stream.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { LLMChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { LLMChain } from "langchain-gpt4all/chains";
export const run = async () => {
const model = new OpenAI({
diff --git a/examples/src/chains/load_from_hub.ts b/examples/src/chains/load_from_hub.ts
index 95c04aa8356f..83f65f10da72 100644
--- a/examples/src/chains/load_from_hub.ts
+++ b/examples/src/chains/load_from_hub.ts
@@ -1,4 +1,4 @@
-import { loadChain } from "langchain/chains/load";
+import { loadChain } from "langchain-gpt4all/chains/load";
export const run = async () => {
const chain = await loadChain("lc://chains/hello-world/chain.json");
diff --git a/examples/src/chains/multi_prompt.ts b/examples/src/chains/multi_prompt.ts
index 5a459fbf64b8..b1125021aa01 100644
--- a/examples/src/chains/multi_prompt.ts
+++ b/examples/src/chains/multi_prompt.ts
@@ -1,5 +1,5 @@
-import { MultiPromptChain } from "langchain/chains";
-import { OpenAIChat } from "langchain/llms/openai";
+import { MultiPromptChain } from "langchain-gpt4all/chains";
+import { OpenAIChat } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const llm = new OpenAIChat();
diff --git a/examples/src/chains/multi_retrieval_qa.ts b/examples/src/chains/multi_retrieval_qa.ts
index 5e9d0212b86c..7e6c4dc41f3b 100644
--- a/examples/src/chains/multi_retrieval_qa.ts
+++ b/examples/src/chains/multi_retrieval_qa.ts
@@ -1,7 +1,7 @@
-import { MultiRetrievalQAChain } from "langchain/chains";
-import { OpenAIChat } from "langchain/llms/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
+import { MultiRetrievalQAChain } from "langchain-gpt4all/chains";
+import { OpenAIChat } from "langchain-gpt4all/llms/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
export const run = async () => {
const embeddings = new OpenAIEmbeddings();
diff --git a/examples/src/chains/openai_moderation.ts b/examples/src/chains/openai_moderation.ts
index 27bbc16dbeb0..859d4f38029c 100644
--- a/examples/src/chains/openai_moderation.ts
+++ b/examples/src/chains/openai_moderation.ts
@@ -1,6 +1,6 @@
-import { OpenAIModerationChain, LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAIModerationChain, LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
// Define an asynchronous function called run
export async function run() {
diff --git a/examples/src/chains/qa_refine.ts b/examples/src/chains/qa_refine.ts
index 444850ac5b88..c7bbd9b31b1d 100644
--- a/examples/src/chains/qa_refine.ts
+++ b/examples/src/chains/qa_refine.ts
@@ -1,8 +1,8 @@
-import { loadQARefineChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { TextLoader } from "langchain/document_loaders/fs/text";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { loadQARefineChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export async function run() {
// Create the models and chain
diff --git a/examples/src/chains/question_answering.ts b/examples/src/chains/question_answering.ts
index 460d8387fe65..312ea228a70c 100644
--- a/examples/src/chains/question_answering.ts
+++ b/examples/src/chains/question_answering.ts
@@ -1,6 +1,9 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadQAStuffChain, loadQAMapReduceChain } from "langchain/chains";
-import { Document } from "langchain/document";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import {
+ loadQAStuffChain,
+ loadQAMapReduceChain,
+} from "langchain-gpt4all/chains";
+import { Document } from "langchain-gpt4all/document";
export const run = async () => {
// This first example uses the `StuffDocumentsChain`.
diff --git a/examples/src/chains/question_answering_map_reduce.ts b/examples/src/chains/question_answering_map_reduce.ts
index 17810faf3a9f..8e023fafe610 100644
--- a/examples/src/chains/question_answering_map_reduce.ts
+++ b/examples/src/chains/question_answering_map_reduce.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadQAMapReduceChain } from "langchain/chains";
-import { Document } from "langchain/document";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { loadQAMapReduceChain } from "langchain-gpt4all/chains";
+import { Document } from "langchain-gpt4all/document";
export const run = async () => {
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/chains/retrieval_qa.ts b/examples/src/chains/retrieval_qa.ts
index 4c35c9343062..1afda2e51260 100644
--- a/examples/src/chains/retrieval_qa.ts
+++ b/examples/src/chains/retrieval_qa.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { RetrievalQAChain } from "langchain/chains";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RetrievalQAChain } from "langchain-gpt4all/chains";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
export const run = async () => {
diff --git a/examples/src/chains/retrieval_qa_custom.ts b/examples/src/chains/retrieval_qa_custom.ts
index 1ccef1f12062..2b8ca338c841 100644
--- a/examples/src/chains/retrieval_qa_custom.ts
+++ b/examples/src/chains/retrieval_qa_custom.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { RetrievalQAChain, loadQARefineChain } from "langchain/chains";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RetrievalQAChain, loadQARefineChain } from "langchain-gpt4all/chains";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
// Initialize the LLM to use to answer the question.
diff --git a/examples/src/chains/retrieval_qa_with_remote.ts b/examples/src/chains/retrieval_qa_with_remote.ts
index 0271da1f4fd2..4fc7a9d91bd0 100644
--- a/examples/src/chains/retrieval_qa_with_remote.ts
+++ b/examples/src/chains/retrieval_qa_with_remote.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { RetrievalQAChain } from "langchain/chains";
-import { RemoteLangChainRetriever } from "langchain/retrievers/remote";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RetrievalQAChain } from "langchain-gpt4all/chains";
+import { RemoteLangChainRetriever } from "langchain-gpt4all/retrievers/remote";
export const run = async () => {
// Initialize the LLM to use to answer the question.
diff --git a/examples/src/chains/sequential_chain.ts b/examples/src/chains/sequential_chain.ts
index b938cd616df2..677e0e63c0f1 100644
--- a/examples/src/chains/sequential_chain.ts
+++ b/examples/src/chains/sequential_chain.ts
@@ -1,6 +1,6 @@
-import { SequentialChain, LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+import { SequentialChain, LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
// This is an LLMChain to write a synopsis given a title of a play and the era it is set in.
const llm = new OpenAI({ temperature: 0 });
diff --git a/examples/src/chains/simple_sequential_chain.ts b/examples/src/chains/simple_sequential_chain.ts
index 19de9db9f03f..b84a86a06126 100644
--- a/examples/src/chains/simple_sequential_chain.ts
+++ b/examples/src/chains/simple_sequential_chain.ts
@@ -1,6 +1,6 @@
-import { SimpleSequentialChain, LLMChain } from "langchain/chains";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+import { SimpleSequentialChain, LLMChain } from "langchain-gpt4all/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
// This is an LLMChain to write a synopsis given a title of a play.
const llm = new OpenAI({ temperature: 0 });
diff --git a/examples/src/chains/sql_db.ts b/examples/src/chains/sql_db.ts
index 7a4beff79423..ecc1bdcc3925 100644
--- a/examples/src/chains/sql_db.ts
+++ b/examples/src/chains/sql_db.ts
@@ -1,7 +1,7 @@
import { DataSource } from "typeorm";
-import { OpenAI } from "langchain/llms/openai";
-import { SqlDatabase } from "langchain/sql_db";
-import { SqlDatabaseChain } from "langchain/chains";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { SqlDatabase } from "langchain-gpt4all/sql_db";
+import { SqlDatabaseChain } from "langchain-gpt4all/chains";
/**
* This example uses Chinook database, which is a sample database available for SQL Server, Oracle, MySQL, etc.
diff --git a/examples/src/chains/summarization.ts b/examples/src/chains/summarization.ts
index accb94f3f876..c1c026018841 100644
--- a/examples/src/chains/summarization.ts
+++ b/examples/src/chains/summarization.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadSummarizationChain } from "langchain/chains";
-import { Document } from "langchain/document";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { loadSummarizationChain } from "langchain-gpt4all/chains";
+import { Document } from "langchain-gpt4all/document";
export const run = async () => {
const model = new OpenAI({});
diff --git a/examples/src/chains/summarization_map_reduce.ts b/examples/src/chains/summarization_map_reduce.ts
index d2ebcb9d0fee..e14722b7d6a5 100644
--- a/examples/src/chains/summarization_map_reduce.ts
+++ b/examples/src/chains/summarization_map_reduce.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadSummarizationChain } from "langchain/chains";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { loadSummarizationChain } from "langchain-gpt4all/chains";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
export const run = async () => {
diff --git a/examples/src/chains/summarization_map_reduce_intermediate_steps.ts b/examples/src/chains/summarization_map_reduce_intermediate_steps.ts
index d76e0767da7a..4d86c4cc58b6 100644
--- a/examples/src/chains/summarization_map_reduce_intermediate_steps.ts
+++ b/examples/src/chains/summarization_map_reduce_intermediate_steps.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { loadSummarizationChain } from "langchain/chains";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { loadSummarizationChain } from "langchain-gpt4all/chains";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
import * as fs from "fs";
export const run = async () => {
diff --git a/examples/src/chat/agent.ts b/examples/src/chat/agent.ts
index 49ff100f2cef..30fbf578b597 100644
--- a/examples/src/chat/agent.ts
+++ b/examples/src/chat/agent.ts
@@ -1,12 +1,12 @@
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { ZeroShotAgent, AgentExecutor } from "langchain/agents";
-import { SerpAPI } from "langchain/tools";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { ZeroShotAgent, AgentExecutor } from "langchain-gpt4all/agents";
+import { SerpAPI } from "langchain-gpt4all/tools";
import {
ChatPromptTemplate,
SystemMessagePromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
export const run = async () => {
const tools = [
diff --git a/examples/src/chat/llm_chain.ts b/examples/src/chat/llm_chain.ts
index a962c791624c..1412206faf99 100644
--- a/examples/src/chat/llm_chain.ts
+++ b/examples/src/chat/llm_chain.ts
@@ -1,10 +1,10 @@
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
SystemMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
export const run = async () => {
const chat = new ChatOpenAI({ temperature: 0 });
diff --git a/examples/src/chat/memory.ts b/examples/src/chat/memory.ts
index 546780f9d0ff..0aea21bd859d 100644
--- a/examples/src/chat/memory.ts
+++ b/examples/src/chat/memory.ts
@@ -1,12 +1,12 @@
-import { ConversationChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ConversationChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
SystemMessagePromptTemplate,
MessagesPlaceholder,
-} from "langchain/prompts";
-import { BufferMemory } from "langchain/memory";
+} from "langchain-gpt4all/prompts";
+import { BufferMemory } from "langchain-gpt4all/memory";
export const run = async () => {
const chat = new ChatOpenAI({ temperature: 0 });
diff --git a/examples/src/chat/overview.ts b/examples/src/chat/overview.ts
index f403371ca23f..7cd896976306 100644
--- a/examples/src/chat/overview.ts
+++ b/examples/src/chat/overview.ts
@@ -1,15 +1,15 @@
-import { AgentExecutor, ChatAgent } from "langchain/agents";
-import { ConversationChain, LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { BufferMemory } from "langchain/memory";
+import { AgentExecutor, ChatAgent } from "langchain-gpt4all/agents";
+import { ConversationChain, LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { BufferMemory } from "langchain-gpt4all/memory";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
MessagesPlaceholder,
SystemMessagePromptTemplate,
-} from "langchain/prompts";
-import { HumanChatMessage, SystemChatMessage } from "langchain/schema";
-import { SerpAPI } from "langchain/tools";
+} from "langchain-gpt4all/prompts";
+import { HumanChatMessage, SystemChatMessage } from "langchain-gpt4all/schema";
+import { SerpAPI } from "langchain-gpt4all/tools";
export const run = async () => {
const chat = new ChatOpenAI({ temperature: 0 });
diff --git a/examples/src/document_loaders/cheerio_web.ts b/examples/src/document_loaders/cheerio_web.ts
index 4297e85746d8..b8cd77115ec7 100644
--- a/examples/src/document_loaders/cheerio_web.ts
+++ b/examples/src/document_loaders/cheerio_web.ts
@@ -1,4 +1,4 @@
-import { CheerioWebBaseLoader } from "langchain/document_loaders/web/cheerio";
+import { CheerioWebBaseLoader } from "langchain-gpt4all/document_loaders/web/cheerio";
export const run = async () => {
const loader = new CheerioWebBaseLoader(
diff --git a/examples/src/document_loaders/college_confidential.ts b/examples/src/document_loaders/college_confidential.ts
index 22b4b09003f5..b7c28774ecab 100644
--- a/examples/src/document_loaders/college_confidential.ts
+++ b/examples/src/document_loaders/college_confidential.ts
@@ -1,4 +1,4 @@
-import { CollegeConfidentialLoader } from "langchain/document_loaders/web/college_confidential";
+import { CollegeConfidentialLoader } from "langchain-gpt4all/document_loaders/web/college_confidential";
export const run = async () => {
const loader = new CollegeConfidentialLoader(
diff --git a/examples/src/document_loaders/confluence.ts b/examples/src/document_loaders/confluence.ts
index e95612f3c08c..6b085f0fe327 100644
--- a/examples/src/document_loaders/confluence.ts
+++ b/examples/src/document_loaders/confluence.ts
@@ -1,4 +1,4 @@
-import { ConfluencePagesLoader } from "langchain/document_loaders/web/confluence";
+import { ConfluencePagesLoader } from "langchain-gpt4all/document_loaders/web/confluence";
const username = process.env.CONFLUENCE_USERNAME;
const accessToken = process.env.CONFLUENCE_ACCESS_TOKEN;
diff --git a/examples/src/document_loaders/example_data/notion.md b/examples/src/document_loaders/example_data/notion.md
index 28d65d3efd0b..3394700689c6 100644
--- a/examples/src/document_loaders/example_data/notion.md
+++ b/examples/src/document_loaders/example_data/notion.md
@@ -9,10 +9,10 @@ Please fill out [this form](https://forms.gle/57d8AmXBYp8PP8tZA) and we'll set u
## Quick Install
-`yarn add langchain`
+`yarn add langchain-gpt4all`
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
## 🤔 What is this?
@@ -26,13 +26,13 @@ This library is aimed at assisting in the development of those types of applicat
## Relationship with Python LangChain
-This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
+This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain-gpt4all). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
-The [LangChainHub](https://github.com/hwchase17/langchain-hub) is a central place for the serialized versions of these prompts, chains, and agents.
+The [LangChainHub](https://github.com/hwchase17/langchain-gpt4all-hub) is a central place for the serialized versions of these prompts, chains, and agents.
## 📖 Documentation
-For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs/docs/overview).
+For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs-gpt4all/docs/overview).
## 💁 Contributing
diff --git a/examples/src/document_loaders/gitbook.ts b/examples/src/document_loaders/gitbook.ts
index 454efaf2bb2a..94a0ce550213 100644
--- a/examples/src/document_loaders/gitbook.ts
+++ b/examples/src/document_loaders/gitbook.ts
@@ -1,4 +1,4 @@
-import { GitbookLoader } from "langchain/document_loaders/web/gitbook";
+import { GitbookLoader } from "langchain-gpt4all/document_loaders/web/gitbook";
export const run = async () => {
const loader = new GitbookLoader("https://docs.gitbook.com");
diff --git a/examples/src/document_loaders/github.ts b/examples/src/document_loaders/github.ts
index b75c66196ab0..4275a3b67d42 100644
--- a/examples/src/document_loaders/github.ts
+++ b/examples/src/document_loaders/github.ts
@@ -1,8 +1,8 @@
-import { GithubRepoLoader } from "langchain/document_loaders/web/github";
+import { GithubRepoLoader } from "langchain-gpt4all/document_loaders/web/github";
export const run = async () => {
const loader = new GithubRepoLoader(
- "https://github.com/hwchase17/langchainjs",
+ "https://github.com/lucasjohnston/langchainjs-gpt4all",
{ branch: "main", recursive: false, unknown: "warn" }
);
const docs = await loader.load();
diff --git a/examples/src/document_loaders/hn.ts b/examples/src/document_loaders/hn.ts
index d84b5afbefb2..baf58782ebeb 100644
--- a/examples/src/document_loaders/hn.ts
+++ b/examples/src/document_loaders/hn.ts
@@ -1,4 +1,4 @@
-import { HNLoader } from "langchain/document_loaders/web/hn";
+import { HNLoader } from "langchain-gpt4all/document_loaders/web/hn";
export const run = async () => {
const loader = new HNLoader("https://news.ycombinator.com/item?id=34817881");
diff --git a/examples/src/document_loaders/imsdb.ts b/examples/src/document_loaders/imsdb.ts
index 96a397be805c..0897bc092862 100644
--- a/examples/src/document_loaders/imsdb.ts
+++ b/examples/src/document_loaders/imsdb.ts
@@ -1,4 +1,4 @@
-import { IMSDBLoader } from "langchain/document_loaders/web/imsdb";
+import { IMSDBLoader } from "langchain-gpt4all/document_loaders/web/imsdb";
export const run = async () => {
const loader = new IMSDBLoader(
diff --git a/examples/src/document_loaders/notion_markdown.ts b/examples/src/document_loaders/notion_markdown.ts
index a6927a0887e7..7e3c1eda8333 100644
--- a/examples/src/document_loaders/notion_markdown.ts
+++ b/examples/src/document_loaders/notion_markdown.ts
@@ -1,4 +1,4 @@
-import { NotionLoader } from "langchain/document_loaders/fs/notion";
+import { NotionLoader } from "langchain-gpt4all/document_loaders/fs/notion";
export const run = async () => {
/** Provide the directory path of your notion folder */
diff --git a/examples/src/document_loaders/puppeteer_web.ts b/examples/src/document_loaders/puppeteer_web.ts
index 6f430b123987..4db5d3d50433 100644
--- a/examples/src/document_loaders/puppeteer_web.ts
+++ b/examples/src/document_loaders/puppeteer_web.ts
@@ -1,4 +1,4 @@
-import { PuppeteerWebBaseLoader } from "langchain/document_loaders/web/puppeteer";
+import { PuppeteerWebBaseLoader } from "langchain-gpt4all/document_loaders/web/puppeteer";
export const run = async () => {
const loader = new PuppeteerWebBaseLoader("https://www.tabnews.com.br/");
diff --git a/examples/src/document_loaders/s3.ts b/examples/src/document_loaders/s3.ts
index 7edcf6c0fe3e..e2bff2000c1f 100644
--- a/examples/src/document_loaders/s3.ts
+++ b/examples/src/document_loaders/s3.ts
@@ -1,4 +1,4 @@
-import { S3Loader } from "langchain/document_loaders/web/s3";
+import { S3Loader } from "langchain-gpt4all/document_loaders/web/s3";
const loader = new S3Loader({
bucket: "my-document-bucket-123",
diff --git a/examples/src/document_loaders/srt.ts b/examples/src/document_loaders/srt.ts
index bee6f06d3c22..61c4435f1dc5 100644
--- a/examples/src/document_loaders/srt.ts
+++ b/examples/src/document_loaders/srt.ts
@@ -1,4 +1,4 @@
-import { SRTLoader } from "langchain/document_loaders/fs/srt";
+import { SRTLoader } from "langchain-gpt4all/document_loaders/fs/srt";
export const run = async () => {
const loader = new SRTLoader(
diff --git a/examples/src/document_loaders/text.ts b/examples/src/document_loaders/text.ts
index b5c48705a4c3..3c80f4be79b2 100644
--- a/examples/src/document_loaders/text.ts
+++ b/examples/src/document_loaders/text.ts
@@ -1,4 +1,4 @@
-import { TextLoader } from "langchain/document_loaders/fs/text";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
export const run = async () => {
const loader = new TextLoader(
diff --git a/examples/src/document_loaders/unstructured.ts b/examples/src/document_loaders/unstructured.ts
index d4cb2dbe1e9d..7091997f51bc 100644
--- a/examples/src/document_loaders/unstructured.ts
+++ b/examples/src/document_loaders/unstructured.ts
@@ -1,4 +1,4 @@
-import { UnstructuredLoader } from "langchain/document_loaders/fs/unstructured";
+import { UnstructuredLoader } from "langchain-gpt4all/document_loaders/fs/unstructured";
const options = {
apiKey: "MY_API_KEY",
diff --git a/examples/src/document_loaders/unstructured_directory.ts b/examples/src/document_loaders/unstructured_directory.ts
index 8e751823e5b9..86b0e1b98f25 100644
--- a/examples/src/document_loaders/unstructured_directory.ts
+++ b/examples/src/document_loaders/unstructured_directory.ts
@@ -1,11 +1,11 @@
-import { UnstructuredDirectoryLoader } from "langchain/document_loaders/fs/unstructured";
+import { UnstructuredDirectoryLoader } from "langchain-gpt4all/document_loaders/fs/unstructured";
const options = {
apiKey: "MY_API_KEY",
};
const loader = new UnstructuredDirectoryLoader(
- "langchain/src/document_loaders/tests/example_data",
+ "langchain-gpt4all/src/document_loaders/tests/example_data",
options
);
const docs = await loader.load();
diff --git a/examples/src/embeddings/cohere.ts b/examples/src/embeddings/cohere.ts
index 3499703a8e9b..b4b0bd3550f1 100644
--- a/examples/src/embeddings/cohere.ts
+++ b/examples/src/embeddings/cohere.ts
@@ -1,4 +1,4 @@
-import { CohereEmbeddings } from "langchain/embeddings/cohere";
+import { CohereEmbeddings } from "langchain-gpt4all/embeddings/cohere";
export const run = async () => {
const model = new CohereEmbeddings();
diff --git a/examples/src/embeddings/max_concurrency.ts b/examples/src/embeddings/max_concurrency.ts
index 733536dd8486..9ef88a10c462 100644
--- a/examples/src/embeddings/max_concurrency.ts
+++ b/examples/src/embeddings/max_concurrency.ts
@@ -1,4 +1,4 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const model = new OpenAIEmbeddings({
diff --git a/examples/src/embeddings/openai.ts b/examples/src/embeddings/openai.ts
index a2bfcb567ee1..7f9602014e28 100644
--- a/examples/src/embeddings/openai.ts
+++ b/examples/src/embeddings/openai.ts
@@ -1,4 +1,4 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const model = new OpenAIEmbeddings();
diff --git a/examples/src/experimental/autogpt/weather.ts b/examples/src/experimental/autogpt/weather.ts
index a16a8355a3b2..df9eec35b13d 100644
--- a/examples/src/experimental/autogpt/weather.ts
+++ b/examples/src/experimental/autogpt/weather.ts
@@ -1,9 +1,9 @@
-import { AutoGPT } from "langchain/experimental/autogpt";
-import { ReadFileTool, WriteFileTool, SerpAPI } from "langchain/tools";
-import { NodeFileStore } from "langchain/stores/file/node";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { AutoGPT } from "langchain-gpt4all/experimental/autogpt";
+import { ReadFileTool, WriteFileTool, SerpAPI } from "langchain-gpt4all/tools";
+import { NodeFileStore } from "langchain-gpt4all/stores/file/node";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const store = new NodeFileStore();
diff --git a/examples/src/experimental/autogpt/weather_browser.ts b/examples/src/experimental/autogpt/weather_browser.ts
index 5ba0e99c792a..b82608b4cad4 100644
--- a/examples/src/experimental/autogpt/weather_browser.ts
+++ b/examples/src/experimental/autogpt/weather_browser.ts
@@ -1,9 +1,9 @@
-import { AutoGPT } from "langchain/experimental/autogpt";
-import { ReadFileTool, WriteFileTool, SerpAPI } from "langchain/tools";
-import { InMemoryFileStore } from "langchain/stores/file/in_memory";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { AutoGPT } from "langchain-gpt4all/experimental/autogpt";
+import { ReadFileTool, WriteFileTool, SerpAPI } from "langchain-gpt4all/tools";
+import { InMemoryFileStore } from "langchain-gpt4all/stores/file/in_memory";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const store = new InMemoryFileStore();
diff --git a/examples/src/experimental/babyagi/weather.ts b/examples/src/experimental/babyagi/weather.ts
index a6b571e79c5e..a05a893aa0a7 100644
--- a/examples/src/experimental/babyagi/weather.ts
+++ b/examples/src/experimental/babyagi/weather.ts
@@ -1,7 +1,7 @@
-import { BabyAGI } from "langchain/experimental/babyagi";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenAI } from "langchain/llms/openai";
+import { BabyAGI } from "langchain-gpt4all/experimental/babyagi";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings());
diff --git a/examples/src/experimental/babyagi/weather_with_tools.ts b/examples/src/experimental/babyagi/weather_with_tools.ts
index 8b5fc92adb61..f126b446e595 100644
--- a/examples/src/experimental/babyagi/weather_with_tools.ts
+++ b/examples/src/experimental/babyagi/weather_with_tools.ts
@@ -1,11 +1,11 @@
-import { BabyAGI } from "langchain/experimental/babyagi";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { LLMChain } from "langchain/chains";
-import { ChainTool, SerpAPI, Tool } from "langchain/tools";
-import { initializeAgentExecutorWithOptions } from "langchain/agents";
+import { BabyAGI } from "langchain-gpt4all/experimental/babyagi";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChainTool, SerpAPI, Tool } from "langchain-gpt4all/tools";
+import { initializeAgentExecutorWithOptions } from "langchain-gpt4all/agents";
// First, we create a custom agent which will serve as execution chain.
const todoPrompt = PromptTemplate.fromTemplate(
diff --git a/examples/src/indexes/recursive_text_splitter.ts b/examples/src/indexes/recursive_text_splitter.ts
index 8ce2b1dcc97c..378daa670bcb 100644
--- a/examples/src/indexes/recursive_text_splitter.ts
+++ b/examples/src/indexes/recursive_text_splitter.ts
@@ -1,4 +1,4 @@
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
export const run = async () => {
const text = `Hi.\n\nI'm Harrison.\n\nHow? Are? You?\nOkay then f f f f.
diff --git a/examples/src/indexes/text_splitter.ts b/examples/src/indexes/text_splitter.ts
index dcb6469c7048..e331150953d9 100644
--- a/examples/src/indexes/text_splitter.ts
+++ b/examples/src/indexes/text_splitter.ts
@@ -1,5 +1,5 @@
-import { Document } from "langchain/document";
-import { CharacterTextSplitter } from "langchain/text_splitter";
+import { Document } from "langchain-gpt4all/document";
+import { CharacterTextSplitter } from "langchain-gpt4all/text_splitter";
export const run = async () => {
/* Split text */
diff --git a/examples/src/indexes/token_text_splitter.ts b/examples/src/indexes/token_text_splitter.ts
index 0cab77628d4e..9331b90eb16d 100644
--- a/examples/src/indexes/token_text_splitter.ts
+++ b/examples/src/indexes/token_text_splitter.ts
@@ -1,5 +1,5 @@
-import { Document } from "langchain/document";
-import { TokenTextSplitter } from "langchain/text_splitter";
+import { Document } from "langchain-gpt4all/document";
+import { TokenTextSplitter } from "langchain-gpt4all/text_splitter";
import fs from "fs";
import path from "path";
diff --git a/examples/src/indexes/vector_stores/chroma/fromDocs.ts b/examples/src/indexes/vector_stores/chroma/fromDocs.ts
index fae38b616ba1..4fd7d3a076e2 100644
--- a/examples/src/indexes/vector_stores/chroma/fromDocs.ts
+++ b/examples/src/indexes/vector_stores/chroma/fromDocs.ts
@@ -1,6 +1,6 @@
-import { Chroma } from "langchain/vectorstores/chroma";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { TextLoader } from "langchain/document_loaders/fs/text";
+import { Chroma } from "langchain-gpt4all/vectorstores/chroma";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
// Create docs with a loader
const loader = new TextLoader("src/document_loaders/example_data/example.txt");
diff --git a/examples/src/indexes/vector_stores/chroma/fromTexts.ts b/examples/src/indexes/vector_stores/chroma/fromTexts.ts
index 029f0e7186d0..29e95d881bab 100644
--- a/examples/src/indexes/vector_stores/chroma/fromTexts.ts
+++ b/examples/src/indexes/vector_stores/chroma/fromTexts.ts
@@ -1,5 +1,5 @@
-import { Chroma } from "langchain/vectorstores/chroma";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { Chroma } from "langchain-gpt4all/vectorstores/chroma";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
// text sample from Godel, Escher, Bach
const vectorStore = await Chroma.fromTexts(
diff --git a/examples/src/indexes/vector_stores/chroma/search.ts b/examples/src/indexes/vector_stores/chroma/search.ts
index a456f32ce4d4..3868bf93aaa8 100644
--- a/examples/src/indexes/vector_stores/chroma/search.ts
+++ b/examples/src/indexes/vector_stores/chroma/search.ts
@@ -1,5 +1,5 @@
-import { Chroma } from "langchain/vectorstores/chroma";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { Chroma } from "langchain-gpt4all/vectorstores/chroma";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = await Chroma.fromExistingCollection(
new OpenAIEmbeddings(),
diff --git a/examples/src/indexes/vector_stores/hnswlib.ts b/examples/src/indexes/vector_stores/hnswlib.ts
index 532b7300d732..83f71670e588 100644
--- a/examples/src/indexes/vector_stores/hnswlib.ts
+++ b/examples/src/indexes/vector_stores/hnswlib.ts
@@ -1,5 +1,5 @@
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const vectorStore = await HNSWLib.fromTexts(
diff --git a/examples/src/indexes/vector_stores/hnswlib_filter.ts b/examples/src/indexes/vector_stores/hnswlib_filter.ts
index 26249d6d55d2..f3bee3b1b74b 100644
--- a/examples/src/indexes/vector_stores/hnswlib_filter.ts
+++ b/examples/src/indexes/vector_stores/hnswlib_filter.ts
@@ -1,5 +1,5 @@
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const vectorStore = await HNSWLib.fromTexts(
diff --git a/examples/src/indexes/vector_stores/hnswlib_fromdocs.ts b/examples/src/indexes/vector_stores/hnswlib_fromdocs.ts
index b53c437863e7..08c1b39632b4 100644
--- a/examples/src/indexes/vector_stores/hnswlib_fromdocs.ts
+++ b/examples/src/indexes/vector_stores/hnswlib_fromdocs.ts
@@ -1,6 +1,6 @@
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { TextLoader } from "langchain/document_loaders/fs/text";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
// Create docs with a loader
const loader = new TextLoader("src/document_loaders/example_data/example.txt");
diff --git a/examples/src/indexes/vector_stores/hnswlib_saveload.ts b/examples/src/indexes/vector_stores/hnswlib_saveload.ts
index ac0f9fe5e837..09cd112d45ca 100644
--- a/examples/src/indexes/vector_stores/hnswlib_saveload.ts
+++ b/examples/src/indexes/vector_stores/hnswlib_saveload.ts
@@ -1,5 +1,5 @@
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
// Create a vector store through any method, here from texts as an example
diff --git a/examples/src/indexes/vector_stores/memory.ts b/examples/src/indexes/vector_stores/memory.ts
index 5dbdee6eaa84..db4d5571b4b4 100644
--- a/examples/src/indexes/vector_stores/memory.ts
+++ b/examples/src/indexes/vector_stores/memory.ts
@@ -1,5 +1,5 @@
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const vectorStore = await MemoryVectorStore.fromTexts(
diff --git a/examples/src/indexes/vector_stores/memory_custom_similarity.ts b/examples/src/indexes/vector_stores/memory_custom_similarity.ts
index a5908869bd5b..7dd25c6f983a 100644
--- a/examples/src/indexes/vector_stores/memory_custom_similarity.ts
+++ b/examples/src/indexes/vector_stores/memory_custom_similarity.ts
@@ -1,5 +1,5 @@
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import { similarity } from "ml-distance";
export const run = async () => {
diff --git a/examples/src/indexes/vector_stores/memory_fromdocs.ts b/examples/src/indexes/vector_stores/memory_fromdocs.ts
index a6d81c6d44aa..91d607cde77e 100644
--- a/examples/src/indexes/vector_stores/memory_fromdocs.ts
+++ b/examples/src/indexes/vector_stores/memory_fromdocs.ts
@@ -1,6 +1,6 @@
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { TextLoader } from "langchain/document_loaders/fs/text";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
export const run = async () => {
// Create docs with a loader
diff --git a/examples/src/indexes/vector_stores/milvus.ts b/examples/src/indexes/vector_stores/milvus.ts
index 1336adbb27b7..1f2cb2d8a0f5 100644
--- a/examples/src/indexes/vector_stores/milvus.ts
+++ b/examples/src/indexes/vector_stores/milvus.ts
@@ -1,5 +1,5 @@
-import { Milvus } from "langchain/vectorstores/milvus";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { Milvus } from "langchain-gpt4all/vectorstores/milvus";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const vectorStore = await Milvus.fromTexts(
diff --git a/examples/src/indexes/vector_stores/mongo_fromTexts.ts b/examples/src/indexes/vector_stores/mongo_fromTexts.ts
index a235b6941ad3..d48bb04ac10d 100755
--- a/examples/src/indexes/vector_stores/mongo_fromTexts.ts
+++ b/examples/src/indexes/vector_stores/mongo_fromTexts.ts
@@ -1,11 +1,11 @@
-import { MongoVectorStore } from "langchain/vectorstores/mongo";
-import { CohereEmbeddings } from "langchain/embeddings/cohere";
+import { MongoVectorStore } from "langchain-gpt4all/vectorstores/mongo";
+import { CohereEmbeddings } from "langchain-gpt4all/embeddings/cohere";
import { MongoClient } from "mongodb";
export const run = async () => {
const client = new MongoClient(process.env.MONGO_URI || "");
- const collection = client.db("langchain").collection("test");
+ const collection = client.db("langchain-gpt4all").collection("test");
await MongoVectorStore.fromTexts(
["Hello world", "Bye bye", "What's this?"],
diff --git a/examples/src/indexes/vector_stores/mongo_search.ts b/examples/src/indexes/vector_stores/mongo_search.ts
index 3c697c7e5d57..4a519bd84115 100755
--- a/examples/src/indexes/vector_stores/mongo_search.ts
+++ b/examples/src/indexes/vector_stores/mongo_search.ts
@@ -1,11 +1,11 @@
-import { MongoVectorStore } from "langchain/vectorstores/mongo";
-import { CohereEmbeddings } from "langchain/embeddings/cohere";
+import { MongoVectorStore } from "langchain-gpt4all/vectorstores/mongo";
+import { CohereEmbeddings } from "langchain-gpt4all/embeddings/cohere";
import { MongoClient } from "mongodb";
export const run = async () => {
const client = new MongoClient(process.env.MONGO_URI || "");
- const collection = client.db("langchain").collection("test");
+ const collection = client.db("langchain-gpt4all").collection("test");
const vectorStore = new MongoVectorStore(new CohereEmbeddings(), {
client,
diff --git a/examples/src/indexes/vector_stores/myscale_fromTexts.ts b/examples/src/indexes/vector_stores/myscale_fromTexts.ts
index 3ff1bbbc828a..9149f4091135 100644
--- a/examples/src/indexes/vector_stores/myscale_fromTexts.ts
+++ b/examples/src/indexes/vector_stores/myscale_fromTexts.ts
@@ -1,5 +1,5 @@
-import { MyScaleStore } from "langchain/vectorstores/myscale";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { MyScaleStore } from "langchain-gpt4all/vectorstores/myscale";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = await MyScaleStore.fromTexts(
["Hello world", "Bye bye", "hello nice world"],
diff --git a/examples/src/indexes/vector_stores/myscale_search.ts b/examples/src/indexes/vector_stores/myscale_search.ts
index 773346447436..35e6bf0c8f6d 100644
--- a/examples/src/indexes/vector_stores/myscale_search.ts
+++ b/examples/src/indexes/vector_stores/myscale_search.ts
@@ -1,5 +1,5 @@
-import { MyScaleStore } from "langchain/vectorstores/myscale";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { MyScaleStore } from "langchain-gpt4all/vectorstores/myscale";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = await MyScaleStore.fromExistingIndex(
new OpenAIEmbeddings(),
diff --git a/examples/src/indexes/vector_stores/opensearch/opensearch.ts b/examples/src/indexes/vector_stores/opensearch/opensearch.ts
index 4546eed55bf6..c7a8c663dc26 100644
--- a/examples/src/indexes/vector_stores/opensearch/opensearch.ts
+++ b/examples/src/indexes/vector_stores/opensearch/opensearch.ts
@@ -1,6 +1,6 @@
import { Client } from "@opensearch-project/opensearch";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { OpenSearchVectorStore } from "langchain/vectorstores/opensearch";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { OpenSearchVectorStore } from "langchain-gpt4all/vectorstores/opensearch";
export async function run() {
const client = new Client({
diff --git a/examples/src/indexes/vector_stores/pinecone.ts b/examples/src/indexes/vector_stores/pinecone.ts
index cd4541f5a6fd..aad521cbbeab 100644
--- a/examples/src/indexes/vector_stores/pinecone.ts
+++ b/examples/src/indexes/vector_stores/pinecone.ts
@@ -1,6 +1,6 @@
import { PineconeClient } from "@pinecone-database/pinecone";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { PineconeStore } from "langchain/vectorstores/pinecone";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { PineconeStore } from "langchain-gpt4all/vectorstores/pinecone";
// To run this example, first [create a Pinecone index](https://app.pinecone.io/organizations)
// It must have 1536 dimensions, to match the OpenAI embedding size.
diff --git a/examples/src/indexes/vector_stores/prisma_vectorstore/prisma.ts b/examples/src/indexes/vector_stores/prisma_vectorstore/prisma.ts
index 6bc3f946efb2..2ac57dfa82f6 100644
--- a/examples/src/indexes/vector_stores/prisma_vectorstore/prisma.ts
+++ b/examples/src/indexes/vector_stores/prisma_vectorstore/prisma.ts
@@ -1,5 +1,5 @@
-import { PrismaVectorStore } from "langchain/vectorstores/prisma";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { PrismaVectorStore } from "langchain-gpt4all/vectorstores/prisma";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import { PrismaClient, Prisma, Document } from "@prisma/client";
export const run = async () => {
diff --git a/examples/src/indexes/vector_stores/supabase.ts b/examples/src/indexes/vector_stores/supabase.ts
index 14db98fdfb30..0bbcb17709e8 100644
--- a/examples/src/indexes/vector_stores/supabase.ts
+++ b/examples/src/indexes/vector_stores/supabase.ts
@@ -1,9 +1,9 @@
-import { SupabaseVectorStore } from "langchain/vectorstores/supabase";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { SupabaseVectorStore } from "langchain-gpt4all/vectorstores/supabase";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import { createClient } from "@supabase/supabase-js";
// First, follow set-up instructions at
-// https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/supabase
+// https://js.langchain-gpt4all.com/docs/modules/indexes/vector_stores/integrations/supabase
const privateKey = process.env.SUPABASE_PRIVATE_KEY;
if (!privateKey) throw new Error(`Expected env var SUPABASE_PRIVATE_KEY`);
diff --git a/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts b/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts
index 4302f4afa399..1b1fe19a8593 100644
--- a/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts
+++ b/examples/src/indexes/vector_stores/supabase_with_metadata_filter.ts
@@ -1,9 +1,9 @@
-import { SupabaseVectorStore } from "langchain/vectorstores/supabase";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { SupabaseVectorStore } from "langchain-gpt4all/vectorstores/supabase";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import { createClient } from "@supabase/supabase-js";
// First, follow set-up instructions at
-// https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/supabase
+// https://js.langchain-gpt4all.com/docs/modules/indexes/vector_stores/integrations/supabase
const privateKey = process.env.SUPABASE_PRIVATE_KEY;
if (!privateKey) throw new Error(`Expected env var SUPABASE_PRIVATE_KEY`);
diff --git a/examples/src/indexes/vector_stores/weaviate_fromTexts.ts b/examples/src/indexes/vector_stores/weaviate_fromTexts.ts
index 71a67c4e359f..05d603a38778 100644
--- a/examples/src/indexes/vector_stores/weaviate_fromTexts.ts
+++ b/examples/src/indexes/vector_stores/weaviate_fromTexts.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import weaviate from "weaviate-ts-client";
-import { WeaviateStore } from "langchain/vectorstores/weaviate";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { WeaviateStore } from "langchain-gpt4all/vectorstores/weaviate";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export async function run() {
// Something wrong with the weaviate-ts-client types, so we need to disable
diff --git a/examples/src/indexes/vector_stores/weaviate_search.ts b/examples/src/indexes/vector_stores/weaviate_search.ts
index 1eeb12c8510a..3c95bbfceecc 100644
--- a/examples/src/indexes/vector_stores/weaviate_search.ts
+++ b/examples/src/indexes/vector_stores/weaviate_search.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import weaviate from "weaviate-ts-client";
-import { WeaviateStore } from "langchain/vectorstores/weaviate";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { WeaviateStore } from "langchain-gpt4all/vectorstores/weaviate";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export async function run() {
// Something wrong with the weaviate-ts-client types, so we need to disable
diff --git a/examples/src/llms/cohere.ts b/examples/src/llms/cohere.ts
index 5713c13c63dd..193d81068800 100644
--- a/examples/src/llms/cohere.ts
+++ b/examples/src/llms/cohere.ts
@@ -1,4 +1,4 @@
-import { Cohere } from "langchain/llms/cohere";
+import { Cohere } from "langchain-gpt4all/llms/cohere";
export const run = async () => {
const model = new Cohere({
diff --git a/examples/src/llms/gpt4all.ts b/examples/src/llms/gpt4all.ts
index 6fe4f99d262f..f82a988f37ab 100644
--- a/examples/src/llms/gpt4all.ts
+++ b/examples/src/llms/gpt4all.ts
@@ -1,4 +1,4 @@
-import { GPT4All } from "langchain/llms/gpt4all";
+import { GPT4All } from "langchain-gpt4all/llms/gpt4all";
export const run = async () => {
const model = new GPT4All({
diff --git a/examples/src/llms/hf.ts b/examples/src/llms/hf.ts
index 99269c6150b7..62a6119693e0 100644
--- a/examples/src/llms/hf.ts
+++ b/examples/src/llms/hf.ts
@@ -1,4 +1,4 @@
-import { HuggingFaceInference } from "langchain/llms/hf";
+import { HuggingFaceInference } from "langchain-gpt4all/llms/hf";
export const run = async () => {
const model = new HuggingFaceInference({
diff --git a/examples/src/llms/openai-chat.ts b/examples/src/llms/openai-chat.ts
index 3e536a683e0c..be8f8d1a3e96 100644
--- a/examples/src/llms/openai-chat.ts
+++ b/examples/src/llms/openai-chat.ts
@@ -1,4 +1,4 @@
-import { OpenAIChat } from "langchain/llms/openai";
+import { OpenAIChat } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new OpenAIChat({
diff --git a/examples/src/llms/openai.ts b/examples/src/llms/openai.ts
index c7cef8c63bad..96f5beb7150c 100644
--- a/examples/src/llms/openai.ts
+++ b/examples/src/llms/openai.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new OpenAI({
diff --git a/examples/src/llms/replicate.ts b/examples/src/llms/replicate.ts
index cce3b6c02af5..593c910ee148 100644
--- a/examples/src/llms/replicate.ts
+++ b/examples/src/llms/replicate.ts
@@ -1,4 +1,4 @@
-import { Replicate } from "langchain/llms/replicate";
+import { Replicate } from "langchain-gpt4all/llms/replicate";
export const run = async () => {
const model = new Replicate({
diff --git a/examples/src/memory/buffer.ts b/examples/src/memory/buffer.ts
index c89a11f7efd0..7a23126b0e7a 100644
--- a/examples/src/memory/buffer.ts
+++ b/examples/src/memory/buffer.ts
@@ -1,7 +1,7 @@
-import { OpenAI } from "langchain/llms/openai";
-import { BufferMemory } from "langchain/memory";
-import { LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { BufferMemory } from "langchain-gpt4all/memory";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
const memory = new BufferMemory({ memoryKey: "chat_history" });
const model = new OpenAI({ temperature: 0.9 });
diff --git a/examples/src/memory/buffer_window.ts b/examples/src/memory/buffer_window.ts
index fab38925a82b..123ef7823b61 100644
--- a/examples/src/memory/buffer_window.ts
+++ b/examples/src/memory/buffer_window.ts
@@ -1,7 +1,7 @@
-import { OpenAI } from "langchain/llms/openai";
-import { BufferWindowMemory } from "langchain/memory";
-import { LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { BufferWindowMemory } from "langchain-gpt4all/memory";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
const memory = new BufferWindowMemory({ memoryKey: "chat_history", k: 1 });
diff --git a/examples/src/memory/dynamodb-store.ts b/examples/src/memory/dynamodb-store.ts
index 911d7533b8b4..52030fbbefc6 100644
--- a/examples/src/memory/dynamodb-store.ts
+++ b/examples/src/memory/dynamodb-store.ts
@@ -1,11 +1,11 @@
-import { BufferMemory } from "langchain/memory";
-import { DynamoDBChatMessageHistory } from "langchain/stores/message/dynamodb";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { ConversationChain } from "langchain/chains";
+import { BufferMemory } from "langchain-gpt4all/memory";
+import { DynamoDBChatMessageHistory } from "langchain-gpt4all/stores/message/dynamodb";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { ConversationChain } from "langchain-gpt4all/chains";
const memory = new BufferMemory({
chatHistory: new DynamoDBChatMessageHistory({
- tableName: "langchain",
+ tableName: "langchain-gpt4all",
partitionKey: "id",
sessionId: new Date().toISOString(), // Or some other unique identifier for the conversation
config: {
diff --git a/examples/src/memory/summary_chat.ts b/examples/src/memory/summary_chat.ts
index d7970dad3e72..26bc1ac4251e 100644
--- a/examples/src/memory/summary_chat.ts
+++ b/examples/src/memory/summary_chat.ts
@@ -1,7 +1,7 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { ConversationSummaryMemory } from "langchain/memory";
-import { LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { ConversationSummaryMemory } from "langchain-gpt4all/memory";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
const memory = new ConversationSummaryMemory({
diff --git a/examples/src/memory/summary_llm.ts b/examples/src/memory/summary_llm.ts
index 60cbddb1fae9..f8c0ead84438 100644
--- a/examples/src/memory/summary_llm.ts
+++ b/examples/src/memory/summary_llm.ts
@@ -1,7 +1,7 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ConversationSummaryMemory } from "langchain/memory";
-import { LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ConversationSummaryMemory } from "langchain-gpt4all/memory";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
const memory = new ConversationSummaryMemory({
diff --git a/examples/src/memory/vector_store.ts b/examples/src/memory/vector_store.ts
index 9adf2948d242..1bfc8369b1bf 100644
--- a/examples/src/memory/vector_store.ts
+++ b/examples/src/memory/vector_store.ts
@@ -1,9 +1,9 @@
-import { OpenAI } from "langchain/llms/openai";
-import { VectorStoreRetrieverMemory } from "langchain/memory";
-import { LLMChain } from "langchain/chains";
-import { PromptTemplate } from "langchain/prompts";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { VectorStoreRetrieverMemory } from "langchain-gpt4all/memory";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings());
const memory = new VectorStoreRetrieverMemory({
diff --git a/examples/src/models/chat/chat.ts b/examples/src/models/chat/chat.ts
index 043d51564ce9..b4859e269574 100644
--- a/examples/src/models/chat/chat.ts
+++ b/examples/src/models/chat/chat.ts
@@ -1,5 +1,5 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage, SystemChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage, SystemChatMessage } from "langchain-gpt4all/schema";
export const run = async () => {
const chat = new ChatOpenAI({ modelName: "gpt-3.5-turbo" });
diff --git a/examples/src/models/chat/chat_quick_start.ts b/examples/src/models/chat/chat_quick_start.ts
index 67874ed03d12..41ea97a8bdd5 100644
--- a/examples/src/models/chat/chat_quick_start.ts
+++ b/examples/src/models/chat/chat_quick_start.ts
@@ -1,5 +1,5 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage } from "langchain-gpt4all/schema";
export const run = async () => {
const chat = new ChatOpenAI();
diff --git a/examples/src/models/chat/chat_streaming.ts b/examples/src/models/chat/chat_streaming.ts
index e4ae75e79bc4..6633ef7cb897 100644
--- a/examples/src/models/chat/chat_streaming.ts
+++ b/examples/src/models/chat/chat_streaming.ts
@@ -1,5 +1,5 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage } from "langchain-gpt4all/schema";
const chat = new ChatOpenAI({
maxTokens: 25,
diff --git a/examples/src/models/chat/chat_streaming_stdout.ts b/examples/src/models/chat/chat_streaming_stdout.ts
index cd0e3089c36b..a1f3e502ac6b 100644
--- a/examples/src/models/chat/chat_streaming_stdout.ts
+++ b/examples/src/models/chat/chat_streaming_stdout.ts
@@ -1,5 +1,5 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage } from "langchain-gpt4all/schema";
const chat = new ChatOpenAI({
streaming: true,
diff --git a/examples/src/models/chat/chat_timeout.ts b/examples/src/models/chat/chat_timeout.ts
index 4cee35115546..f2ccc6482762 100644
--- a/examples/src/models/chat/chat_timeout.ts
+++ b/examples/src/models/chat/chat_timeout.ts
@@ -1,5 +1,5 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { HumanChatMessage } from "langchain/schema";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { HumanChatMessage } from "langchain-gpt4all/schema";
export const run = async () => {
const chat = new ChatOpenAI(
diff --git a/examples/src/models/chat/integration_anthropic.ts b/examples/src/models/chat/integration_anthropic.ts
index 672ffbf6158a..88cb5527acb5 100644
--- a/examples/src/models/chat/integration_anthropic.ts
+++ b/examples/src/models/chat/integration_anthropic.ts
@@ -1,4 +1,4 @@
-import { ChatAnthropic } from "langchain/chat_models/anthropic";
+import { ChatAnthropic } from "langchain-gpt4all/chat_models/anthropic";
const model = new ChatAnthropic({
temperature: 0.9,
diff --git a/examples/src/models/chat/integration_azure_openai.ts b/examples/src/models/chat/integration_azure_openai.ts
index 0dc02066e0ca..62efc46589d4 100644
--- a/examples/src/models/chat/integration_azure_openai.ts
+++ b/examples/src/models/chat/integration_azure_openai.ts
@@ -1,4 +1,4 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const model = new ChatOpenAI({
temperature: 0.9,
diff --git a/examples/src/models/chat/integration_openai.ts b/examples/src/models/chat/integration_openai.ts
index 6321763b8f15..09e88ea94b8d 100644
--- a/examples/src/models/chat/integration_openai.ts
+++ b/examples/src/models/chat/integration_openai.ts
@@ -1,4 +1,4 @@
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
const model = new ChatOpenAI({
temperature: 0.9,
diff --git a/examples/src/models/embeddings/cohere.ts b/examples/src/models/embeddings/cohere.ts
index 8bb558d50bef..85f896d53a58 100644
--- a/examples/src/models/embeddings/cohere.ts
+++ b/examples/src/models/embeddings/cohere.ts
@@ -1,4 +1,4 @@
-import { CohereEmbeddings } from "langchain/embeddings/cohere";
+import { CohereEmbeddings } from "langchain-gpt4all/embeddings/cohere";
export const run = async () => {
/* Embed queries */
diff --git a/examples/src/models/embeddings/openai.ts b/examples/src/models/embeddings/openai.ts
index 361e4a3816b9..06144d765d64 100644
--- a/examples/src/models/embeddings/openai.ts
+++ b/examples/src/models/embeddings/openai.ts
@@ -1,4 +1,4 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
/* Embed queries */
diff --git a/examples/src/models/embeddings/openai_timeout.ts b/examples/src/models/embeddings/openai_timeout.ts
index 9ab0ec7e1585..f33d0b651743 100644
--- a/examples/src/models/embeddings/openai_timeout.ts
+++ b/examples/src/models/embeddings/openai_timeout.ts
@@ -1,4 +1,4 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export const run = async () => {
const embeddings = new OpenAIEmbeddings({
diff --git a/examples/src/models/embeddings/tensorflow.ts b/examples/src/models/embeddings/tensorflow.ts
index 09dfb8f342f2..3d17e5720787 100644
--- a/examples/src/models/embeddings/tensorflow.ts
+++ b/examples/src/models/embeddings/tensorflow.ts
@@ -1,7 +1,7 @@
import "@tensorflow/tfjs-backend-cpu";
-import { Document } from "langchain/document";
-import { TensorFlowEmbeddings } from "langchain/embeddings/tensorflow";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
+import { Document } from "langchain-gpt4all/document";
+import { TensorFlowEmbeddings } from "langchain-gpt4all/embeddings/tensorflow";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
const embeddings = new TensorFlowEmbeddings();
const store = new MemoryVectorStore(embeddings);
diff --git a/examples/src/models/llm/gpt4all.ts b/examples/src/models/llm/gpt4all.ts
index 3e3f63ad4898..287504acc4d3 100644
--- a/examples/src/models/llm/gpt4all.ts
+++ b/examples/src/models/llm/gpt4all.ts
@@ -1,4 +1,4 @@
-import { GPT4All } from "langchain/llms/gpt4all";
+import { GPT4All } from "langchain-gpt4all/llms/gpt4all";
export const run = async () => {
const modelA = new GPT4All({
diff --git a/examples/src/models/llm/llm.ts b/examples/src/models/llm/llm.ts
index 9b02e1016b8a..6510c20c62f9 100644
--- a/examples/src/models/llm/llm.ts
+++ b/examples/src/models/llm/llm.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const modelA = new OpenAI();
diff --git a/examples/src/models/llm/llm_debugging.ts b/examples/src/models/llm/llm_debugging.ts
index 0c5cd4c0e844..e1b59a51fc79 100644
--- a/examples/src/models/llm/llm_debugging.ts
+++ b/examples/src/models/llm/llm_debugging.ts
@@ -1,5 +1,5 @@
-import { LLMResult } from "langchain/schema";
-import { OpenAI } from "langchain/llms/openai";
+import { LLMResult } from "langchain-gpt4all/schema";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
// We can pass in a list of CallbackHandlers to the LLM constructor to get callbacks for various events.
diff --git a/examples/src/models/llm/llm_promptlayer.ts b/examples/src/models/llm/llm_promptlayer.ts
index e7b82ae8263c..e6020308551f 100644
--- a/examples/src/models/llm/llm_promptlayer.ts
+++ b/examples/src/models/llm/llm_promptlayer.ts
@@ -1,4 +1,4 @@
-import { PromptLayerOpenAI } from "langchain/llms/openai";
+import { PromptLayerOpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new PromptLayerOpenAI({ temperature: 0.9 });
diff --git a/examples/src/models/llm/llm_quick_start.ts b/examples/src/models/llm/llm_quick_start.ts
index f3cd3a32c351..ff4d1d0bd6c6 100644
--- a/examples/src/models/llm/llm_quick_start.ts
+++ b/examples/src/models/llm/llm_quick_start.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new OpenAI();
diff --git a/examples/src/models/llm/llm_streaming.ts b/examples/src/models/llm/llm_streaming.ts
index 55719ceb3075..c6be9158a6a3 100644
--- a/examples/src/models/llm/llm_streaming.ts
+++ b/examples/src/models/llm/llm_streaming.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
// To enable streaming, we pass in `streaming: true` to the LLM constructor.
// Additionally, we pass in a handler for the `handleLLMNewToken` event.
diff --git a/examples/src/models/llm/llm_streaming_stdout.ts b/examples/src/models/llm/llm_streaming_stdout.ts
index 47016e102fa9..d82a161a3cf6 100644
--- a/examples/src/models/llm/llm_streaming_stdout.ts
+++ b/examples/src/models/llm/llm_streaming_stdout.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
// To enable streaming, we pass in `streaming: true` to the LLM constructor.
// Additionally, we pass in a handler for the `handleLLMNewToken` event.
diff --git a/examples/src/models/llm/llm_timeout.ts b/examples/src/models/llm/llm_timeout.ts
index 11a3fb3b5902..a9c3adc49301 100644
--- a/examples/src/models/llm/llm_timeout.ts
+++ b/examples/src/models/llm/llm_timeout.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new OpenAI(
diff --git a/examples/src/models/llm/llm_with_tracing.ts b/examples/src/models/llm/llm_with_tracing.ts
index eae47b59a591..614bafa94d17 100644
--- a/examples/src/models/llm/llm_with_tracing.ts
+++ b/examples/src/models/llm/llm_with_tracing.ts
@@ -1,10 +1,10 @@
-import { OpenAI } from "langchain/llms/openai";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { SystemChatMessage, HumanChatMessage } from "langchain/schema";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { SystemChatMessage, HumanChatMessage } from "langchain-gpt4all/schema";
import * as process from "process";
export const run = async () => {
- process.env.LANGCHAIN_HANDLER = "langchain";
+ process.env.LANGCHAIN_HANDLER = "langchain-gpt4all";
const model = new OpenAI({ temperature: 0.9 });
const resA = await model.call(
"What would be a good company name a company that makes colorful socks?"
diff --git a/examples/src/models/llm/openai_basePath.ts b/examples/src/models/llm/openai_basePath.ts
index e954053246a8..fd964e4efe79 100644
--- a/examples/src/models/llm/openai_basePath.ts
+++ b/examples/src/models/llm/openai_basePath.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI(
{ temperature: 0 },
diff --git a/examples/src/models/llm/openai_cancellation.ts b/examples/src/models/llm/openai_cancellation.ts
index 5e0abfa7ba7f..91b230bb5730 100644
--- a/examples/src/models/llm/openai_cancellation.ts
+++ b/examples/src/models/llm/openai_cancellation.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
export const run = async () => {
const model = new OpenAI({ temperature: 1 });
diff --git a/examples/src/models/llm/openai_userid.ts b/examples/src/models/llm/openai_userid.ts
index 1e3e96f4be4b..2f5a8ce860e5 100644
--- a/examples/src/models/llm/openai_userid.ts
+++ b/examples/src/models/llm/openai_userid.ts
@@ -1,4 +1,4 @@
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
const model = new OpenAI({ temperature: 0 });
diff --git a/examples/src/models/llm/replicate.ts b/examples/src/models/llm/replicate.ts
index d12ba46f3125..e640e9767965 100644
--- a/examples/src/models/llm/replicate.ts
+++ b/examples/src/models/llm/replicate.ts
@@ -1,4 +1,4 @@
-import { Replicate } from "langchain/llms/replicate";
+import { Replicate } from "langchain-gpt4all/llms/replicate";
export const run = async () => {
const modelA = new Replicate({
diff --git a/examples/src/prompts/combining_parser.ts b/examples/src/prompts/combining_parser.ts
index 8221b26f9cf3..3a4558ef5f32 100644
--- a/examples/src/prompts/combining_parser.ts
+++ b/examples/src/prompts/combining_parser.ts
@@ -1,10 +1,10 @@
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
import {
StructuredOutputParser,
RegexParser,
CombiningOutputParser,
-} from "langchain/output_parsers";
+} from "langchain-gpt4all/output_parsers";
const answerParser = StructuredOutputParser.fromNamesAndDescriptions({
answer: "answer to the user's question",
diff --git a/examples/src/prompts/comma_list_parser.ts b/examples/src/prompts/comma_list_parser.ts
index e3fe77568f11..b88747002ff6 100644
--- a/examples/src/prompts/comma_list_parser.ts
+++ b/examples/src/prompts/comma_list_parser.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { CommaSeparatedListOutputParser } from "langchain/output_parsers";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { CommaSeparatedListOutputParser } from "langchain-gpt4all/output_parsers";
export const run = async () => {
// With a `CommaSeparatedListOutputParser`, we can parse a comma separated list.
diff --git a/examples/src/prompts/custom_list_parser.ts b/examples/src/prompts/custom_list_parser.ts
index 48260c5e2611..99fb623e7db4 100644
--- a/examples/src/prompts/custom_list_parser.ts
+++ b/examples/src/prompts/custom_list_parser.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { CustomListOutputParser } from "langchain/output_parsers";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { CustomListOutputParser } from "langchain-gpt4all/output_parsers";
// With a `CustomListOutputParser`, we can parse a list with a specific length and separator.
const parser = new CustomListOutputParser({ length: 3, separator: "\n" });
diff --git a/examples/src/prompts/few_shot.ts b/examples/src/prompts/few_shot.ts
index 23dad783f4ef..e19376690d0d 100644
--- a/examples/src/prompts/few_shot.ts
+++ b/examples/src/prompts/few_shot.ts
@@ -1,4 +1,7 @@
-import { FewShotPromptTemplate, PromptTemplate } from "langchain/prompts";
+import {
+ FewShotPromptTemplate,
+ PromptTemplate,
+} from "langchain-gpt4all/prompts";
export const run = async () => {
// First, create a list of few-shot examples.
diff --git a/examples/src/prompts/fix_parser.ts b/examples/src/prompts/fix_parser.ts
index 9c34f18646fb..17b3dac2373a 100644
--- a/examples/src/prompts/fix_parser.ts
+++ b/examples/src/prompts/fix_parser.ts
@@ -1,9 +1,9 @@
import { z } from "zod";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
StructuredOutputParser,
OutputFixingParser,
-} from "langchain/output_parsers";
+} from "langchain-gpt4all/output_parsers";
export const run = async () => {
const parser = StructuredOutputParser.fromZodSchema(
@@ -42,9 +42,9 @@ export const run = async () => {
"message": "Expected array, received string"
}
]
- at StructuredOutputParser.parse (/Users/ankushgola/Code/langchainjs/langchain/src/output_parsers/structured.ts:71:13)
- at run (/Users/ankushgola/Code/langchainjs/examples/src/prompts/fix_parser.ts:25:18)
- at (/Users/ankushgola/Code/langchainjs/examples/src/index.ts:33:22)
+ at StructuredOutputParser.parse (/Users/ankushgola/Code/langchainjs-gpt4all/langchain-gpt4all/src/output_parsers/structured.ts:71:13)
+ at run (/Users/ankushgola/Code/langchainjs-gpt4all/examples/src/prompts/fix_parser.ts:25:18)
+ at (/Users/ankushgola/Code/langchainjs-gpt4all/examples/src/index.ts:33:22)
*/
}
const fixParser = OutputFixingParser.fromLLM(
diff --git a/examples/src/prompts/length_based_example_selector.ts b/examples/src/prompts/length_based_example_selector.ts
index 3a8a2e6dbb32..961b0d202967 100644
--- a/examples/src/prompts/length_based_example_selector.ts
+++ b/examples/src/prompts/length_based_example_selector.ts
@@ -2,7 +2,7 @@ import {
LengthBasedExampleSelector,
PromptTemplate,
FewShotPromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
export async function run() {
// Create a prompt template that will be used to format the examples.
diff --git a/examples/src/prompts/load_from_hub.ts b/examples/src/prompts/load_from_hub.ts
index 56a01df0fd28..13f3565b47ea 100644
--- a/examples/src/prompts/load_from_hub.ts
+++ b/examples/src/prompts/load_from_hub.ts
@@ -1,4 +1,4 @@
-import { loadPrompt } from "langchain/prompts/load";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
export const run = async () => {
const prompt = await loadPrompt("lc://prompts/hello-world/prompt.yaml");
diff --git a/examples/src/prompts/partial.ts b/examples/src/prompts/partial.ts
index d809298a371c..dabebb2d7b44 100644
--- a/examples/src/prompts/partial.ts
+++ b/examples/src/prompts/partial.ts
@@ -1,4 +1,4 @@
-import { PromptTemplate } from "langchain/prompts";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
// The `partial` method returns a new `PromptTemplate` object that can be used to format the prompt with only some of the input variables.
diff --git a/examples/src/prompts/prompt_value.ts b/examples/src/prompts/prompt_value.ts
index 5143b98a3edb..d22b6b5242fc 100644
--- a/examples/src/prompts/prompt_value.ts
+++ b/examples/src/prompts/prompt_value.ts
@@ -3,7 +3,7 @@ import {
HumanMessagePromptTemplate,
PromptTemplate,
SystemMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
export const run = async () => {
const template = "What is a good name for a company that makes {product}?";
diff --git a/examples/src/prompts/prompts.ts b/examples/src/prompts/prompts.ts
index fbc436a1d4ca..59479bfade93 100644
--- a/examples/src/prompts/prompts.ts
+++ b/examples/src/prompts/prompts.ts
@@ -3,7 +3,7 @@ import {
HumanMessagePromptTemplate,
PromptTemplate,
SystemMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
export const run = async () => {
// A `PromptTemplate` consists of a template string and a list of input variables.
diff --git a/examples/src/prompts/regex_parser.ts b/examples/src/prompts/regex_parser.ts
index 52daa24528e3..62a6214b7ed2 100644
--- a/examples/src/prompts/regex_parser.ts
+++ b/examples/src/prompts/regex_parser.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { RegexParser } from "langchain/output_parsers";
-import { PromptTemplate } from "langchain/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RegexParser } from "langchain-gpt4all/output_parsers";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
export const run = async () => {
const parser = new RegexParser(
diff --git a/examples/src/prompts/semantic_similarity_example_selector.ts b/examples/src/prompts/semantic_similarity_example_selector.ts
index f05c7fa254b8..59ddabe89fce 100644
--- a/examples/src/prompts/semantic_similarity_example_selector.ts
+++ b/examples/src/prompts/semantic_similarity_example_selector.ts
@@ -1,10 +1,10 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import {
SemanticSimilarityExampleSelector,
PromptTemplate,
FewShotPromptTemplate,
-} from "langchain/prompts";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
+} from "langchain-gpt4all/prompts";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
export async function run() {
// Create a prompt template that will be used to format the examples.
diff --git a/examples/src/prompts/structured_parser.ts b/examples/src/prompts/structured_parser.ts
index 72ff4cff9459..772d1c79f23c 100644
--- a/examples/src/prompts/structured_parser.ts
+++ b/examples/src/prompts/structured_parser.ts
@@ -1,6 +1,6 @@
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { StructuredOutputParser } from "langchain/output_parsers";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { StructuredOutputParser } from "langchain-gpt4all/output_parsers";
// With a `StructuredOutputParser` we can define a schema for the output.
const parser = StructuredOutputParser.fromNamesAndDescriptions({
diff --git a/examples/src/prompts/structured_parser_zod.ts b/examples/src/prompts/structured_parser_zod.ts
index d1e135f0adb3..101cf25e7151 100644
--- a/examples/src/prompts/structured_parser_zod.ts
+++ b/examples/src/prompts/structured_parser_zod.ts
@@ -1,7 +1,7 @@
import { z } from "zod";
-import { OpenAI } from "langchain/llms/openai";
-import { PromptTemplate } from "langchain/prompts";
-import { StructuredOutputParser } from "langchain/output_parsers";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { PromptTemplate } from "langchain-gpt4all/prompts";
+import { StructuredOutputParser } from "langchain-gpt4all/output_parsers";
// We can use zod to define a schema for the output using the `fromZodSchema` method of `StructuredOutputParser`.
const parser = StructuredOutputParser.fromZodSchema(
diff --git a/examples/src/retrievers/chatgpt-plugin.ts b/examples/src/retrievers/chatgpt-plugin.ts
index 461e122162d9..179facf476d5 100644
--- a/examples/src/retrievers/chatgpt-plugin.ts
+++ b/examples/src/retrievers/chatgpt-plugin.ts
@@ -1,4 +1,4 @@
-import { ChatGPTPluginRetriever } from "langchain/retrievers/remote";
+import { ChatGPTPluginRetriever } from "langchain-gpt4all/retrievers/remote";
export const run = async () => {
const retriever = new ChatGPTPluginRetriever({
diff --git a/examples/src/retrievers/contextual_compression.ts b/examples/src/retrievers/contextual_compression.ts
index 18387ff3e870..9174acdb4472 100644
--- a/examples/src/retrievers/contextual_compression.ts
+++ b/examples/src/retrievers/contextual_compression.ts
@@ -1,12 +1,12 @@
import * as fs from "fs";
-import { OpenAI } from "langchain/llms/openai";
-import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
-import { RetrievalQAChain } from "langchain/chains";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { ContextualCompressionRetriever } from "langchain/retrievers/contextual_compression";
-import { LLMChainExtractor } from "langchain/retrievers/document_compressors/chain_extract";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { RecursiveCharacterTextSplitter } from "langchain-gpt4all/text_splitter";
+import { RetrievalQAChain } from "langchain-gpt4all/chains";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { ContextualCompressionRetriever } from "langchain-gpt4all/retrievers/contextual_compression";
+import { LLMChainExtractor } from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
const model = new OpenAI();
const baseCompressor = LLMChainExtractor.fromLLM(model);
diff --git a/examples/src/retrievers/databerry.ts b/examples/src/retrievers/databerry.ts
index 8ab4d3ff5f71..a1f3a345413c 100644
--- a/examples/src/retrievers/databerry.ts
+++ b/examples/src/retrievers/databerry.ts
@@ -1,4 +1,4 @@
-import { DataberryRetriever } from "langchain/retrievers/databerry";
+import { DataberryRetriever } from "langchain-gpt4all/retrievers/databerry";
export const run = async () => {
const retriever = new DataberryRetriever({
diff --git a/examples/src/retrievers/hyde.ts b/examples/src/retrievers/hyde.ts
index 8b4375196193..341397cbec50 100644
--- a/examples/src/retrievers/hyde.ts
+++ b/examples/src/retrievers/hyde.ts
@@ -1,8 +1,8 @@
-import { OpenAI } from "langchain/llms/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { HydeRetriever } from "langchain/retrievers/hyde";
-import { Document } from "langchain/document";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { HydeRetriever } from "langchain-gpt4all/retrievers/hyde";
+import { Document } from "langchain-gpt4all/document";
const embeddings = new OpenAIEmbeddings();
const vectorStore = new MemoryVectorStore(embeddings);
diff --git a/examples/src/retrievers/metal.ts b/examples/src/retrievers/metal.ts
index 1c8a44ef4f1a..97767e8c5fe0 100644
--- a/examples/src/retrievers/metal.ts
+++ b/examples/src/retrievers/metal.ts
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import Metal from "@getmetal/metal-sdk";
-import { MetalRetriever } from "langchain/retrievers/metal";
+import { MetalRetriever } from "langchain-gpt4all/retrievers/metal";
export const run = async () => {
const MetalSDK = Metal.default;
diff --git a/examples/src/retrievers/supabase_hybrid.ts b/examples/src/retrievers/supabase_hybrid.ts
index d09e880c93d3..74b714e930e4 100644
--- a/examples/src/retrievers/supabase_hybrid.ts
+++ b/examples/src/retrievers/supabase_hybrid.ts
@@ -1,6 +1,6 @@
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
import { createClient } from "@supabase/supabase-js";
-import { SupabaseHybridSearch } from "langchain/retrievers/supabase";
+import { SupabaseHybridSearch } from "langchain-gpt4all/retrievers/supabase";
export const run = async () => {
const client = createClient(
diff --git a/examples/src/retrievers/time-weighted-retriever.ts b/examples/src/retrievers/time-weighted-retriever.ts
index bac85d4a8bb7..0470ee0e1da3 100644
--- a/examples/src/retrievers/time-weighted-retriever.ts
+++ b/examples/src/retrievers/time-weighted-retriever.ts
@@ -1,6 +1,6 @@
-import { TimeWeightedVectorStoreRetriever } from "langchain/retrievers/time_weighted";
-import { MemoryVectorStore } from "langchain/vectorstores/memory";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { TimeWeightedVectorStoreRetriever } from "langchain-gpt4all/retrievers/time_weighted";
+import { MemoryVectorStore } from "langchain-gpt4all/vectorstores/memory";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings());
diff --git a/examples/src/tools/webbrowser.ts b/examples/src/tools/webbrowser.ts
index 6446e4a35385..99fc4a7c7094 100644
--- a/examples/src/tools/webbrowser.ts
+++ b/examples/src/tools/webbrowser.ts
@@ -1,6 +1,6 @@
-import { WebBrowser } from "langchain/tools/webbrowser";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
+import { WebBrowser } from "langchain-gpt4all/tools/webbrowser";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
export async function run() {
// this will not work with Azure OpenAI API yet
diff --git a/langchain/.env.example b/langchain-gpt4all/.env.example
similarity index 100%
rename from langchain/.env.example
rename to langchain-gpt4all/.env.example
diff --git a/langchain/.eslintrc.cjs b/langchain-gpt4all/.eslintrc.cjs
similarity index 100%
rename from langchain/.eslintrc.cjs
rename to langchain-gpt4all/.eslintrc.cjs
diff --git a/langchain/.gitignore b/langchain-gpt4all/.gitignore
similarity index 100%
rename from langchain/.gitignore
rename to langchain-gpt4all/.gitignore
diff --git a/langchain/.release-it.json b/langchain-gpt4all/.release-it.json
similarity index 100%
rename from langchain/.release-it.json
rename to langchain-gpt4all/.release-it.json
diff --git a/langchain/README.md b/langchain-gpt4all/README.md
similarity index 65%
rename from langchain/README.md
rename to langchain-gpt4all/README.md
index 7177396354e2..c42b16893f9f 100644
--- a/langchain/README.md
+++ b/langchain-gpt4all/README.md
@@ -7,10 +7,10 @@ Please fill out [this form](https://forms.gle/57d8AmXBYp8PP8tZA) and we'll set u
## Quick Install
-`yarn add langchain`
+`yarn add langchain-gpt4all`
```typescript
-import { OpenAI } from 'langchain/llms';
+import { OpenAI } from "langchain-gpt4all/llms";
```
## 🤔 What is this?
@@ -24,10 +24,10 @@ This library is aimed at assisting in the development of those types of applicat
## Relationship with Python LangChain
-This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
+This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain-gpt4all). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
-The [LangChainHub](https://github.com/hwchase17/langchain-hub) is a central place for the serialized versions of these prompts, chains, and agents.
+The [LangChainHub](https://github.com/hwchase17/langchain-gpt4all-hub) is a central place for the serialized versions of these prompts, chains, and agents.
## 📖 Documentation
-For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs/docs/overview).
+For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs-gpt4all/docs/overview).
diff --git a/langchain/babel.config.cjs b/langchain-gpt4all/babel.config.cjs
similarity index 100%
rename from langchain/babel.config.cjs
rename to langchain-gpt4all/babel.config.cjs
diff --git a/langchain/docker-compose.yaml b/langchain-gpt4all/docker-compose.yaml
similarity index 72%
rename from langchain/docker-compose.yaml
rename to langchain-gpt4all/docker-compose.yaml
index 027b140c2322..78975846a75e 100644
--- a/langchain/docker-compose.yaml
+++ b/langchain-gpt4all/docker-compose.yaml
@@ -1,17 +1,17 @@
-version: '3'
+version: "3"
services:
- langchain-frontend:
+ langchain-gpt4all-frontend:
platform: linux/amd64
image: notlangchain/langchainplus-frontend:latest
ports:
- 4173:4173
environment:
- - BACKEND_URL=http://langchain-backend:8000
+ - BACKEND_URL=http://langchain-gpt4all-backend:8000
- PUBLIC_BASE_URL=http://localhost:8000
- PUBLIC_DEV_MODE=true
depends_on:
- - langchain-backend
- langchain-backend:
+ - langchain-gpt4all-backend
+ langchain-gpt4all-backend:
platform: linux/amd64
image: notlangchain/langchainplus:latest
environment:
@@ -20,8 +20,8 @@ services:
ports:
- 8000:8000
depends_on:
- - langchain-db
- langchain-db:
+ - langchain-gpt4all-db
+ langchain-gpt4all-db:
image: postgres:14.1
environment:
- POSTGRES_PASSWORD=postgres
diff --git a/langchain/jest.config.cjs b/langchain-gpt4all/jest.config.cjs
similarity index 100%
rename from langchain/jest.config.cjs
rename to langchain-gpt4all/jest.config.cjs
diff --git a/langchain/package.json b/langchain-gpt4all/package.json
similarity index 99%
rename from langchain/package.json
rename to langchain-gpt4all/package.json
index fafce8891d84..2fe52e86b608 100644
--- a/langchain/package.json
+++ b/langchain-gpt4all/package.json
@@ -1,7 +1,7 @@
{
- "name": "langchain",
+ "name": "langchain-gpt4all",
"version": "0.0.73",
- "description": "Typescript bindings for langchain",
+ "description": "Typescript bindings for langchain-gpt4all",
"type": "module",
"engines": {
"node": ">=18"
@@ -292,7 +292,7 @@
],
"repository": {
"type": "git",
- "url": "git@github.com:hwchase17/langchainjs.git"
+ "url": "git@github.com:lucasjohnston/langchainjs-gpt4all.git"
},
"scripts": {
"build": "yarn clean && yarn build:esm && yarn build:cjs && node scripts/create-entrypoints.js && node scripts/check-tree-shaking.js",
diff --git a/langchain/scripts/check-tree-shaking.js b/langchain-gpt4all/scripts/check-tree-shaking.js
similarity index 100%
rename from langchain/scripts/check-tree-shaking.js
rename to langchain-gpt4all/scripts/check-tree-shaking.js
diff --git a/langchain/scripts/create-entrypoints.js b/langchain-gpt4all/scripts/create-entrypoints.js
similarity index 95%
rename from langchain/scripts/create-entrypoints.js
rename to langchain-gpt4all/scripts/create-entrypoints.js
index 64559409b353..76857d088e7f 100644
--- a/langchain/scripts/create-entrypoints.js
+++ b/langchain-gpt4all/scripts/create-entrypoints.js
@@ -2,7 +2,7 @@ import * as fs from "fs";
import * as path from "path";
// This lists all the entrypoints for the library. Each key corresponds to an
-// importable path, eg. `import { AgentExecutor } from "langchain/agents"`.
+// importable path, eg. `import { AgentExecutor } from "langchain-gpt4all/agents"`.
// The value is the path to the file in `src/` that exports the entrypoint.
// This is used to generate the `exports` field in package.json.
// Order is not important.
@@ -198,16 +198,18 @@ const requiresOptionalDependency = [
const testExports = [
[
"test-exports-esm",
- (p) => `import * as ${p.replace(/\//g, "_")} from "langchain/${p}";`,
+ (p) =>
+ `import * as ${p.replace(/\//g, "_")} from "langchain-gpt4all/${p}";`,
],
[
"test-exports-cjs",
- (p) => `const ${p.replace(/\//g, "_")} = require("langchain/${p}");`,
+ (p) =>
+ `const ${p.replace(/\//g, "_")} = require("langchain-gpt4all/${p}");`,
],
- ["test-exports-cf", (p) => `export * from "langchain/${p}";`],
- ["test-exports-cra", (p) => `export * from "langchain/${p}";`],
- ["test-exports-vercel", (p) => `export * from "langchain/${p}";`],
- ["test-exports-vite", (p) => `export * from "langchain/${p}";`],
+ ["test-exports-cf", (p) => `export * from "langchain-gpt4all/${p}";`],
+ ["test-exports-cra", (p) => `export * from "langchain-gpt4all/${p}";`],
+ ["test-exports-vercel", (p) => `export * from "langchain-gpt4all/${p}";`],
+ ["test-exports-vite", (p) => `export * from "langchain-gpt4all/${p}";`],
];
const updateJsonFile = (relativePath, updateFunction) => {
diff --git a/langchain/scripts/move-cjs-to-dist.js b/langchain-gpt4all/scripts/move-cjs-to-dist.js
similarity index 100%
rename from langchain/scripts/move-cjs-to-dist.js
rename to langchain-gpt4all/scripts/move-cjs-to-dist.js
diff --git a/langchain/src/agents/agent.ts b/langchain-gpt4all/src/agents/agent.ts
similarity index 100%
rename from langchain/src/agents/agent.ts
rename to langchain-gpt4all/src/agents/agent.ts
diff --git a/langchain/src/agents/agent_toolkits/base.ts b/langchain-gpt4all/src/agents/agent_toolkits/base.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/base.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/base.ts
diff --git a/langchain/src/agents/agent_toolkits/index.ts b/langchain-gpt4all/src/agents/agent_toolkits/index.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/index.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/index.ts
diff --git a/langchain/src/agents/agent_toolkits/json/json.ts b/langchain-gpt4all/src/agents/agent_toolkits/json/json.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/json/json.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/json/json.ts
diff --git a/langchain/src/agents/agent_toolkits/json/prompt.ts b/langchain-gpt4all/src/agents/agent_toolkits/json/prompt.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/json/prompt.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/json/prompt.ts
diff --git a/langchain/src/agents/agent_toolkits/openapi/openapi.ts b/langchain-gpt4all/src/agents/agent_toolkits/openapi/openapi.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/openapi/openapi.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/openapi/openapi.ts
diff --git a/langchain/src/agents/agent_toolkits/openapi/prompt.ts b/langchain-gpt4all/src/agents/agent_toolkits/openapi/prompt.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/openapi/prompt.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/openapi/prompt.ts
diff --git a/langchain/src/agents/agent_toolkits/sql/prompt.ts b/langchain-gpt4all/src/agents/agent_toolkits/sql/prompt.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/sql/prompt.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/sql/prompt.ts
diff --git a/langchain/src/agents/agent_toolkits/sql/sql.ts b/langchain-gpt4all/src/agents/agent_toolkits/sql/sql.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/sql/sql.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/sql/sql.ts
diff --git a/langchain/src/agents/agent_toolkits/vectorstore/prompt.ts b/langchain-gpt4all/src/agents/agent_toolkits/vectorstore/prompt.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/vectorstore/prompt.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/vectorstore/prompt.ts
diff --git a/langchain/src/agents/agent_toolkits/vectorstore/vectorstore.ts b/langchain-gpt4all/src/agents/agent_toolkits/vectorstore/vectorstore.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/vectorstore/vectorstore.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/vectorstore/vectorstore.ts
diff --git a/langchain/src/agents/agent_toolkits/zapier/zapier.ts b/langchain-gpt4all/src/agents/agent_toolkits/zapier/zapier.ts
similarity index 100%
rename from langchain/src/agents/agent_toolkits/zapier/zapier.ts
rename to langchain-gpt4all/src/agents/agent_toolkits/zapier/zapier.ts
diff --git a/langchain/src/agents/chat/index.ts b/langchain-gpt4all/src/agents/chat/index.ts
similarity index 100%
rename from langchain/src/agents/chat/index.ts
rename to langchain-gpt4all/src/agents/chat/index.ts
diff --git a/langchain/src/agents/chat/outputParser.ts b/langchain-gpt4all/src/agents/chat/outputParser.ts
similarity index 100%
rename from langchain/src/agents/chat/outputParser.ts
rename to langchain-gpt4all/src/agents/chat/outputParser.ts
diff --git a/langchain/src/agents/chat/prompt.ts b/langchain-gpt4all/src/agents/chat/prompt.ts
similarity index 100%
rename from langchain/src/agents/chat/prompt.ts
rename to langchain-gpt4all/src/agents/chat/prompt.ts
diff --git a/langchain/src/agents/chat_convo/index.ts b/langchain-gpt4all/src/agents/chat_convo/index.ts
similarity index 100%
rename from langchain/src/agents/chat_convo/index.ts
rename to langchain-gpt4all/src/agents/chat_convo/index.ts
diff --git a/langchain/src/agents/chat_convo/outputParser.ts b/langchain-gpt4all/src/agents/chat_convo/outputParser.ts
similarity index 100%
rename from langchain/src/agents/chat_convo/outputParser.ts
rename to langchain-gpt4all/src/agents/chat_convo/outputParser.ts
diff --git a/langchain/src/agents/chat_convo/prompt.ts b/langchain-gpt4all/src/agents/chat_convo/prompt.ts
similarity index 100%
rename from langchain/src/agents/chat_convo/prompt.ts
rename to langchain-gpt4all/src/agents/chat_convo/prompt.ts
diff --git a/langchain/src/agents/executor.ts b/langchain-gpt4all/src/agents/executor.ts
similarity index 100%
rename from langchain/src/agents/executor.ts
rename to langchain-gpt4all/src/agents/executor.ts
diff --git a/langchain/src/agents/helpers.ts b/langchain-gpt4all/src/agents/helpers.ts
similarity index 100%
rename from langchain/src/agents/helpers.ts
rename to langchain-gpt4all/src/agents/helpers.ts
diff --git a/langchain/src/agents/index.ts b/langchain-gpt4all/src/agents/index.ts
similarity index 100%
rename from langchain/src/agents/index.ts
rename to langchain-gpt4all/src/agents/index.ts
diff --git a/langchain/src/agents/initialize.ts b/langchain-gpt4all/src/agents/initialize.ts
similarity index 100%
rename from langchain/src/agents/initialize.ts
rename to langchain-gpt4all/src/agents/initialize.ts
diff --git a/langchain/src/agents/load.ts b/langchain-gpt4all/src/agents/load.ts
similarity index 100%
rename from langchain/src/agents/load.ts
rename to langchain-gpt4all/src/agents/load.ts
diff --git a/langchain/src/agents/mrkl/index.ts b/langchain-gpt4all/src/agents/mrkl/index.ts
similarity index 100%
rename from langchain/src/agents/mrkl/index.ts
rename to langchain-gpt4all/src/agents/mrkl/index.ts
diff --git a/langchain/src/agents/mrkl/outputParser.ts b/langchain-gpt4all/src/agents/mrkl/outputParser.ts
similarity index 100%
rename from langchain/src/agents/mrkl/outputParser.ts
rename to langchain-gpt4all/src/agents/mrkl/outputParser.ts
diff --git a/langchain/src/agents/mrkl/prompt.ts b/langchain-gpt4all/src/agents/mrkl/prompt.ts
similarity index 100%
rename from langchain/src/agents/mrkl/prompt.ts
rename to langchain-gpt4all/src/agents/mrkl/prompt.ts
diff --git a/langchain/src/agents/tests/agent.int.test.ts b/langchain-gpt4all/src/agents/tests/agent.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/agent.int.test.ts
rename to langchain-gpt4all/src/agents/tests/agent.int.test.ts
diff --git a/langchain/src/agents/tests/aws_lambda.test.ts b/langchain-gpt4all/src/agents/tests/aws_lambda.test.ts
similarity index 100%
rename from langchain/src/agents/tests/aws_lambda.test.ts
rename to langchain-gpt4all/src/agents/tests/aws_lambda.test.ts
diff --git a/langchain/src/agents/tests/calculator.test.ts b/langchain-gpt4all/src/agents/tests/calculator.test.ts
similarity index 100%
rename from langchain/src/agents/tests/calculator.test.ts
rename to langchain-gpt4all/src/agents/tests/calculator.test.ts
diff --git a/langchain/src/agents/tests/chat_agent.int.test.ts b/langchain-gpt4all/src/agents/tests/chat_agent.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/chat_agent.int.test.ts
rename to langchain-gpt4all/src/agents/tests/chat_agent.int.test.ts
diff --git a/langchain/src/agents/tests/chat_convo_agent.int.test.ts b/langchain-gpt4all/src/agents/tests/chat_convo_agent.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/chat_convo_agent.int.test.ts
rename to langchain-gpt4all/src/agents/tests/chat_convo_agent.int.test.ts
diff --git a/langchain/src/agents/tests/chat_output_parser.test.ts b/langchain-gpt4all/src/agents/tests/chat_output_parser.test.ts
similarity index 100%
rename from langchain/src/agents/tests/chat_output_parser.test.ts
rename to langchain-gpt4all/src/agents/tests/chat_output_parser.test.ts
diff --git a/langchain/src/agents/tests/evaluation.int.test.ts b/langchain-gpt4all/src/agents/tests/evaluation.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/evaluation.int.test.ts
rename to langchain-gpt4all/src/agents/tests/evaluation.int.test.ts
diff --git a/langchain/src/agents/tests/json.test.ts b/langchain-gpt4all/src/agents/tests/json.test.ts
similarity index 100%
rename from langchain/src/agents/tests/json.test.ts
rename to langchain-gpt4all/src/agents/tests/json.test.ts
diff --git a/langchain/src/agents/tests/mrkl_agent.int.test.ts b/langchain-gpt4all/src/agents/tests/mrkl_agent.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/mrkl_agent.int.test.ts
rename to langchain-gpt4all/src/agents/tests/mrkl_agent.int.test.ts
diff --git a/langchain/src/agents/tests/sql.test.ts b/langchain-gpt4all/src/agents/tests/sql.test.ts
similarity index 100%
rename from langchain/src/agents/tests/sql.test.ts
rename to langchain-gpt4all/src/agents/tests/sql.test.ts
diff --git a/langchain/src/agents/tests/zapier_toolkit.int.test.ts b/langchain-gpt4all/src/agents/tests/zapier_toolkit.int.test.ts
similarity index 100%
rename from langchain/src/agents/tests/zapier_toolkit.int.test.ts
rename to langchain-gpt4all/src/agents/tests/zapier_toolkit.int.test.ts
diff --git a/langchain/src/agents/types.ts b/langchain-gpt4all/src/agents/types.ts
similarity index 100%
rename from langchain/src/agents/types.ts
rename to langchain-gpt4all/src/agents/types.ts
diff --git a/langchain/src/base_language/count_tokens.ts b/langchain-gpt4all/src/base_language/count_tokens.ts
similarity index 100%
rename from langchain/src/base_language/count_tokens.ts
rename to langchain-gpt4all/src/base_language/count_tokens.ts
diff --git a/langchain/src/base_language/index.ts b/langchain-gpt4all/src/base_language/index.ts
similarity index 100%
rename from langchain/src/base_language/index.ts
rename to langchain-gpt4all/src/base_language/index.ts
diff --git a/langchain/src/cache/base.ts b/langchain-gpt4all/src/cache/base.ts
similarity index 70%
rename from langchain/src/cache/base.ts
rename to langchain-gpt4all/src/cache/base.ts
index 133637455b68..461930b70dba 100644
--- a/langchain/src/cache/base.ts
+++ b/langchain-gpt4all/src/cache/base.ts
@@ -1,14 +1,14 @@
import hash from "object-hash";
/**
- * This cache key should be consistent across all versions of langchain.
- * It is currently NOT consistent across versions of langchain.
+ * This cache key should be consistent across all versions of langchain-gpt4all.
+ * It is currently NOT consistent across versions of langchain-gpt4all.
*
* A huge benefit of having a remote cache (like redis) is that you can
* access the cache from different processes/machines. The allows you to
* seperate concerns and scale horizontally.
*
- * TODO: Make cache key consistent across versions of langchain.
+ * TODO: Make cache key consistent across versions of langchain-gpt4all.
*/
export const getCacheKey = (...strings: string[]): string =>
hash(strings.join("_"));
diff --git a/langchain/src/cache/index.ts b/langchain-gpt4all/src/cache/index.ts
similarity index 100%
rename from langchain/src/cache/index.ts
rename to langchain-gpt4all/src/cache/index.ts
diff --git a/langchain/src/cache/redis.ts b/langchain-gpt4all/src/cache/redis.ts
similarity index 100%
rename from langchain/src/cache/redis.ts
rename to langchain-gpt4all/src/cache/redis.ts
diff --git a/langchain/src/cache/tests/cache.test.ts b/langchain-gpt4all/src/cache/tests/cache.test.ts
similarity index 100%
rename from langchain/src/cache/tests/cache.test.ts
rename to langchain-gpt4all/src/cache/tests/cache.test.ts
diff --git a/langchain/src/cache/tests/redis.test.ts b/langchain-gpt4all/src/cache/tests/redis.test.ts
similarity index 100%
rename from langchain/src/cache/tests/redis.test.ts
rename to langchain-gpt4all/src/cache/tests/redis.test.ts
diff --git a/langchain/src/callbacks/base.ts b/langchain-gpt4all/src/callbacks/base.ts
similarity index 100%
rename from langchain/src/callbacks/base.ts
rename to langchain-gpt4all/src/callbacks/base.ts
diff --git a/langchain/src/callbacks/handlers/console.ts b/langchain-gpt4all/src/callbacks/handlers/console.ts
similarity index 100%
rename from langchain/src/callbacks/handlers/console.ts
rename to langchain-gpt4all/src/callbacks/handlers/console.ts
diff --git a/langchain/src/callbacks/handlers/initialize.ts b/langchain-gpt4all/src/callbacks/handlers/initialize.ts
similarity index 100%
rename from langchain/src/callbacks/handlers/initialize.ts
rename to langchain-gpt4all/src/callbacks/handlers/initialize.ts
diff --git a/langchain/src/callbacks/handlers/tracers.ts b/langchain-gpt4all/src/callbacks/handlers/tracers.ts
similarity index 100%
rename from langchain/src/callbacks/handlers/tracers.ts
rename to langchain-gpt4all/src/callbacks/handlers/tracers.ts
diff --git a/langchain/src/callbacks/index.ts b/langchain-gpt4all/src/callbacks/index.ts
similarity index 100%
rename from langchain/src/callbacks/index.ts
rename to langchain-gpt4all/src/callbacks/index.ts
diff --git a/langchain/src/callbacks/manager.ts b/langchain-gpt4all/src/callbacks/manager.ts
similarity index 100%
rename from langchain/src/callbacks/manager.ts
rename to langchain-gpt4all/src/callbacks/manager.ts
diff --git a/langchain/src/callbacks/tests/callbacks.test.ts b/langchain-gpt4all/src/callbacks/tests/callbacks.test.ts
similarity index 100%
rename from langchain/src/callbacks/tests/callbacks.test.ts
rename to langchain-gpt4all/src/callbacks/tests/callbacks.test.ts
diff --git a/langchain/src/callbacks/tests/langchain_tracer.int.test.ts b/langchain-gpt4all/src/callbacks/tests/langchain_tracer.int.test.ts
similarity index 100%
rename from langchain/src/callbacks/tests/langchain_tracer.int.test.ts
rename to langchain-gpt4all/src/callbacks/tests/langchain_tracer.int.test.ts
diff --git a/langchain/src/callbacks/tests/tracer.test.ts b/langchain-gpt4all/src/callbacks/tests/tracer.test.ts
similarity index 100%
rename from langchain/src/callbacks/tests/tracer.test.ts
rename to langchain-gpt4all/src/callbacks/tests/tracer.test.ts
diff --git a/langchain/src/chains/analyze_documents_chain.ts b/langchain-gpt4all/src/chains/analyze_documents_chain.ts
similarity index 100%
rename from langchain/src/chains/analyze_documents_chain.ts
rename to langchain-gpt4all/src/chains/analyze_documents_chain.ts
diff --git a/langchain/src/chains/base.ts b/langchain-gpt4all/src/chains/base.ts
similarity index 100%
rename from langchain/src/chains/base.ts
rename to langchain-gpt4all/src/chains/base.ts
diff --git a/langchain/src/chains/chat_vector_db_chain.ts b/langchain-gpt4all/src/chains/chat_vector_db_chain.ts
similarity index 100%
rename from langchain/src/chains/chat_vector_db_chain.ts
rename to langchain-gpt4all/src/chains/chat_vector_db_chain.ts
diff --git a/langchain/src/chains/combine_docs_chain.ts b/langchain-gpt4all/src/chains/combine_docs_chain.ts
similarity index 100%
rename from langchain/src/chains/combine_docs_chain.ts
rename to langchain-gpt4all/src/chains/combine_docs_chain.ts
diff --git a/langchain/src/chains/constitutional_ai/constitutional_chain.ts b/langchain-gpt4all/src/chains/constitutional_ai/constitutional_chain.ts
similarity index 100%
rename from langchain/src/chains/constitutional_ai/constitutional_chain.ts
rename to langchain-gpt4all/src/chains/constitutional_ai/constitutional_chain.ts
diff --git a/langchain/src/chains/constitutional_ai/constitutional_principle.ts b/langchain-gpt4all/src/chains/constitutional_ai/constitutional_principle.ts
similarity index 90%
rename from langchain/src/chains/constitutional_ai/constitutional_principle.ts
rename to langchain-gpt4all/src/chains/constitutional_ai/constitutional_principle.ts
index 72904eba49e8..6943c5c3af3c 100644
--- a/langchain/src/chains/constitutional_ai/constitutional_principle.ts
+++ b/langchain-gpt4all/src/chains/constitutional_ai/constitutional_principle.ts
@@ -1,4 +1,4 @@
-import { SerializedConstitutionalPrinciple } from "../../chains/serde.js";
+import { SerializedConstitutionalPrinciple } from "../serde.js";
export class ConstitutionalPrinciple {
critiqueRequest: string;
diff --git a/langchain/src/chains/constitutional_ai/constitutional_prompts.ts b/langchain-gpt4all/src/chains/constitutional_ai/constitutional_prompts.ts
similarity index 100%
rename from langchain/src/chains/constitutional_ai/constitutional_prompts.ts
rename to langchain-gpt4all/src/chains/constitutional_ai/constitutional_prompts.ts
diff --git a/langchain/src/chains/conversation.ts b/langchain-gpt4all/src/chains/conversation.ts
similarity index 100%
rename from langchain/src/chains/conversation.ts
rename to langchain-gpt4all/src/chains/conversation.ts
diff --git a/langchain/src/chains/conversational_retrieval_chain.ts b/langchain-gpt4all/src/chains/conversational_retrieval_chain.ts
similarity index 100%
rename from langchain/src/chains/conversational_retrieval_chain.ts
rename to langchain-gpt4all/src/chains/conversational_retrieval_chain.ts
diff --git a/langchain/src/chains/index.ts b/langchain-gpt4all/src/chains/index.ts
similarity index 100%
rename from langchain/src/chains/index.ts
rename to langchain-gpt4all/src/chains/index.ts
diff --git a/langchain/src/chains/llm_chain.ts b/langchain-gpt4all/src/chains/llm_chain.ts
similarity index 95%
rename from langchain/src/chains/llm_chain.ts
rename to langchain-gpt4all/src/chains/llm_chain.ts
index 52801138827e..58a0cd57dfc4 100644
--- a/langchain/src/chains/llm_chain.ts
+++ b/langchain-gpt4all/src/chains/llm_chain.ts
@@ -24,9 +24,9 @@ export interface LLMChainInput
*
* @example
* ```ts
- * import { LLMChain } from "langchain/chains";
- * import { OpenAI } from "langchain/llms/openai";
- * import { PromptTemplate } from "langchain/prompts";
+ * import { LLMChain } from "langchain-gpt4all/chains";
+ * import { OpenAI } from "langchain-gpt4all/llms/openai";
+ * import { PromptTemplate } from "langchain-gpt4all/prompts";
*
* const prompt = PromptTemplate.fromTemplate("Tell me a {adjective} joke");
* const llm = new LLMChain({ llm: new OpenAI(), prompt });
diff --git a/langchain/src/chains/load.ts b/langchain-gpt4all/src/chains/load.ts
similarity index 86%
rename from langchain/src/chains/load.ts
rename to langchain-gpt4all/src/chains/load.ts
index c319f9ddd7b1..1df4a83d8c2d 100644
--- a/langchain/src/chains/load.ts
+++ b/langchain-gpt4all/src/chains/load.ts
@@ -13,12 +13,12 @@ const loadChainFromFile: FileLoader = async (
};
/**
- * Load a chain from {@link https://github.com/hwchase17/langchain-hub | LangchainHub} or local filesystem.
+ * Load a chain from {@link https://github.com/hwchase17/langchain-gpt4all-hub | LangchainHub} or local filesystem.
*
* @example
* Loading from LangchainHub:
* ```ts
- * import { loadChain } from "langchain/chains/load";
+ * import { loadChain } from "langchain-gpt4all/chains/load";
* const chain = await loadChain("lc://chains/hello-world/chain.json");
* const res = await chain.call({ topic: "my favorite color" });
* ```
@@ -26,7 +26,7 @@ const loadChainFromFile: FileLoader = async (
* @example
* Loading from local filesystem:
* ```ts
- * import { loadChain } from "langchain/chains/load";
+ * import { loadChain } from "langchain-gpt4all/chains/load";
* const chain = await loadChain("/path/to/chain.json");
* ```
*/
diff --git a/langchain/src/chains/openai_moderation.ts b/langchain-gpt4all/src/chains/openai_moderation.ts
similarity index 100%
rename from langchain/src/chains/openai_moderation.ts
rename to langchain-gpt4all/src/chains/openai_moderation.ts
diff --git a/langchain/src/chains/prompt_selector.ts b/langchain-gpt4all/src/chains/prompt_selector.ts
similarity index 100%
rename from langchain/src/chains/prompt_selector.ts
rename to langchain-gpt4all/src/chains/prompt_selector.ts
diff --git a/langchain/src/chains/question_answering/load.ts b/langchain-gpt4all/src/chains/question_answering/load.ts
similarity index 100%
rename from langchain/src/chains/question_answering/load.ts
rename to langchain-gpt4all/src/chains/question_answering/load.ts
diff --git a/langchain/src/chains/question_answering/map_reduce_prompts.ts b/langchain-gpt4all/src/chains/question_answering/map_reduce_prompts.ts
similarity index 100%
rename from langchain/src/chains/question_answering/map_reduce_prompts.ts
rename to langchain-gpt4all/src/chains/question_answering/map_reduce_prompts.ts
diff --git a/langchain/src/chains/question_answering/refine_prompts.ts b/langchain-gpt4all/src/chains/question_answering/refine_prompts.ts
similarity index 100%
rename from langchain/src/chains/question_answering/refine_prompts.ts
rename to langchain-gpt4all/src/chains/question_answering/refine_prompts.ts
diff --git a/langchain/src/chains/question_answering/stuff_prompts.ts b/langchain-gpt4all/src/chains/question_answering/stuff_prompts.ts
similarity index 100%
rename from langchain/src/chains/question_answering/stuff_prompts.ts
rename to langchain-gpt4all/src/chains/question_answering/stuff_prompts.ts
diff --git a/langchain/src/chains/question_answering/tests/load.int.test.ts b/langchain-gpt4all/src/chains/question_answering/tests/load.int.test.ts
similarity index 100%
rename from langchain/src/chains/question_answering/tests/load.int.test.ts
rename to langchain-gpt4all/src/chains/question_answering/tests/load.int.test.ts
diff --git a/langchain/src/chains/retrieval_qa.ts b/langchain-gpt4all/src/chains/retrieval_qa.ts
similarity index 100%
rename from langchain/src/chains/retrieval_qa.ts
rename to langchain-gpt4all/src/chains/retrieval_qa.ts
diff --git a/langchain/src/chains/router/llm_router.ts b/langchain-gpt4all/src/chains/router/llm_router.ts
similarity index 92%
rename from langchain/src/chains/router/llm_router.ts
rename to langchain-gpt4all/src/chains/router/llm_router.ts
index f9bcdb138384..c1012ee4042a 100644
--- a/langchain/src/chains/router/llm_router.ts
+++ b/langchain-gpt4all/src/chains/router/llm_router.ts
@@ -1,10 +1,10 @@
import { BasePromptTemplate } from "../../prompts/base.js";
-import { LLMChain } from "../../chains/llm_chain.js";
+import { LLMChain } from "../llm_chain.js";
import { RouterChain } from "./multi_route.js";
import { CallbackManagerForChainRun } from "../../callbacks/manager.js";
import { ChainValues } from "../../schema/index.js";
import { BaseLanguageModel } from "../../base_language/index.js";
-import { ChainInputs } from "../../chains/base.js";
+import { ChainInputs } from "../base.js";
export type RouterOutputSchema = {
destination: string;
diff --git a/langchain/src/chains/router/multi_prompt.ts b/langchain-gpt4all/src/chains/router/multi_prompt.ts
similarity index 94%
rename from langchain/src/chains/router/multi_prompt.ts
rename to langchain-gpt4all/src/chains/router/multi_prompt.ts
index 478c705d9061..1f5f2fbe19d7 100644
--- a/langchain/src/chains/router/multi_prompt.ts
+++ b/langchain-gpt4all/src/chains/router/multi_prompt.ts
@@ -2,12 +2,12 @@ import { z } from "zod";
import { BaseLanguageModel } from "../../base_language/index.js";
import { MultiRouteChain, MultiRouteChainInput } from "./multi_route.js";
import { STRUCTURED_MULTI_PROMPT_ROUTER_TEMPLATE } from "./multi_prompt_prompt.js";
-import { BaseChain } from "../../chains/base.js";
+import { BaseChain } from "../base.js";
import { interpolateFString } from "../../prompts/template.js";
-import { LLMChain } from "../../chains/llm_chain.js";
+import { LLMChain } from "../llm_chain.js";
import { PromptTemplate } from "../../prompts/prompt.js";
import { LLMRouterChain } from "./llm_router.js";
-import { ConversationChain } from "../../chains/conversation.js";
+import { ConversationChain } from "../conversation.js";
import { zipEntries } from "./utils.js";
import { RouterOutputParser } from "../../output_parsers/router.js";
diff --git a/langchain/src/chains/router/multi_prompt_prompt.ts b/langchain-gpt4all/src/chains/router/multi_prompt_prompt.ts
similarity index 100%
rename from langchain/src/chains/router/multi_prompt_prompt.ts
rename to langchain-gpt4all/src/chains/router/multi_prompt_prompt.ts
diff --git a/langchain/src/chains/router/multi_retrieval_prompt.ts b/langchain-gpt4all/src/chains/router/multi_retrieval_prompt.ts
similarity index 100%
rename from langchain/src/chains/router/multi_retrieval_prompt.ts
rename to langchain-gpt4all/src/chains/router/multi_retrieval_prompt.ts
diff --git a/langchain/src/chains/router/multi_retrieval_qa.ts b/langchain-gpt4all/src/chains/router/multi_retrieval_qa.ts
similarity index 95%
rename from langchain/src/chains/router/multi_retrieval_qa.ts
rename to langchain-gpt4all/src/chains/router/multi_retrieval_qa.ts
index b9d9c82728a9..feb5c46a0c89 100644
--- a/langchain/src/chains/router/multi_retrieval_qa.ts
+++ b/langchain-gpt4all/src/chains/router/multi_retrieval_qa.ts
@@ -1,18 +1,15 @@
import { z } from "zod";
import { BaseLanguageModel } from "../../base_language/index.js";
import { MultiRouteChain, MultiRouteChainInput } from "./multi_route.js";
-import { BaseChain } from "../../chains/base.js";
+import { BaseChain } from "../base.js";
import { interpolateFString } from "../../prompts/template.js";
import { PromptTemplate } from "../../prompts/prompt.js";
import { LLMRouterChain } from "./llm_router.js";
-import {
- ConversationChain,
- DEFAULT_TEMPLATE,
-} from "../../chains/conversation.js";
+import { ConversationChain, DEFAULT_TEMPLATE } from "../conversation.js";
import { BaseRetriever } from "../../schema/index.js";
import { STRUCTURED_MULTI_RETRIEVAL_ROUTER_TEMPLATE } from "./multi_retrieval_prompt.js";
import { zipEntries } from "./utils.js";
-import { RetrievalQAChain } from "../../chains/retrieval_qa.js";
+import { RetrievalQAChain } from "../retrieval_qa.js";
import { RouterOutputParser } from "../../output_parsers/router.js";
export type MultiRetrievalDefaults = {
diff --git a/langchain/src/chains/router/multi_route.ts b/langchain-gpt4all/src/chains/router/multi_route.ts
similarity index 97%
rename from langchain/src/chains/router/multi_route.ts
rename to langchain-gpt4all/src/chains/router/multi_route.ts
index ca5e65ef18d1..562332bb7295 100644
--- a/langchain/src/chains/router/multi_route.ts
+++ b/langchain-gpt4all/src/chains/router/multi_route.ts
@@ -2,7 +2,7 @@ import {
CallbackManagerForChainRun,
Callbacks,
} from "../../callbacks/manager.js";
-import { BaseChain, ChainInputs } from "../../chains/base.js";
+import { BaseChain, ChainInputs } from "../base.js";
import { ChainValues } from "../../schema/index.js";
type Inputs = {
diff --git a/langchain/src/chains/router/tests/multi_prompt.int.test.ts b/langchain-gpt4all/src/chains/router/tests/multi_prompt.int.test.ts
similarity index 100%
rename from langchain/src/chains/router/tests/multi_prompt.int.test.ts
rename to langchain-gpt4all/src/chains/router/tests/multi_prompt.int.test.ts
diff --git a/langchain/src/chains/router/tests/multi_prompt.test.ts b/langchain-gpt4all/src/chains/router/tests/multi_prompt.test.ts
similarity index 100%
rename from langchain/src/chains/router/tests/multi_prompt.test.ts
rename to langchain-gpt4all/src/chains/router/tests/multi_prompt.test.ts
diff --git a/langchain/src/chains/router/tests/multi_retrieval_qa.int.test.ts b/langchain-gpt4all/src/chains/router/tests/multi_retrieval_qa.int.test.ts
similarity index 100%
rename from langchain/src/chains/router/tests/multi_retrieval_qa.int.test.ts
rename to langchain-gpt4all/src/chains/router/tests/multi_retrieval_qa.int.test.ts
diff --git a/langchain/src/chains/router/tests/multi_retrieval_qa.test.ts b/langchain-gpt4all/src/chains/router/tests/multi_retrieval_qa.test.ts
similarity index 100%
rename from langchain/src/chains/router/tests/multi_retrieval_qa.test.ts
rename to langchain-gpt4all/src/chains/router/tests/multi_retrieval_qa.test.ts
diff --git a/langchain/src/chains/router/utils.ts b/langchain-gpt4all/src/chains/router/utils.ts
similarity index 100%
rename from langchain/src/chains/router/utils.ts
rename to langchain-gpt4all/src/chains/router/utils.ts
diff --git a/langchain/src/chains/sequential_chain.ts b/langchain-gpt4all/src/chains/sequential_chain.ts
similarity index 98%
rename from langchain/src/chains/sequential_chain.ts
rename to langchain-gpt4all/src/chains/sequential_chain.ts
index 8c89fa6eeafa..f25125250380 100644
--- a/langchain/src/chains/sequential_chain.ts
+++ b/langchain-gpt4all/src/chains/sequential_chain.ts
@@ -189,9 +189,9 @@ export interface SimpleSequentialChainInput extends ChainInputs {
*
* @example
* ```ts
- * import { SimpleSequentialChain, LLMChain } from "langchain/chains";
- * import { OpenAI } from "langchain/llms/openai";
- * import { PromptTemplate } from "langchain/prompts";
+ * import { SimpleSequentialChain, LLMChain } from "langchain-gpt4all/chains";
+ * import { OpenAI } from "langchain-gpt4all/llms/openai";
+ * import { PromptTemplate } from "langchain-gpt4all/prompts";
*
* // This is an LLMChain to write a synopsis given a title of a play.
* const llm = new OpenAI({ temperature: 0 });
diff --git a/langchain/src/chains/serde.ts b/langchain-gpt4all/src/chains/serde.ts
similarity index 100%
rename from langchain/src/chains/serde.ts
rename to langchain-gpt4all/src/chains/serde.ts
diff --git a/langchain/src/chains/sql_db/sql_db_chain.ts b/langchain-gpt4all/src/chains/sql_db/sql_db_chain.ts
similarity index 100%
rename from langchain/src/chains/sql_db/sql_db_chain.ts
rename to langchain-gpt4all/src/chains/sql_db/sql_db_chain.ts
diff --git a/langchain/src/chains/sql_db/sql_db_prompt.ts b/langchain-gpt4all/src/chains/sql_db/sql_db_prompt.ts
similarity index 100%
rename from langchain/src/chains/sql_db/sql_db_prompt.ts
rename to langchain-gpt4all/src/chains/sql_db/sql_db_prompt.ts
diff --git a/langchain/src/chains/summarization/load.ts b/langchain-gpt4all/src/chains/summarization/load.ts
similarity index 100%
rename from langchain/src/chains/summarization/load.ts
rename to langchain-gpt4all/src/chains/summarization/load.ts
diff --git a/langchain/src/chains/summarization/refine_prompts.ts b/langchain-gpt4all/src/chains/summarization/refine_prompts.ts
similarity index 100%
rename from langchain/src/chains/summarization/refine_prompts.ts
rename to langchain-gpt4all/src/chains/summarization/refine_prompts.ts
diff --git a/langchain/src/chains/summarization/stuff_prompts.ts b/langchain-gpt4all/src/chains/summarization/stuff_prompts.ts
similarity index 100%
rename from langchain/src/chains/summarization/stuff_prompts.ts
rename to langchain-gpt4all/src/chains/summarization/stuff_prompts.ts
diff --git a/langchain/src/chains/summarization/tests/load.int.test.ts b/langchain-gpt4all/src/chains/summarization/tests/load.int.test.ts
similarity index 100%
rename from langchain/src/chains/summarization/tests/load.int.test.ts
rename to langchain-gpt4all/src/chains/summarization/tests/load.int.test.ts
diff --git a/langchain/src/chains/tests/chat_vector_db_qa_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/chat_vector_db_qa_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/chat_vector_db_qa_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/chat_vector_db_qa_chain.int.test.ts
diff --git a/langchain/src/chains/tests/combine_docs_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/combine_docs_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/combine_docs_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/combine_docs_chain.int.test.ts
diff --git a/langchain/src/chains/tests/combine_docs_chain.test.ts b/langchain-gpt4all/src/chains/tests/combine_docs_chain.test.ts
similarity index 100%
rename from langchain/src/chains/tests/combine_docs_chain.test.ts
rename to langchain-gpt4all/src/chains/tests/combine_docs_chain.test.ts
diff --git a/langchain/src/chains/tests/constitutional_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/constitutional_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/constitutional_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/constitutional_chain.int.test.ts
diff --git a/langchain/src/chains/tests/constitutional_chain.test.ts b/langchain-gpt4all/src/chains/tests/constitutional_chain.test.ts
similarity index 100%
rename from langchain/src/chains/tests/constitutional_chain.test.ts
rename to langchain-gpt4all/src/chains/tests/constitutional_chain.test.ts
diff --git a/langchain/src/chains/tests/conversation_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/conversation_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/conversation_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/conversation_chain.int.test.ts
diff --git a/langchain/src/chains/tests/llm_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/llm_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/llm_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/llm_chain.int.test.ts
diff --git a/langchain/src/chains/tests/openai_moderation.int.test.ts b/langchain-gpt4all/src/chains/tests/openai_moderation.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/openai_moderation.int.test.ts
rename to langchain-gpt4all/src/chains/tests/openai_moderation.int.test.ts
diff --git a/langchain/src/chains/tests/sequential_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/sequential_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/sequential_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/sequential_chain.int.test.ts
diff --git a/langchain/src/chains/tests/sequential_chain.test.ts b/langchain-gpt4all/src/chains/tests/sequential_chain.test.ts
similarity index 100%
rename from langchain/src/chains/tests/sequential_chain.test.ts
rename to langchain-gpt4all/src/chains/tests/sequential_chain.test.ts
diff --git a/langchain/src/chains/tests/simple_sequential_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/simple_sequential_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/simple_sequential_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/simple_sequential_chain.int.test.ts
diff --git a/langchain/src/chains/tests/simple_sequential_chain.test.ts b/langchain-gpt4all/src/chains/tests/simple_sequential_chain.test.ts
similarity index 100%
rename from langchain/src/chains/tests/simple_sequential_chain.test.ts
rename to langchain-gpt4all/src/chains/tests/simple_sequential_chain.test.ts
diff --git a/langchain/src/chains/tests/sql_db_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/sql_db_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/sql_db_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/sql_db_chain.int.test.ts
diff --git a/langchain/src/chains/tests/vector_db_qa_chain.int.test.ts b/langchain-gpt4all/src/chains/tests/vector_db_qa_chain.int.test.ts
similarity index 100%
rename from langchain/src/chains/tests/vector_db_qa_chain.int.test.ts
rename to langchain-gpt4all/src/chains/tests/vector_db_qa_chain.int.test.ts
diff --git a/langchain/src/chains/vector_db_qa.ts b/langchain-gpt4all/src/chains/vector_db_qa.ts
similarity index 100%
rename from langchain/src/chains/vector_db_qa.ts
rename to langchain-gpt4all/src/chains/vector_db_qa.ts
diff --git a/langchain/src/chat_models/anthropic.ts b/langchain-gpt4all/src/chat_models/anthropic.ts
similarity index 100%
rename from langchain/src/chat_models/anthropic.ts
rename to langchain-gpt4all/src/chat_models/anthropic.ts
diff --git a/langchain/src/chat_models/base.ts b/langchain-gpt4all/src/chat_models/base.ts
similarity index 100%
rename from langchain/src/chat_models/base.ts
rename to langchain-gpt4all/src/chat_models/base.ts
diff --git a/langchain-gpt4all/src/chat_models/index.ts b/langchain-gpt4all/src/chat_models/index.ts
new file mode 100644
index 000000000000..b4de88e06e08
--- /dev/null
+++ b/langchain-gpt4all/src/chat_models/index.ts
@@ -0,0 +1,7 @@
+/* #__PURE__ */ console.error(
+ "[WARN] Importing from 'langchain-gpt4all/chat_models' is deprecated. Import from eg. 'langchain-gpt4all/chat_models/openai' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+);
+
+export { BaseChatModel, BaseChatModelParams, SimpleChatModel } from "./base.js";
+export { ChatOpenAI } from "./openai.js";
+export { ChatAnthropic } from "./anthropic.js";
diff --git a/langchain/src/chat_models/openai.ts b/langchain-gpt4all/src/chat_models/openai.ts
similarity index 100%
rename from langchain/src/chat_models/openai.ts
rename to langchain-gpt4all/src/chat_models/openai.ts
diff --git a/langchain/src/chat_models/tests/chatanthropic.int.test.ts b/langchain-gpt4all/src/chat_models/tests/chatanthropic.int.test.ts
similarity index 100%
rename from langchain/src/chat_models/tests/chatanthropic.int.test.ts
rename to langchain-gpt4all/src/chat_models/tests/chatanthropic.int.test.ts
diff --git a/langchain/src/chat_models/tests/chatopenai.int.test.ts b/langchain-gpt4all/src/chat_models/tests/chatopenai.int.test.ts
similarity index 100%
rename from langchain/src/chat_models/tests/chatopenai.int.test.ts
rename to langchain-gpt4all/src/chat_models/tests/chatopenai.int.test.ts
diff --git a/langchain/src/docstore/base.ts b/langchain-gpt4all/src/docstore/base.ts
similarity index 100%
rename from langchain/src/docstore/base.ts
rename to langchain-gpt4all/src/docstore/base.ts
diff --git a/langchain/src/docstore/in_memory.ts b/langchain-gpt4all/src/docstore/in_memory.ts
similarity index 100%
rename from langchain/src/docstore/in_memory.ts
rename to langchain-gpt4all/src/docstore/in_memory.ts
diff --git a/langchain/src/docstore/index.ts b/langchain-gpt4all/src/docstore/index.ts
similarity index 100%
rename from langchain/src/docstore/index.ts
rename to langchain-gpt4all/src/docstore/index.ts
diff --git a/langchain/src/document.ts b/langchain-gpt4all/src/document.ts
similarity index 100%
rename from langchain/src/document.ts
rename to langchain-gpt4all/src/document.ts
diff --git a/langchain/src/document_loaders/base.ts b/langchain-gpt4all/src/document_loaders/base.ts
similarity index 100%
rename from langchain/src/document_loaders/base.ts
rename to langchain-gpt4all/src/document_loaders/base.ts
diff --git a/langchain/src/document_loaders/fs/buffer.ts b/langchain-gpt4all/src/document_loaders/fs/buffer.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/buffer.ts
rename to langchain-gpt4all/src/document_loaders/fs/buffer.ts
diff --git a/langchain/src/document_loaders/fs/csv.ts b/langchain-gpt4all/src/document_loaders/fs/csv.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/csv.ts
rename to langchain-gpt4all/src/document_loaders/fs/csv.ts
diff --git a/langchain/src/document_loaders/fs/directory.ts b/langchain-gpt4all/src/document_loaders/fs/directory.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/directory.ts
rename to langchain-gpt4all/src/document_loaders/fs/directory.ts
diff --git a/langchain/src/document_loaders/fs/docx.ts b/langchain-gpt4all/src/document_loaders/fs/docx.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/docx.ts
rename to langchain-gpt4all/src/document_loaders/fs/docx.ts
diff --git a/langchain/src/document_loaders/fs/epub.ts b/langchain-gpt4all/src/document_loaders/fs/epub.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/epub.ts
rename to langchain-gpt4all/src/document_loaders/fs/epub.ts
diff --git a/langchain/src/document_loaders/fs/json.ts b/langchain-gpt4all/src/document_loaders/fs/json.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/json.ts
rename to langchain-gpt4all/src/document_loaders/fs/json.ts
diff --git a/langchain/src/document_loaders/fs/notion.ts b/langchain-gpt4all/src/document_loaders/fs/notion.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/notion.ts
rename to langchain-gpt4all/src/document_loaders/fs/notion.ts
diff --git a/langchain/src/document_loaders/fs/pdf.ts b/langchain-gpt4all/src/document_loaders/fs/pdf.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/pdf.ts
rename to langchain-gpt4all/src/document_loaders/fs/pdf.ts
diff --git a/langchain/src/document_loaders/fs/srt.ts b/langchain-gpt4all/src/document_loaders/fs/srt.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/srt.ts
rename to langchain-gpt4all/src/document_loaders/fs/srt.ts
diff --git a/langchain/src/document_loaders/fs/text.ts b/langchain-gpt4all/src/document_loaders/fs/text.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/text.ts
rename to langchain-gpt4all/src/document_loaders/fs/text.ts
diff --git a/langchain/src/document_loaders/fs/unstructured.ts b/langchain-gpt4all/src/document_loaders/fs/unstructured.ts
similarity index 100%
rename from langchain/src/document_loaders/fs/unstructured.ts
rename to langchain-gpt4all/src/document_loaders/fs/unstructured.ts
diff --git a/langchain/src/document_loaders/index.ts b/langchain-gpt4all/src/document_loaders/index.ts
similarity index 77%
rename from langchain/src/document_loaders/index.ts
rename to langchain-gpt4all/src/document_loaders/index.ts
index 9364b1575a04..3cf097be3684 100644
--- a/langchain/src/document_loaders/index.ts
+++ b/langchain-gpt4all/src/document_loaders/index.ts
@@ -1,5 +1,5 @@
/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/document_loaders' is deprecated. Import from eg. 'langchain/document_loaders/fs/text' or 'langchain/document_loaders/web/cheerio' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+ "[WARN] Importing from 'langchain-gpt4all/document_loaders' is deprecated. Import from eg. 'langchain-gpt4all/document_loaders/fs/text' or 'langchain-gpt4all/document_loaders/web/cheerio' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
);
export type { DocumentLoader } from "./base.js";
diff --git a/langchain/src/document_loaders/tests/cheerio.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/cheerio.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/cheerio.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/cheerio.int.test.ts
diff --git a/langchain/src/document_loaders/tests/college_confidential.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/college_confidential.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/college_confidential.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/college_confidential.int.test.ts
diff --git a/langchain/src/document_loaders/tests/confluence.test.ts b/langchain-gpt4all/src/document_loaders/tests/confluence.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/confluence.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/confluence.test.ts
diff --git a/langchain/src/document_loaders/tests/csv-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/csv-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/csv-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/csv-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/csv.test.ts b/langchain-gpt4all/src/document_loaders/tests/csv.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/csv.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/csv.test.ts
diff --git a/langchain/src/document_loaders/tests/directory.test.ts b/langchain-gpt4all/src/document_loaders/tests/directory.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/directory.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/directory.test.ts
diff --git a/langchain/src/document_loaders/tests/docx.test.ts b/langchain-gpt4all/src/document_loaders/tests/docx.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/docx.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/docx.test.ts
diff --git a/langchain/src/document_loaders/tests/epub.test.ts b/langchain-gpt4all/src/document_loaders/tests/epub.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/epub.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/epub.test.ts
diff --git a/langchain/src/document_loaders/tests/example_data/1706.03762.pdf b/langchain-gpt4all/src/document_loaders/tests/example_data/1706.03762.pdf
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/1706.03762.pdf
rename to langchain-gpt4all/src/document_loaders/tests/example_data/1706.03762.pdf
diff --git a/langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.csv b/langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.csv
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.csv
rename to langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.csv
diff --git a/langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.json b/langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.json
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.json
rename to langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.json
diff --git a/langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.jsonl b/langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.jsonl
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.jsonl
rename to langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.jsonl
diff --git a/langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt b/langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt
rename to langchain-gpt4all/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt
diff --git a/langchain/src/document_loaders/tests/example_data/attention.docx b/langchain-gpt4all/src/document_loaders/tests/example_data/attention.docx
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/attention.docx
rename to langchain-gpt4all/src/document_loaders/tests/example_data/attention.docx
diff --git a/langchain/src/document_loaders/tests/example_data/attention.epub b/langchain-gpt4all/src/document_loaders/tests/example_data/attention.epub
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/attention.epub
rename to langchain-gpt4all/src/document_loaders/tests/example_data/attention.epub
diff --git a/langchain/src/document_loaders/tests/example_data/complex.json b/langchain-gpt4all/src/document_loaders/tests/example_data/complex.json
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/complex.json
rename to langchain-gpt4all/src/document_loaders/tests/example_data/complex.json
diff --git a/langchain/src/document_loaders/tests/example_data/example.txt b/langchain-gpt4all/src/document_loaders/tests/example_data/example.txt
similarity index 100%
rename from langchain/src/document_loaders/tests/example_data/example.txt
rename to langchain-gpt4all/src/document_loaders/tests/example_data/example.txt
diff --git a/langchain/src/document_loaders/tests/example_data/notion.md b/langchain-gpt4all/src/document_loaders/tests/example_data/notion.md
similarity index 71%
rename from langchain/src/document_loaders/tests/example_data/notion.md
rename to langchain-gpt4all/src/document_loaders/tests/example_data/notion.md
index 28d65d3efd0b..3394700689c6 100644
--- a/langchain/src/document_loaders/tests/example_data/notion.md
+++ b/langchain-gpt4all/src/document_loaders/tests/example_data/notion.md
@@ -9,10 +9,10 @@ Please fill out [this form](https://forms.gle/57d8AmXBYp8PP8tZA) and we'll set u
## Quick Install
-`yarn add langchain`
+`yarn add langchain-gpt4all`
```typescript
-import { OpenAI } from "langchain/llms/openai";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
```
## 🤔 What is this?
@@ -26,13 +26,13 @@ This library is aimed at assisting in the development of those types of applicat
## Relationship with Python LangChain
-This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
+This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/hwchase17/langchain-gpt4all). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
-The [LangChainHub](https://github.com/hwchase17/langchain-hub) is a central place for the serialized versions of these prompts, chains, and agents.
+The [LangChainHub](https://github.com/hwchase17/langchain-gpt4all-hub) is a central place for the serialized versions of these prompts, chains, and agents.
## 📖 Documentation
-For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs/docs/overview).
+For full documentation of prompts, chains, agents and more, please see [here](https://hwchase17.github.io/langchainjs-gpt4all/docs/overview).
## 💁 Contributing
diff --git a/langchain/src/document_loaders/tests/github.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/github.int.test.ts
similarity index 84%
rename from langchain/src/document_loaders/tests/github.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/github.int.test.ts
index ae6a17adf13c..3a661fbbfaa5 100644
--- a/langchain/src/document_loaders/tests/github.int.test.ts
+++ b/langchain-gpt4all/src/document_loaders/tests/github.int.test.ts
@@ -3,7 +3,7 @@ import { GithubRepoLoader } from "../web/github.js";
test("Test GithubRepoLoader", async () => {
const loader = new GithubRepoLoader(
- "https://github.com/hwchase17/langchainjs",
+ "https://github.com/lucasjohnston/langchainjs-gpt4all",
{ branch: "main", recursive: false, unknown: "warn" }
);
const documents = await loader.load();
diff --git a/langchain/src/document_loaders/tests/hn.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/hn.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/hn.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/hn.int.test.ts
diff --git a/langchain/src/document_loaders/tests/imsdb.test.ts b/langchain-gpt4all/src/document_loaders/tests/imsdb.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/imsdb.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/imsdb.test.ts
diff --git a/langchain/src/document_loaders/tests/json-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/json-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/json-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/json-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/json.test.ts b/langchain-gpt4all/src/document_loaders/tests/json.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/json.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/json.test.ts
diff --git a/langchain/src/document_loaders/tests/jsonl-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/jsonl-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/jsonl-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/jsonl-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/jsonl.test.ts b/langchain-gpt4all/src/document_loaders/tests/jsonl.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/jsonl.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/jsonl.test.ts
diff --git a/langchain/src/document_loaders/tests/notion.test.ts b/langchain-gpt4all/src/document_loaders/tests/notion.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/notion.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/notion.test.ts
diff --git a/langchain/src/document_loaders/tests/pdf-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/pdf-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/pdf-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/pdf-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/pdf.test.ts b/langchain-gpt4all/src/document_loaders/tests/pdf.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/pdf.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/pdf.test.ts
diff --git a/langchain/src/document_loaders/tests/playwright_web.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/playwright_web.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/playwright_web.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/playwright_web.int.test.ts
diff --git a/langchain/src/document_loaders/tests/puppeteer.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/puppeteer.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/puppeteer.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/puppeteer.int.test.ts
diff --git a/langchain/src/document_loaders/tests/s3.test.ts b/langchain-gpt4all/src/document_loaders/tests/s3.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/s3.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/s3.test.ts
diff --git a/langchain/src/document_loaders/tests/srt-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/srt-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/srt-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/srt-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/srt.test.ts b/langchain-gpt4all/src/document_loaders/tests/srt.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/srt.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/srt.test.ts
diff --git a/langchain/src/document_loaders/tests/text-blob.test.ts b/langchain-gpt4all/src/document_loaders/tests/text-blob.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/text-blob.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/text-blob.test.ts
diff --git a/langchain/src/document_loaders/tests/text.test.ts b/langchain-gpt4all/src/document_loaders/tests/text.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/text.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/text.test.ts
diff --git a/langchain/src/document_loaders/tests/unstructured.int.test.ts b/langchain-gpt4all/src/document_loaders/tests/unstructured.int.test.ts
similarity index 100%
rename from langchain/src/document_loaders/tests/unstructured.int.test.ts
rename to langchain-gpt4all/src/document_loaders/tests/unstructured.int.test.ts
diff --git a/langchain/src/document_loaders/web/cheerio.ts b/langchain-gpt4all/src/document_loaders/web/cheerio.ts
similarity index 100%
rename from langchain/src/document_loaders/web/cheerio.ts
rename to langchain-gpt4all/src/document_loaders/web/cheerio.ts
diff --git a/langchain/src/document_loaders/web/college_confidential.ts b/langchain-gpt4all/src/document_loaders/web/college_confidential.ts
similarity index 100%
rename from langchain/src/document_loaders/web/college_confidential.ts
rename to langchain-gpt4all/src/document_loaders/web/college_confidential.ts
diff --git a/langchain/src/document_loaders/web/confluence.ts b/langchain-gpt4all/src/document_loaders/web/confluence.ts
similarity index 98%
rename from langchain/src/document_loaders/web/confluence.ts
rename to langchain-gpt4all/src/document_loaders/web/confluence.ts
index d618b188e64a..a69104180950 100644
--- a/langchain/src/document_loaders/web/confluence.ts
+++ b/langchain-gpt4all/src/document_loaders/web/confluence.ts
@@ -116,7 +116,7 @@ export class ConfluencePagesLoader extends BaseDocumentLoader {
// Generate the URL
const pageUrl = `${this.baseUrl}/spaces/${this.spaceKey}/pages/${page.id}`;
- // Return a langchain document
+ // Return a langchain-gpt4all document
return new Document({
pageContent: textWithoutEmptyLines,
metadata: {
diff --git a/langchain/src/document_loaders/web/gitbook.ts b/langchain-gpt4all/src/document_loaders/web/gitbook.ts
similarity index 100%
rename from langchain/src/document_loaders/web/gitbook.ts
rename to langchain-gpt4all/src/document_loaders/web/gitbook.ts
diff --git a/langchain/src/document_loaders/web/github.ts b/langchain-gpt4all/src/document_loaders/web/github.ts
similarity index 100%
rename from langchain/src/document_loaders/web/github.ts
rename to langchain-gpt4all/src/document_loaders/web/github.ts
diff --git a/langchain/src/document_loaders/web/hn.ts b/langchain-gpt4all/src/document_loaders/web/hn.ts
similarity index 100%
rename from langchain/src/document_loaders/web/hn.ts
rename to langchain-gpt4all/src/document_loaders/web/hn.ts
diff --git a/langchain/src/document_loaders/web/imsdb.ts b/langchain-gpt4all/src/document_loaders/web/imsdb.ts
similarity index 100%
rename from langchain/src/document_loaders/web/imsdb.ts
rename to langchain-gpt4all/src/document_loaders/web/imsdb.ts
diff --git a/langchain/src/document_loaders/web/playwright.ts b/langchain-gpt4all/src/document_loaders/web/playwright.ts
similarity index 100%
rename from langchain/src/document_loaders/web/playwright.ts
rename to langchain-gpt4all/src/document_loaders/web/playwright.ts
diff --git a/langchain/src/document_loaders/web/puppeteer.ts b/langchain-gpt4all/src/document_loaders/web/puppeteer.ts
similarity index 100%
rename from langchain/src/document_loaders/web/puppeteer.ts
rename to langchain-gpt4all/src/document_loaders/web/puppeteer.ts
diff --git a/langchain/src/document_loaders/web/s3.ts b/langchain-gpt4all/src/document_loaders/web/s3.ts
similarity index 100%
rename from langchain/src/document_loaders/web/s3.ts
rename to langchain-gpt4all/src/document_loaders/web/s3.ts
diff --git a/langchain/src/embeddings/base.ts b/langchain-gpt4all/src/embeddings/base.ts
similarity index 100%
rename from langchain/src/embeddings/base.ts
rename to langchain-gpt4all/src/embeddings/base.ts
diff --git a/langchain/src/embeddings/cohere.ts b/langchain-gpt4all/src/embeddings/cohere.ts
similarity index 100%
rename from langchain/src/embeddings/cohere.ts
rename to langchain-gpt4all/src/embeddings/cohere.ts
diff --git a/langchain/src/embeddings/fake.ts b/langchain-gpt4all/src/embeddings/fake.ts
similarity index 100%
rename from langchain/src/embeddings/fake.ts
rename to langchain-gpt4all/src/embeddings/fake.ts
diff --git a/langchain/src/embeddings/hf.ts b/langchain-gpt4all/src/embeddings/hf.ts
similarity index 100%
rename from langchain/src/embeddings/hf.ts
rename to langchain-gpt4all/src/embeddings/hf.ts
diff --git a/langchain-gpt4all/src/embeddings/index.ts b/langchain-gpt4all/src/embeddings/index.ts
new file mode 100644
index 000000000000..7e768ad88edc
--- /dev/null
+++ b/langchain-gpt4all/src/embeddings/index.ts
@@ -0,0 +1,8 @@
+/* #__PURE__ */ console.error(
+ "[WARN] Importing from 'langchain-gpt4all/embeddings' is deprecated. Import from eg. 'langchain-gpt4all/embeddings/openai' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+);
+
+export { OpenAIEmbeddings } from "./openai.js";
+export { CohereEmbeddings } from "./cohere.js";
+export { Embeddings } from "./base.js";
+export { FakeEmbeddings } from "./fake.js";
diff --git a/langchain/src/embeddings/openai.ts b/langchain-gpt4all/src/embeddings/openai.ts
similarity index 100%
rename from langchain/src/embeddings/openai.ts
rename to langchain-gpt4all/src/embeddings/openai.ts
diff --git a/langchain/src/embeddings/tensorflow.ts b/langchain-gpt4all/src/embeddings/tensorflow.ts
similarity index 100%
rename from langchain/src/embeddings/tensorflow.ts
rename to langchain-gpt4all/src/embeddings/tensorflow.ts
diff --git a/langchain/src/embeddings/tests/cohere.int.test.ts b/langchain-gpt4all/src/embeddings/tests/cohere.int.test.ts
similarity index 100%
rename from langchain/src/embeddings/tests/cohere.int.test.ts
rename to langchain-gpt4all/src/embeddings/tests/cohere.int.test.ts
diff --git a/langchain/src/embeddings/tests/hf.int.test.ts b/langchain-gpt4all/src/embeddings/tests/hf.int.test.ts
similarity index 100%
rename from langchain/src/embeddings/tests/hf.int.test.ts
rename to langchain-gpt4all/src/embeddings/tests/hf.int.test.ts
diff --git a/langchain/src/embeddings/tests/openai.int.test.ts b/langchain-gpt4all/src/embeddings/tests/openai.int.test.ts
similarity index 100%
rename from langchain/src/embeddings/tests/openai.int.test.ts
rename to langchain-gpt4all/src/embeddings/tests/openai.int.test.ts
diff --git a/langchain/src/embeddings/tests/tensorflow.int.test.ts b/langchain-gpt4all/src/embeddings/tests/tensorflow.int.test.ts
similarity index 100%
rename from langchain/src/embeddings/tests/tensorflow.int.test.ts
rename to langchain-gpt4all/src/embeddings/tests/tensorflow.int.test.ts
diff --git a/langchain/src/experimental/autogpt/agent.ts b/langchain-gpt4all/src/experimental/autogpt/agent.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/agent.ts
rename to langchain-gpt4all/src/experimental/autogpt/agent.ts
diff --git a/langchain/src/experimental/autogpt/index.ts b/langchain-gpt4all/src/experimental/autogpt/index.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/index.ts
rename to langchain-gpt4all/src/experimental/autogpt/index.ts
diff --git a/langchain/src/experimental/autogpt/output_parser.ts b/langchain-gpt4all/src/experimental/autogpt/output_parser.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/output_parser.ts
rename to langchain-gpt4all/src/experimental/autogpt/output_parser.ts
diff --git a/langchain/src/experimental/autogpt/prompt.ts b/langchain-gpt4all/src/experimental/autogpt/prompt.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/prompt.ts
rename to langchain-gpt4all/src/experimental/autogpt/prompt.ts
diff --git a/langchain/src/experimental/autogpt/prompt_generator.ts b/langchain-gpt4all/src/experimental/autogpt/prompt_generator.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/prompt_generator.ts
rename to langchain-gpt4all/src/experimental/autogpt/prompt_generator.ts
diff --git a/langchain/src/experimental/autogpt/schema.ts b/langchain-gpt4all/src/experimental/autogpt/schema.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/schema.ts
rename to langchain-gpt4all/src/experimental/autogpt/schema.ts
diff --git a/langchain/src/experimental/autogpt/tests/prompt_generator.test.ts b/langchain-gpt4all/src/experimental/autogpt/tests/prompt_generator.test.ts
similarity index 100%
rename from langchain/src/experimental/autogpt/tests/prompt_generator.test.ts
rename to langchain-gpt4all/src/experimental/autogpt/tests/prompt_generator.test.ts
diff --git a/langchain/src/experimental/babyagi/agent.ts b/langchain-gpt4all/src/experimental/babyagi/agent.ts
similarity index 100%
rename from langchain/src/experimental/babyagi/agent.ts
rename to langchain-gpt4all/src/experimental/babyagi/agent.ts
diff --git a/langchain/src/experimental/babyagi/index.ts b/langchain-gpt4all/src/experimental/babyagi/index.ts
similarity index 100%
rename from langchain/src/experimental/babyagi/index.ts
rename to langchain-gpt4all/src/experimental/babyagi/index.ts
diff --git a/langchain/src/experimental/babyagi/task_creation.ts b/langchain-gpt4all/src/experimental/babyagi/task_creation.ts
similarity index 100%
rename from langchain/src/experimental/babyagi/task_creation.ts
rename to langchain-gpt4all/src/experimental/babyagi/task_creation.ts
diff --git a/langchain/src/experimental/babyagi/task_execution.ts b/langchain-gpt4all/src/experimental/babyagi/task_execution.ts
similarity index 100%
rename from langchain/src/experimental/babyagi/task_execution.ts
rename to langchain-gpt4all/src/experimental/babyagi/task_execution.ts
diff --git a/langchain/src/experimental/babyagi/task_prioritization.ts b/langchain-gpt4all/src/experimental/babyagi/task_prioritization.ts
similarity index 100%
rename from langchain/src/experimental/babyagi/task_prioritization.ts
rename to langchain-gpt4all/src/experimental/babyagi/task_prioritization.ts
diff --git a/langchain/src/index.ts b/langchain-gpt4all/src/index.ts
similarity index 57%
rename from langchain/src/index.ts
rename to langchain-gpt4all/src/index.ts
index 179b828e6b38..6e89d20fc6e8 100644
--- a/langchain/src/index.ts
+++ b/langchain-gpt4all/src/index.ts
@@ -1,5 +1,5 @@
/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain' is deprecated. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+ "[WARN] Importing from 'langchain-gpt4all' is deprecated. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
);
export {
diff --git a/langchain/src/llms/base.ts b/langchain-gpt4all/src/llms/base.ts
similarity index 100%
rename from langchain/src/llms/base.ts
rename to langchain-gpt4all/src/llms/base.ts
diff --git a/langchain/src/llms/cohere.ts b/langchain-gpt4all/src/llms/cohere.ts
similarity index 100%
rename from langchain/src/llms/cohere.ts
rename to langchain-gpt4all/src/llms/cohere.ts
diff --git a/langchain/src/llms/gpt4all.ts b/langchain-gpt4all/src/llms/gpt4all.ts
similarity index 100%
rename from langchain/src/llms/gpt4all.ts
rename to langchain-gpt4all/src/llms/gpt4all.ts
diff --git a/langchain/src/llms/hf.ts b/langchain-gpt4all/src/llms/hf.ts
similarity index 100%
rename from langchain/src/llms/hf.ts
rename to langchain-gpt4all/src/llms/hf.ts
diff --git a/langchain/src/llms/index.ts b/langchain-gpt4all/src/llms/index.ts
similarity index 61%
rename from langchain/src/llms/index.ts
rename to langchain-gpt4all/src/llms/index.ts
index 92cfe093de30..cd7dcd0ce92f 100644
--- a/langchain/src/llms/index.ts
+++ b/langchain-gpt4all/src/llms/index.ts
@@ -1,5 +1,5 @@
/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/llms' is deprecated. Import from eg. 'langchain/llms/openai' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+ "[WARN] Importing from 'langchain-gpt4all/llms' is deprecated. Import from eg. 'langchain-gpt4all/llms/openai' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
);
export { BaseLLM, BaseLLMParams, LLM, SerializedLLM } from "./base.js";
diff --git a/langchain/src/llms/load.ts b/langchain-gpt4all/src/llms/load.ts
similarity index 90%
rename from langchain/src/llms/load.ts
rename to langchain-gpt4all/src/llms/load.ts
index be95ee9cf864..bcbe79121fb9 100644
--- a/langchain/src/llms/load.ts
+++ b/langchain-gpt4all/src/llms/load.ts
@@ -7,7 +7,7 @@ import { parseFileConfig } from "../util/parse.js";
*
* @example
* ```ts
- * import { loadLLM } from "langchain/llms/load";
+ * import { loadLLM } from "langchain-gpt4all/llms/load";
* const model = await loadLLM("/path/to/llm.json");
* ```
*/
diff --git a/langchain/src/llms/openai-chat.ts b/langchain-gpt4all/src/llms/openai-chat.ts
similarity index 100%
rename from langchain/src/llms/openai-chat.ts
rename to langchain-gpt4all/src/llms/openai-chat.ts
diff --git a/langchain/src/llms/openai.ts b/langchain-gpt4all/src/llms/openai.ts
similarity index 99%
rename from langchain/src/llms/openai.ts
rename to langchain-gpt4all/src/llms/openai.ts
index e226ba8b7d0c..69db1261751b 100644
--- a/langchain/src/llms/openai.ts
+++ b/langchain-gpt4all/src/llms/openai.ts
@@ -244,7 +244,7 @@ export class OpenAI extends BaseLLM implements OpenAIInput, AzureOpenAIInput {
*
* @example
* ```ts
- * import { OpenAI } from "langchain/llms/openai";
+ * import { OpenAI } from "langchain-gpt4all/llms/openai";
* const openai = new OpenAI();
* const response = await openai.generate(["Tell me a joke."]);
* ```
diff --git a/langchain/src/llms/replicate.ts b/langchain-gpt4all/src/llms/replicate.ts
similarity index 97%
rename from langchain/src/llms/replicate.ts
rename to langchain-gpt4all/src/llms/replicate.ts
index b2ef79e9be35..c67b161ce456 100644
--- a/langchain/src/llms/replicate.ts
+++ b/langchain-gpt4all/src/llms/replicate.ts
@@ -45,7 +45,7 @@ export class Replicate extends LLM implements ReplicateInput {
const imports = await Replicate.imports();
const replicate = new imports.Replicate({
- userAgent: "langchain",
+ userAgent: "langchain-gpt4all",
auth: this.apiKey,
});
diff --git a/langchain/src/llms/tests/cohere.int.test.ts b/langchain-gpt4all/src/llms/tests/cohere.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/cohere.int.test.ts
rename to langchain-gpt4all/src/llms/tests/cohere.int.test.ts
diff --git a/langchain/src/llms/tests/gpt4all.int.test.ts b/langchain-gpt4all/src/llms/tests/gpt4all.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/gpt4all.int.test.ts
rename to langchain-gpt4all/src/llms/tests/gpt4all.int.test.ts
diff --git a/langchain/src/llms/tests/huggingface_hub.int.test.ts b/langchain-gpt4all/src/llms/tests/huggingface_hub.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/huggingface_hub.int.test.ts
rename to langchain-gpt4all/src/llms/tests/huggingface_hub.int.test.ts
diff --git a/langchain/src/llms/tests/openai-chat.int.test.ts b/langchain-gpt4all/src/llms/tests/openai-chat.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/openai-chat.int.test.ts
rename to langchain-gpt4all/src/llms/tests/openai-chat.int.test.ts
diff --git a/langchain/src/llms/tests/openai.int.test.ts b/langchain-gpt4all/src/llms/tests/openai.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/openai.int.test.ts
rename to langchain-gpt4all/src/llms/tests/openai.int.test.ts
diff --git a/langchain/src/llms/tests/replicate.int.test.ts b/langchain-gpt4all/src/llms/tests/replicate.int.test.ts
similarity index 100%
rename from langchain/src/llms/tests/replicate.int.test.ts
rename to langchain-gpt4all/src/llms/tests/replicate.int.test.ts
diff --git a/langchain/src/memory/base.ts b/langchain-gpt4all/src/memory/base.ts
similarity index 100%
rename from langchain/src/memory/base.ts
rename to langchain-gpt4all/src/memory/base.ts
diff --git a/langchain/src/memory/buffer_memory.ts b/langchain-gpt4all/src/memory/buffer_memory.ts
similarity index 100%
rename from langchain/src/memory/buffer_memory.ts
rename to langchain-gpt4all/src/memory/buffer_memory.ts
diff --git a/langchain/src/memory/buffer_window_memory.ts b/langchain-gpt4all/src/memory/buffer_window_memory.ts
similarity index 100%
rename from langchain/src/memory/buffer_window_memory.ts
rename to langchain-gpt4all/src/memory/buffer_window_memory.ts
diff --git a/langchain/src/memory/chat_memory.ts b/langchain-gpt4all/src/memory/chat_memory.ts
similarity index 100%
rename from langchain/src/memory/chat_memory.ts
rename to langchain-gpt4all/src/memory/chat_memory.ts
diff --git a/langchain/src/memory/index.ts b/langchain-gpt4all/src/memory/index.ts
similarity index 100%
rename from langchain/src/memory/index.ts
rename to langchain-gpt4all/src/memory/index.ts
diff --git a/langchain/src/memory/motorhead_memory.ts b/langchain-gpt4all/src/memory/motorhead_memory.ts
similarity index 100%
rename from langchain/src/memory/motorhead_memory.ts
rename to langchain-gpt4all/src/memory/motorhead_memory.ts
diff --git a/langchain/src/memory/prompt.ts b/langchain-gpt4all/src/memory/prompt.ts
similarity index 100%
rename from langchain/src/memory/prompt.ts
rename to langchain-gpt4all/src/memory/prompt.ts
diff --git a/langchain/src/memory/summary.ts b/langchain-gpt4all/src/memory/summary.ts
similarity index 100%
rename from langchain/src/memory/summary.ts
rename to langchain-gpt4all/src/memory/summary.ts
diff --git a/langchain/src/memory/tests/buffer_memory.test.ts b/langchain-gpt4all/src/memory/tests/buffer_memory.test.ts
similarity index 100%
rename from langchain/src/memory/tests/buffer_memory.test.ts
rename to langchain-gpt4all/src/memory/tests/buffer_memory.test.ts
diff --git a/langchain/src/memory/tests/buffer_window_memory.test.ts b/langchain-gpt4all/src/memory/tests/buffer_window_memory.test.ts
similarity index 100%
rename from langchain/src/memory/tests/buffer_window_memory.test.ts
rename to langchain-gpt4all/src/memory/tests/buffer_window_memory.test.ts
diff --git a/langchain/src/memory/tests/motorhead_memory.test.ts b/langchain-gpt4all/src/memory/tests/motorhead_memory.test.ts
similarity index 100%
rename from langchain/src/memory/tests/motorhead_memory.test.ts
rename to langchain-gpt4all/src/memory/tests/motorhead_memory.test.ts
diff --git a/langchain/src/memory/tests/summary.int.test.ts b/langchain-gpt4all/src/memory/tests/summary.int.test.ts
similarity index 100%
rename from langchain/src/memory/tests/summary.int.test.ts
rename to langchain-gpt4all/src/memory/tests/summary.int.test.ts
diff --git a/langchain/src/memory/tests/vector_store_memory.int.test.ts b/langchain-gpt4all/src/memory/tests/vector_store_memory.int.test.ts
similarity index 100%
rename from langchain/src/memory/tests/vector_store_memory.int.test.ts
rename to langchain-gpt4all/src/memory/tests/vector_store_memory.int.test.ts
diff --git a/langchain/src/memory/vector_store.ts b/langchain-gpt4all/src/memory/vector_store.ts
similarity index 100%
rename from langchain/src/memory/vector_store.ts
rename to langchain-gpt4all/src/memory/vector_store.ts
diff --git a/langchain/src/output_parsers/combining.ts b/langchain-gpt4all/src/output_parsers/combining.ts
similarity index 100%
rename from langchain/src/output_parsers/combining.ts
rename to langchain-gpt4all/src/output_parsers/combining.ts
diff --git a/langchain/src/output_parsers/fix.ts b/langchain-gpt4all/src/output_parsers/fix.ts
similarity index 100%
rename from langchain/src/output_parsers/fix.ts
rename to langchain-gpt4all/src/output_parsers/fix.ts
diff --git a/langchain/src/output_parsers/index.ts b/langchain-gpt4all/src/output_parsers/index.ts
similarity index 100%
rename from langchain/src/output_parsers/index.ts
rename to langchain-gpt4all/src/output_parsers/index.ts
diff --git a/langchain/src/output_parsers/list.ts b/langchain-gpt4all/src/output_parsers/list.ts
similarity index 100%
rename from langchain/src/output_parsers/list.ts
rename to langchain-gpt4all/src/output_parsers/list.ts
diff --git a/langchain/src/output_parsers/prompts.ts b/langchain-gpt4all/src/output_parsers/prompts.ts
similarity index 100%
rename from langchain/src/output_parsers/prompts.ts
rename to langchain-gpt4all/src/output_parsers/prompts.ts
diff --git a/langchain/src/output_parsers/regex.ts b/langchain-gpt4all/src/output_parsers/regex.ts
similarity index 100%
rename from langchain/src/output_parsers/regex.ts
rename to langchain-gpt4all/src/output_parsers/regex.ts
diff --git a/langchain/src/output_parsers/router.ts b/langchain-gpt4all/src/output_parsers/router.ts
similarity index 100%
rename from langchain/src/output_parsers/router.ts
rename to langchain-gpt4all/src/output_parsers/router.ts
diff --git a/langchain/src/output_parsers/structured.ts b/langchain-gpt4all/src/output_parsers/structured.ts
similarity index 100%
rename from langchain/src/output_parsers/structured.ts
rename to langchain-gpt4all/src/output_parsers/structured.ts
diff --git a/langchain/src/output_parsers/tests/combining.int.test.ts b/langchain-gpt4all/src/output_parsers/tests/combining.int.test.ts
similarity index 100%
rename from langchain/src/output_parsers/tests/combining.int.test.ts
rename to langchain-gpt4all/src/output_parsers/tests/combining.int.test.ts
diff --git a/langchain/src/output_parsers/tests/combining.test.ts b/langchain-gpt4all/src/output_parsers/tests/combining.test.ts
similarity index 100%
rename from langchain/src/output_parsers/tests/combining.test.ts
rename to langchain-gpt4all/src/output_parsers/tests/combining.test.ts
diff --git a/langchain/src/output_parsers/tests/list.test.ts b/langchain-gpt4all/src/output_parsers/tests/list.test.ts
similarity index 100%
rename from langchain/src/output_parsers/tests/list.test.ts
rename to langchain-gpt4all/src/output_parsers/tests/list.test.ts
diff --git a/langchain/src/output_parsers/tests/structured.int.test.ts b/langchain-gpt4all/src/output_parsers/tests/structured.int.test.ts
similarity index 100%
rename from langchain/src/output_parsers/tests/structured.int.test.ts
rename to langchain-gpt4all/src/output_parsers/tests/structured.int.test.ts
diff --git a/langchain/src/output_parsers/tests/structured.test.ts b/langchain-gpt4all/src/output_parsers/tests/structured.test.ts
similarity index 100%
rename from langchain/src/output_parsers/tests/structured.test.ts
rename to langchain-gpt4all/src/output_parsers/tests/structured.test.ts
diff --git a/langchain/src/prompts/base.ts b/langchain-gpt4all/src/prompts/base.ts
similarity index 100%
rename from langchain/src/prompts/base.ts
rename to langchain-gpt4all/src/prompts/base.ts
diff --git a/langchain/src/prompts/chat.ts b/langchain-gpt4all/src/prompts/chat.ts
similarity index 100%
rename from langchain/src/prompts/chat.ts
rename to langchain-gpt4all/src/prompts/chat.ts
diff --git a/langchain/src/prompts/few_shot.ts b/langchain-gpt4all/src/prompts/few_shot.ts
similarity index 100%
rename from langchain/src/prompts/few_shot.ts
rename to langchain-gpt4all/src/prompts/few_shot.ts
diff --git a/langchain/src/prompts/index.ts b/langchain-gpt4all/src/prompts/index.ts
similarity index 100%
rename from langchain/src/prompts/index.ts
rename to langchain-gpt4all/src/prompts/index.ts
diff --git a/langchain/src/prompts/load.ts b/langchain-gpt4all/src/prompts/load.ts
similarity index 84%
rename from langchain/src/prompts/load.ts
rename to langchain-gpt4all/src/prompts/load.ts
index f60b4c16ab92..086edf3f14fa 100644
--- a/langchain/src/prompts/load.ts
+++ b/langchain-gpt4all/src/prompts/load.ts
@@ -7,19 +7,19 @@ const loadPromptFromFile: FileLoader = (text, path) =>
BasePromptTemplate.deserialize(parseFileConfig(text, path));
/**
- * Load a prompt from {@link https://github.com/hwchase17/langchain-hub | LangchainHub} or local filesystem.
+ * Load a prompt from {@link https://github.com/hwchase17/langchain-gpt4all-hub | LangchainHub} or local filesystem.
*
* @example
* Loading from LangchainHub:
* ```ts
- * import { loadPrompt } from "langchain/prompts/load";
+ * import { loadPrompt } from "langchain-gpt4all/prompts/load";
* const prompt = await loadPrompt("lc://prompts/hello-world/prompt.yaml");
* ```
*
* @example
* Loading from local filesystem:
* ```ts
- * import { loadPrompt } from "langchain/prompts/load";
+ * import { loadPrompt } from "langchain-gpt4all/prompts/load";
* const prompt = await loadPrompt("/path/to/prompt.json");
* ```
*/
diff --git a/langchain/src/prompts/prompt.ts b/langchain-gpt4all/src/prompts/prompt.ts
similarity index 98%
rename from langchain/src/prompts/prompt.ts
rename to langchain-gpt4all/src/prompts/prompt.ts
index 846aae499f64..cc2dd4c4363e 100644
--- a/langchain/src/prompts/prompt.ts
+++ b/langchain-gpt4all/src/prompts/prompt.ts
@@ -40,7 +40,7 @@ export interface PromptTemplateInput extends BasePromptTemplateInput {
*
* @example
* ```ts
- * import { PromptTemplate } from "langchain/prompts";
+ * import { PromptTemplate } from "langchain-gpt4all/prompts";
*
* const prompt = new PromptTemplate({
* inputVariables: ["foo"],
diff --git a/langchain/src/prompts/selectors/LengthBasedExampleSelector.ts b/langchain-gpt4all/src/prompts/selectors/LengthBasedExampleSelector.ts
similarity index 100%
rename from langchain/src/prompts/selectors/LengthBasedExampleSelector.ts
rename to langchain-gpt4all/src/prompts/selectors/LengthBasedExampleSelector.ts
diff --git a/langchain/src/prompts/selectors/SemanticSimilarityExampleSelector.ts b/langchain-gpt4all/src/prompts/selectors/SemanticSimilarityExampleSelector.ts
similarity index 100%
rename from langchain/src/prompts/selectors/SemanticSimilarityExampleSelector.ts
rename to langchain-gpt4all/src/prompts/selectors/SemanticSimilarityExampleSelector.ts
diff --git a/langchain/src/prompts/serde.ts b/langchain-gpt4all/src/prompts/serde.ts
similarity index 100%
rename from langchain/src/prompts/serde.ts
rename to langchain-gpt4all/src/prompts/serde.ts
diff --git a/langchain/src/prompts/template.ts b/langchain-gpt4all/src/prompts/template.ts
similarity index 100%
rename from langchain/src/prompts/template.ts
rename to langchain-gpt4all/src/prompts/template.ts
diff --git a/langchain/src/prompts/tests/__snapshots__/chat.test.ts.snap b/langchain-gpt4all/src/prompts/tests/__snapshots__/chat.test.ts.snap
similarity index 100%
rename from langchain/src/prompts/tests/__snapshots__/chat.test.ts.snap
rename to langchain-gpt4all/src/prompts/tests/__snapshots__/chat.test.ts.snap
diff --git a/langchain/src/prompts/tests/chat.test.ts b/langchain-gpt4all/src/prompts/tests/chat.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/chat.test.ts
rename to langchain-gpt4all/src/prompts/tests/chat.test.ts
diff --git a/langchain/src/prompts/tests/few_shot.test.ts b/langchain-gpt4all/src/prompts/tests/few_shot.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/few_shot.test.ts
rename to langchain-gpt4all/src/prompts/tests/few_shot.test.ts
diff --git a/langchain/src/prompts/tests/load.int.test.ts b/langchain-gpt4all/src/prompts/tests/load.int.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/load.int.test.ts
rename to langchain-gpt4all/src/prompts/tests/load.int.test.ts
diff --git a/langchain/src/prompts/tests/prompt.test.ts b/langchain-gpt4all/src/prompts/tests/prompt.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/prompt.test.ts
rename to langchain-gpt4all/src/prompts/tests/prompt.test.ts
diff --git a/langchain/src/prompts/tests/prompts/hello_world.yaml b/langchain-gpt4all/src/prompts/tests/prompts/hello_world.yaml
similarity index 100%
rename from langchain/src/prompts/tests/prompts/hello_world.yaml
rename to langchain-gpt4all/src/prompts/tests/prompts/hello_world.yaml
diff --git a/langchain/src/prompts/tests/selectors.test.ts b/langchain-gpt4all/src/prompts/tests/selectors.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/selectors.test.ts
rename to langchain-gpt4all/src/prompts/tests/selectors.test.ts
diff --git a/langchain/src/prompts/tests/template.test.ts b/langchain-gpt4all/src/prompts/tests/template.test.ts
similarity index 100%
rename from langchain/src/prompts/tests/template.test.ts
rename to langchain-gpt4all/src/prompts/tests/template.test.ts
diff --git a/langchain/src/retrievers/contextual_compression.ts b/langchain-gpt4all/src/retrievers/contextual_compression.ts
similarity index 100%
rename from langchain/src/retrievers/contextual_compression.ts
rename to langchain-gpt4all/src/retrievers/contextual_compression.ts
diff --git a/langchain/src/retrievers/databerry.ts b/langchain-gpt4all/src/retrievers/databerry.ts
similarity index 100%
rename from langchain/src/retrievers/databerry.ts
rename to langchain-gpt4all/src/retrievers/databerry.ts
diff --git a/langchain/src/retrievers/document_compressors/chain_extract.ts b/langchain-gpt4all/src/retrievers/document_compressors/chain_extract.ts
similarity index 100%
rename from langchain/src/retrievers/document_compressors/chain_extract.ts
rename to langchain-gpt4all/src/retrievers/document_compressors/chain_extract.ts
diff --git a/langchain/src/retrievers/document_compressors/chain_extract_prompt.ts b/langchain-gpt4all/src/retrievers/document_compressors/chain_extract_prompt.ts
similarity index 100%
rename from langchain/src/retrievers/document_compressors/chain_extract_prompt.ts
rename to langchain-gpt4all/src/retrievers/document_compressors/chain_extract_prompt.ts
diff --git a/langchain/src/retrievers/document_compressors/index.ts b/langchain-gpt4all/src/retrievers/document_compressors/index.ts
similarity index 100%
rename from langchain/src/retrievers/document_compressors/index.ts
rename to langchain-gpt4all/src/retrievers/document_compressors/index.ts
diff --git a/langchain/src/retrievers/hyde.ts b/langchain-gpt4all/src/retrievers/hyde.ts
similarity index 100%
rename from langchain/src/retrievers/hyde.ts
rename to langchain-gpt4all/src/retrievers/hyde.ts
diff --git a/langchain/src/retrievers/index.ts b/langchain-gpt4all/src/retrievers/index.ts
similarity index 59%
rename from langchain/src/retrievers/index.ts
rename to langchain-gpt4all/src/retrievers/index.ts
index 6aaa3a4bebf1..7dc6e92a82c1 100644
--- a/langchain/src/retrievers/index.ts
+++ b/langchain-gpt4all/src/retrievers/index.ts
@@ -1,5 +1,5 @@
/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/retrievers' is deprecated. Import from eg. 'langchain/retrievers/remote' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+ "[WARN] Importing from 'langchain-gpt4all/retrievers' is deprecated. Import from eg. 'langchain-gpt4all/retrievers/remote' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
);
export { RemoteRetriever } from "./remote/base.js";
diff --git a/langchain/src/retrievers/metal.ts b/langchain-gpt4all/src/retrievers/metal.ts
similarity index 100%
rename from langchain/src/retrievers/metal.ts
rename to langchain-gpt4all/src/retrievers/metal.ts
diff --git a/langchain/src/retrievers/remote/base.ts b/langchain-gpt4all/src/retrievers/remote/base.ts
similarity index 100%
rename from langchain/src/retrievers/remote/base.ts
rename to langchain-gpt4all/src/retrievers/remote/base.ts
diff --git a/langchain/src/retrievers/remote/chatgpt-plugin.ts b/langchain-gpt4all/src/retrievers/remote/chatgpt-plugin.ts
similarity index 100%
rename from langchain/src/retrievers/remote/chatgpt-plugin.ts
rename to langchain-gpt4all/src/retrievers/remote/chatgpt-plugin.ts
diff --git a/langchain/src/retrievers/remote/index.ts b/langchain-gpt4all/src/retrievers/remote/index.ts
similarity index 100%
rename from langchain/src/retrievers/remote/index.ts
rename to langchain-gpt4all/src/retrievers/remote/index.ts
diff --git a/langchain/src/retrievers/remote/remote-retriever.ts b/langchain-gpt4all/src/retrievers/remote/remote-retriever.ts
similarity index 100%
rename from langchain/src/retrievers/remote/remote-retriever.ts
rename to langchain-gpt4all/src/retrievers/remote/remote-retriever.ts
diff --git a/langchain/src/retrievers/supabase.ts b/langchain-gpt4all/src/retrievers/supabase.ts
similarity index 100%
rename from langchain/src/retrievers/supabase.ts
rename to langchain-gpt4all/src/retrievers/supabase.ts
diff --git a/langchain/src/retrievers/tests/chain_extract.int.test.ts b/langchain-gpt4all/src/retrievers/tests/chain_extract.int.test.ts
similarity index 100%
rename from langchain/src/retrievers/tests/chain_extract.int.test.ts
rename to langchain-gpt4all/src/retrievers/tests/chain_extract.int.test.ts
diff --git a/langchain/src/retrievers/tests/hyde.int.test.ts b/langchain-gpt4all/src/retrievers/tests/hyde.int.test.ts
similarity index 100%
rename from langchain/src/retrievers/tests/hyde.int.test.ts
rename to langchain-gpt4all/src/retrievers/tests/hyde.int.test.ts
diff --git a/langchain/src/retrievers/tests/metal.int.test.ts b/langchain-gpt4all/src/retrievers/tests/metal.int.test.ts
similarity index 100%
rename from langchain/src/retrievers/tests/metal.int.test.ts
rename to langchain-gpt4all/src/retrievers/tests/metal.int.test.ts
diff --git a/langchain/src/retrievers/tests/supabase.int.test.ts b/langchain-gpt4all/src/retrievers/tests/supabase.int.test.ts
similarity index 100%
rename from langchain/src/retrievers/tests/supabase.int.test.ts
rename to langchain-gpt4all/src/retrievers/tests/supabase.int.test.ts
diff --git a/langchain/src/retrievers/tests/time_weighted.test.ts b/langchain-gpt4all/src/retrievers/tests/time_weighted.test.ts
similarity index 100%
rename from langchain/src/retrievers/tests/time_weighted.test.ts
rename to langchain-gpt4all/src/retrievers/tests/time_weighted.test.ts
diff --git a/langchain/src/retrievers/time_weighted.ts b/langchain-gpt4all/src/retrievers/time_weighted.ts
similarity index 98%
rename from langchain/src/retrievers/time_weighted.ts
rename to langchain-gpt4all/src/retrievers/time_weighted.ts
index 9f0b8c3c9cdb..f94467a037c0 100644
--- a/langchain/src/retrievers/time_weighted.ts
+++ b/langchain-gpt4all/src/retrievers/time_weighted.ts
@@ -17,7 +17,7 @@ export const BUFFER_IDX = "buffer_idx";
/**
* TimeWeightedVectorStoreRetriever retrieves documents based on their time-weighted relevance.
- * ref: https://github.com/hwchase17/langchain/blob/master/langchain/retrievers/time_weighted_retriever.py
+ * ref: https://github.com/hwchase17/langchain-gpt4all/blob/master/langchain-gpt4all/retrievers/time_weighted_retriever.py
*/
export class TimeWeightedVectorStoreRetriever extends BaseRetriever {
/**
diff --git a/langchain/src/schema/index.ts b/langchain-gpt4all/src/schema/index.ts
similarity index 100%
rename from langchain/src/schema/index.ts
rename to langchain-gpt4all/src/schema/index.ts
diff --git a/langchain/src/schema/output_parser.ts b/langchain-gpt4all/src/schema/output_parser.ts
similarity index 100%
rename from langchain/src/schema/output_parser.ts
rename to langchain-gpt4all/src/schema/output_parser.ts
diff --git a/langchain/src/sql_db.ts b/langchain-gpt4all/src/sql_db.ts
similarity index 100%
rename from langchain/src/sql_db.ts
rename to langchain-gpt4all/src/sql_db.ts
diff --git a/langchain/src/stores/file/in_memory.ts b/langchain-gpt4all/src/stores/file/in_memory.ts
similarity index 100%
rename from langchain/src/stores/file/in_memory.ts
rename to langchain-gpt4all/src/stores/file/in_memory.ts
diff --git a/langchain/src/stores/file/node.ts b/langchain-gpt4all/src/stores/file/node.ts
similarity index 86%
rename from langchain/src/stores/file/node.ts
rename to langchain-gpt4all/src/stores/file/node.ts
index 880b79488c6a..3ad419e36827 100644
--- a/langchain/src/stores/file/node.ts
+++ b/langchain-gpt4all/src/stores/file/node.ts
@@ -5,7 +5,7 @@ import { join } from "node:path";
import { BaseFileStore } from "../../schema/index.js";
export class NodeFileStore extends BaseFileStore {
- constructor(public basePath: string = mkdtempSync("langchain-")) {
+ constructor(public basePath: string = mkdtempSync("langchain-gpt4all-")) {
super();
}
diff --git a/langchain/src/stores/message/dynamodb.ts b/langchain-gpt4all/src/stores/message/dynamodb.ts
similarity index 100%
rename from langchain/src/stores/message/dynamodb.ts
rename to langchain-gpt4all/src/stores/message/dynamodb.ts
diff --git a/langchain/src/stores/message/in_memory.ts b/langchain-gpt4all/src/stores/message/in_memory.ts
similarity index 100%
rename from langchain/src/stores/message/in_memory.ts
rename to langchain-gpt4all/src/stores/message/in_memory.ts
diff --git a/langchain/src/stores/message/utils.ts b/langchain-gpt4all/src/stores/message/utils.ts
similarity index 100%
rename from langchain/src/stores/message/utils.ts
rename to langchain-gpt4all/src/stores/message/utils.ts
diff --git a/langchain/src/stores/tests/dynamodb.int.test.ts b/langchain-gpt4all/src/stores/tests/dynamodb.int.test.ts
similarity index 95%
rename from langchain/src/stores/tests/dynamodb.int.test.ts
rename to langchain-gpt4all/src/stores/tests/dynamodb.int.test.ts
index 409541eb1e3d..e96c3084db6f 100644
--- a/langchain/src/stores/tests/dynamodb.int.test.ts
+++ b/langchain-gpt4all/src/stores/tests/dynamodb.int.test.ts
@@ -11,7 +11,7 @@ import { HumanChatMessage, AIChatMessage } from "../../schema/index.js";
test("Test DynamoDB message history store", async () => {
const sessionId = new Date().toISOString();
const messageHistory = new DynamoDBChatMessageHistory({
- tableName: "langchain",
+ tableName: "langchain-gpt4all",
sessionId,
config: {
region: process.env.AWS_REGION!,
@@ -35,7 +35,7 @@ test("Test DynamoDB message history store", async () => {
expect(await messageHistory.getMessages()).toEqual(expectedMessages);
const messageHistory2 = new DynamoDBChatMessageHistory({
- tableName: "langchain",
+ tableName: "langchain-gpt4all",
sessionId,
config: {
region: process.env.AWS_REGION!,
@@ -57,7 +57,7 @@ test("Test DynamoDB message history store in a BufferMemory", async () => {
const memory = new BufferMemory({
returnMessages: true,
chatHistory: new DynamoDBChatMessageHistory({
- tableName: "langchain",
+ tableName: "langchain-gpt4all",
sessionId: new Date().toISOString(),
config: {
region: process.env.AWS_REGION!,
@@ -84,7 +84,7 @@ test("Test DynamoDB message history store in a BufferMemory", async () => {
test("Test DynamoDB message history store in an LLM chain", async () => {
const memory = new BufferMemory({
chatHistory: new DynamoDBChatMessageHistory({
- tableName: "langchain",
+ tableName: "langchain-gpt4all",
sessionId: new Date().toISOString(),
config: {
region: process.env.AWS_REGION!,
diff --git a/langchain/src/tests/sql_database.int.test.ts b/langchain-gpt4all/src/tests/sql_database.int.test.ts
similarity index 100%
rename from langchain/src/tests/sql_database.int.test.ts
rename to langchain-gpt4all/src/tests/sql_database.int.test.ts
diff --git a/langchain/src/tests/text_splitter.test.ts b/langchain-gpt4all/src/tests/text_splitter.test.ts
similarity index 98%
rename from langchain/src/tests/text_splitter.test.ts
rename to langchain-gpt4all/src/tests/text_splitter.test.ts
index 97d7a81e7619..93c255961b44 100644
--- a/langchain/src/tests/text_splitter.test.ts
+++ b/langchain-gpt4all/src/tests/text_splitter.test.ts
@@ -168,7 +168,7 @@ test("Test markdown text splitter.", async () => {
"\n" +
"```bash\n" +
"# Hopefully this code block isn't split\n" +
- "pip install langchain\n" +
+ "pip install langchain-gpt4all\n" +
"```\n" +
"\n" +
"As an open source project in a rapidly developing field, we are extremely open to contributions.";
@@ -179,7 +179,7 @@ test("Test markdown text splitter.", async () => {
const output = await splitter.splitText(text);
const expectedOutput = [
"# 🦜️🔗 LangChain\n\n⚡ Building applications with LLMs through composability ⚡",
- "Quick Install\n\n```bash\n# Hopefully this code block isn't split\npip install langchain",
+ "Quick Install\n\n```bash\n# Hopefully this code block isn't split\npip install langchain-gpt4all",
"As an open source project in a rapidly developing field, we are extremely open to contributions.",
];
expect(output).toEqual(expectedOutput);
diff --git a/langchain/src/text_splitter.ts b/langchain-gpt4all/src/text_splitter.ts
similarity index 100%
rename from langchain/src/text_splitter.ts
rename to langchain-gpt4all/src/text_splitter.ts
diff --git a/langchain/src/tools/IFTTTWebhook.ts b/langchain-gpt4all/src/tools/IFTTTWebhook.ts
similarity index 96%
rename from langchain/src/tools/IFTTTWebhook.ts
rename to langchain-gpt4all/src/tools/IFTTTWebhook.ts
index a6e60004f00b..889ee919914b 100644
--- a/langchain/src/tools/IFTTTWebhook.ts
+++ b/langchain-gpt4all/src/tools/IFTTTWebhook.ts
@@ -1,4 +1,4 @@
-/** From https://github.com/SidU/teams-langchain-js/wiki/Connecting-IFTTT-Services.
+/** From https://github.com/SidU/teams-langchain-gpt4all-js/wiki/Connecting-IFTTT-Services.
# Creating a webhook
- Go to https://ifttt.com/create
diff --git a/langchain/src/tools/aiplugin.ts b/langchain-gpt4all/src/tools/aiplugin.ts
similarity index 100%
rename from langchain/src/tools/aiplugin.ts
rename to langchain-gpt4all/src/tools/aiplugin.ts
diff --git a/langchain/src/tools/aws_lambda.ts b/langchain-gpt4all/src/tools/aws_lambda.ts
similarity index 100%
rename from langchain/src/tools/aws_lambda.ts
rename to langchain-gpt4all/src/tools/aws_lambda.ts
diff --git a/langchain/src/tools/base.ts b/langchain-gpt4all/src/tools/base.ts
similarity index 100%
rename from langchain/src/tools/base.ts
rename to langchain-gpt4all/src/tools/base.ts
diff --git a/langchain/src/tools/bingserpapi.ts b/langchain-gpt4all/src/tools/bingserpapi.ts
similarity index 100%
rename from langchain/src/tools/bingserpapi.ts
rename to langchain-gpt4all/src/tools/bingserpapi.ts
diff --git a/langchain/src/tools/calculator.ts b/langchain-gpt4all/src/tools/calculator.ts
similarity index 100%
rename from langchain/src/tools/calculator.ts
rename to langchain-gpt4all/src/tools/calculator.ts
diff --git a/langchain/src/tools/chain.ts b/langchain-gpt4all/src/tools/chain.ts
similarity index 100%
rename from langchain/src/tools/chain.ts
rename to langchain-gpt4all/src/tools/chain.ts
diff --git a/langchain/src/tools/dadjokeapi.ts b/langchain-gpt4all/src/tools/dadjokeapi.ts
similarity index 100%
rename from langchain/src/tools/dadjokeapi.ts
rename to langchain-gpt4all/src/tools/dadjokeapi.ts
diff --git a/langchain/src/tools/dynamic.ts b/langchain-gpt4all/src/tools/dynamic.ts
similarity index 100%
rename from langchain/src/tools/dynamic.ts
rename to langchain-gpt4all/src/tools/dynamic.ts
diff --git a/langchain/src/tools/fixtures/wordoftheday.html b/langchain-gpt4all/src/tools/fixtures/wordoftheday.html
similarity index 100%
rename from langchain/src/tools/fixtures/wordoftheday.html
rename to langchain-gpt4all/src/tools/fixtures/wordoftheday.html
diff --git a/langchain/src/tools/fs.ts b/langchain-gpt4all/src/tools/fs.ts
similarity index 100%
rename from langchain/src/tools/fs.ts
rename to langchain-gpt4all/src/tools/fs.ts
diff --git a/langchain/src/tools/index.ts b/langchain-gpt4all/src/tools/index.ts
similarity index 100%
rename from langchain/src/tools/index.ts
rename to langchain-gpt4all/src/tools/index.ts
diff --git a/langchain/src/tools/json.ts b/langchain-gpt4all/src/tools/json.ts
similarity index 100%
rename from langchain/src/tools/json.ts
rename to langchain-gpt4all/src/tools/json.ts
diff --git a/langchain/src/tools/requests.ts b/langchain-gpt4all/src/tools/requests.ts
similarity index 100%
rename from langchain/src/tools/requests.ts
rename to langchain-gpt4all/src/tools/requests.ts
diff --git a/langchain/src/tools/serpapi.ts b/langchain-gpt4all/src/tools/serpapi.ts
similarity index 100%
rename from langchain/src/tools/serpapi.ts
rename to langchain-gpt4all/src/tools/serpapi.ts
diff --git a/langchain/src/tools/serper.ts b/langchain-gpt4all/src/tools/serper.ts
similarity index 100%
rename from langchain/src/tools/serper.ts
rename to langchain-gpt4all/src/tools/serper.ts
diff --git a/langchain/src/tools/sql.ts b/langchain-gpt4all/src/tools/sql.ts
similarity index 100%
rename from langchain/src/tools/sql.ts
rename to langchain-gpt4all/src/tools/sql.ts
diff --git a/langchain/src/tools/tests/aiplugin.int.test.ts b/langchain-gpt4all/src/tools/tests/aiplugin.int.test.ts
similarity index 100%
rename from langchain/src/tools/tests/aiplugin.int.test.ts
rename to langchain-gpt4all/src/tools/tests/aiplugin.int.test.ts
diff --git a/langchain/src/tools/tests/chain.test.ts b/langchain-gpt4all/src/tools/tests/chain.test.ts
similarity index 100%
rename from langchain/src/tools/tests/chain.test.ts
rename to langchain-gpt4all/src/tools/tests/chain.test.ts
diff --git a/langchain/src/tools/tests/serpapi.test.ts b/langchain-gpt4all/src/tools/tests/serpapi.test.ts
similarity index 94%
rename from langchain/src/tools/tests/serpapi.test.ts
rename to langchain-gpt4all/src/tools/tests/serpapi.test.ts
index f40f0ab2846f..3affc8d0683d 100644
--- a/langchain/src/tools/tests/serpapi.test.ts
+++ b/langchain-gpt4all/src/tools/tests/serpapi.test.ts
@@ -1,5 +1,5 @@
import { test, expect } from "@jest/globals";
-import { SerpAPI } from "../../tools/serpapi.js";
+import { SerpAPI } from "../serpapi.js";
describe("serp api test suite", () => {
class SerpApiUrlTester extends SerpAPI {
diff --git a/langchain/src/tools/tests/webbrowser.int.test.ts b/langchain-gpt4all/src/tools/tests/webbrowser.int.test.ts
similarity index 100%
rename from langchain/src/tools/tests/webbrowser.int.test.ts
rename to langchain-gpt4all/src/tools/tests/webbrowser.int.test.ts
diff --git a/langchain/src/tools/tests/webbrowser.test.ts b/langchain-gpt4all/src/tools/tests/webbrowser.test.ts
similarity index 100%
rename from langchain/src/tools/tests/webbrowser.test.ts
rename to langchain-gpt4all/src/tools/tests/webbrowser.test.ts
diff --git a/langchain/src/tools/vectorstore.ts b/langchain-gpt4all/src/tools/vectorstore.ts
similarity index 100%
rename from langchain/src/tools/vectorstore.ts
rename to langchain-gpt4all/src/tools/vectorstore.ts
diff --git a/langchain/src/tools/webbrowser.ts b/langchain-gpt4all/src/tools/webbrowser.ts
similarity index 100%
rename from langchain/src/tools/webbrowser.ts
rename to langchain-gpt4all/src/tools/webbrowser.ts
diff --git a/langchain/src/tools/zapier.ts b/langchain-gpt4all/src/tools/zapier.ts
similarity index 100%
rename from langchain/src/tools/zapier.ts
rename to langchain-gpt4all/src/tools/zapier.ts
diff --git a/langchain/src/types/openai-types.ts b/langchain-gpt4all/src/types/openai-types.ts
similarity index 100%
rename from langchain/src/types/openai-types.ts
rename to langchain-gpt4all/src/types/openai-types.ts
diff --git a/langchain/src/types/pdf-parse.d.ts b/langchain-gpt4all/src/types/pdf-parse.d.ts
similarity index 99%
rename from langchain/src/types/pdf-parse.d.ts
rename to langchain-gpt4all/src/types/pdf-parse.d.ts
index 675c403a559c..667e18b01544 100644
--- a/langchain/src/types/pdf-parse.d.ts
+++ b/langchain-gpt4all/src/types/pdf-parse.d.ts
@@ -686,7 +686,7 @@ declare module "pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js" {
*/
export class PDFDocumentLoadingTask {
static "__#16@#docId": number;
- _capability: import("../shared/util.js").PromiseCapability;
+ _capability: import("../shared/util.ts").PromiseCapability;
_transport: any;
_worker: any;
/**
@@ -1340,7 +1340,7 @@ declare module "pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js" {
name: any;
destroyed: boolean;
verbosity: number;
- _readyCapability: import("../shared/util.js").PromiseCapability;
+ _readyCapability: import("../shared/util.ts").PromiseCapability;
_port: any;
_webWorker: Worker | null;
_messageHandler: MessageHandler | null;
diff --git a/langchain/src/types/type-utils.ts b/langchain-gpt4all/src/types/type-utils.ts
similarity index 100%
rename from langchain/src/types/type-utils.ts
rename to langchain-gpt4all/src/types/type-utils.ts
diff --git a/langchain/src/util/async_caller.ts b/langchain-gpt4all/src/util/async_caller.ts
similarity index 100%
rename from langchain/src/util/async_caller.ts
rename to langchain-gpt4all/src/util/async_caller.ts
diff --git a/langchain/src/util/axios-fetch-adapter.d.ts b/langchain-gpt4all/src/util/axios-fetch-adapter.d.ts
similarity index 100%
rename from langchain/src/util/axios-fetch-adapter.d.ts
rename to langchain-gpt4all/src/util/axios-fetch-adapter.d.ts
diff --git a/langchain/src/util/axios-fetch-adapter.js b/langchain-gpt4all/src/util/axios-fetch-adapter.js
similarity index 100%
rename from langchain/src/util/axios-fetch-adapter.js
rename to langchain-gpt4all/src/util/axios-fetch-adapter.js
diff --git a/langchain/src/util/axios-types.ts b/langchain-gpt4all/src/util/axios-types.ts
similarity index 100%
rename from langchain/src/util/axios-types.ts
rename to langchain-gpt4all/src/util/axios-types.ts
diff --git a/langchain/src/util/chunk.ts b/langchain-gpt4all/src/util/chunk.ts
similarity index 100%
rename from langchain/src/util/chunk.ts
rename to langchain-gpt4all/src/util/chunk.ts
diff --git a/langchain/src/util/env.ts b/langchain-gpt4all/src/util/env.ts
similarity index 100%
rename from langchain/src/util/env.ts
rename to langchain-gpt4all/src/util/env.ts
diff --git a/langchain/src/util/event-source-parse.ts b/langchain-gpt4all/src/util/event-source-parse.ts
similarity index 100%
rename from langchain/src/util/event-source-parse.ts
rename to langchain-gpt4all/src/util/event-source-parse.ts
diff --git a/langchain/src/util/extname.ts b/langchain-gpt4all/src/util/extname.ts
similarity index 100%
rename from langchain/src/util/extname.ts
rename to langchain-gpt4all/src/util/extname.ts
diff --git a/langchain/src/util/hub.ts b/langchain-gpt4all/src/util/hub.ts
similarity index 96%
rename from langchain/src/util/hub.ts
rename to langchain-gpt4all/src/util/hub.ts
index 66d1d15b4f91..edb03b14a1a5 100644
--- a/langchain/src/util/hub.ts
+++ b/langchain-gpt4all/src/util/hub.ts
@@ -36,7 +36,7 @@ export const loadFromHub = async (
? // eslint-disable-next-line no-process-env
process.env?.LANGCHAIN_HUB_URL_BASE
: undefined) ??
- "https://raw.githubusercontent.com/hwchase17/langchain-hub/";
+ "https://raw.githubusercontent.com/hwchase17/langchain-gpt4all-hub/";
const match = uri.match(HUB_PATH_REGEX);
if (!match) {
diff --git a/langchain/src/util/load.ts b/langchain-gpt4all/src/util/load.ts
similarity index 100%
rename from langchain/src/util/load.ts
rename to langchain-gpt4all/src/util/load.ts
diff --git a/langchain/src/util/parse.ts b/langchain-gpt4all/src/util/parse.ts
similarity index 100%
rename from langchain/src/util/parse.ts
rename to langchain-gpt4all/src/util/parse.ts
diff --git a/langchain/src/util/set.ts b/langchain-gpt4all/src/util/set.ts
similarity index 100%
rename from langchain/src/util/set.ts
rename to langchain-gpt4all/src/util/set.ts
diff --git a/langchain/src/util/sql_utils.ts b/langchain-gpt4all/src/util/sql_utils.ts
similarity index 100%
rename from langchain/src/util/sql_utils.ts
rename to langchain-gpt4all/src/util/sql_utils.ts
diff --git a/langchain/src/util/tests/async_caller.int.test.ts b/langchain-gpt4all/src/util/tests/async_caller.int.test.ts
similarity index 100%
rename from langchain/src/util/tests/async_caller.int.test.ts
rename to langchain-gpt4all/src/util/tests/async_caller.int.test.ts
diff --git a/langchain/src/util/tests/async_caller.test.ts b/langchain-gpt4all/src/util/tests/async_caller.test.ts
similarity index 100%
rename from langchain/src/util/tests/async_caller.test.ts
rename to langchain-gpt4all/src/util/tests/async_caller.test.ts
diff --git a/langchain/src/util/tests/openai-stream.test.ts b/langchain-gpt4all/src/util/tests/openai-stream.test.ts
similarity index 100%
rename from langchain/src/util/tests/openai-stream.test.ts
rename to langchain-gpt4all/src/util/tests/openai-stream.test.ts
diff --git a/langchain/src/util/tests/set.test.ts b/langchain-gpt4all/src/util/tests/set.test.ts
similarity index 100%
rename from langchain/src/util/tests/set.test.ts
rename to langchain-gpt4all/src/util/tests/set.test.ts
diff --git a/langchain/src/util/tests/sql_utils.test.ts b/langchain-gpt4all/src/util/tests/sql_utils.test.ts
similarity index 100%
rename from langchain/src/util/tests/sql_utils.test.ts
rename to langchain-gpt4all/src/util/tests/sql_utils.test.ts
diff --git a/langchain/src/vectorstores/base.ts b/langchain-gpt4all/src/vectorstores/base.ts
similarity index 100%
rename from langchain/src/vectorstores/base.ts
rename to langchain-gpt4all/src/vectorstores/base.ts
diff --git a/langchain/src/vectorstores/chroma.ts b/langchain-gpt4all/src/vectorstores/chroma.ts
similarity index 99%
rename from langchain/src/vectorstores/chroma.ts
rename to langchain-gpt4all/src/vectorstores/chroma.ts
index 7ecf08a54179..1b34fdaf8330 100644
--- a/langchain/src/vectorstores/chroma.ts
+++ b/langchain-gpt4all/src/vectorstores/chroma.ts
@@ -182,7 +182,7 @@ export class Chroma extends VectorStore {
function ensureCollectionName(collectionName?: string) {
if (!collectionName) {
- return `langchain-${uuid.v4()}`;
+ return `langchain-gpt4all-${uuid.v4()}`;
}
return collectionName;
}
diff --git a/langchain/src/vectorstores/hnswlib.ts b/langchain-gpt4all/src/vectorstores/hnswlib.ts
similarity index 100%
rename from langchain/src/vectorstores/hnswlib.ts
rename to langchain-gpt4all/src/vectorstores/hnswlib.ts
diff --git a/langchain/src/vectorstores/index.ts b/langchain-gpt4all/src/vectorstores/index.ts
similarity index 56%
rename from langchain/src/vectorstores/index.ts
rename to langchain-gpt4all/src/vectorstores/index.ts
index 7e44757263b2..758e6cd425e5 100644
--- a/langchain/src/vectorstores/index.ts
+++ b/langchain-gpt4all/src/vectorstores/index.ts
@@ -1,5 +1,5 @@
/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/vectorstores' is deprecated. Import from eg. 'langchain/vectorstores/pinecone' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
+ "[WARN] Importing from 'langchain-gpt4all/vectorstores' is deprecated. Import from eg. 'langchain-gpt4all/vectorstores/pinecone' instead. See https://js.langchain-gpt4all.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
);
export { HNSWLib } from "./hnswlib.js";
diff --git a/langchain/src/vectorstores/memory.ts b/langchain-gpt4all/src/vectorstores/memory.ts
similarity index 100%
rename from langchain/src/vectorstores/memory.ts
rename to langchain-gpt4all/src/vectorstores/memory.ts
diff --git a/langchain/src/vectorstores/milvus.ts b/langchain-gpt4all/src/vectorstores/milvus.ts
similarity index 100%
rename from langchain/src/vectorstores/milvus.ts
rename to langchain-gpt4all/src/vectorstores/milvus.ts
diff --git a/langchain/src/vectorstores/mongo.ts b/langchain-gpt4all/src/vectorstores/mongo.ts
similarity index 100%
rename from langchain/src/vectorstores/mongo.ts
rename to langchain-gpt4all/src/vectorstores/mongo.ts
diff --git a/langchain/src/vectorstores/myscale.ts b/langchain-gpt4all/src/vectorstores/myscale.ts
similarity index 100%
rename from langchain/src/vectorstores/myscale.ts
rename to langchain-gpt4all/src/vectorstores/myscale.ts
diff --git a/langchain/src/vectorstores/opensearch.ts b/langchain-gpt4all/src/vectorstores/opensearch.ts
similarity index 100%
rename from langchain/src/vectorstores/opensearch.ts
rename to langchain-gpt4all/src/vectorstores/opensearch.ts
diff --git a/langchain/src/vectorstores/pinecone.ts b/langchain-gpt4all/src/vectorstores/pinecone.ts
similarity index 100%
rename from langchain/src/vectorstores/pinecone.ts
rename to langchain-gpt4all/src/vectorstores/pinecone.ts
diff --git a/langchain/src/vectorstores/prisma.ts b/langchain-gpt4all/src/vectorstores/prisma.ts
similarity index 100%
rename from langchain/src/vectorstores/prisma.ts
rename to langchain-gpt4all/src/vectorstores/prisma.ts
diff --git a/langchain/src/vectorstores/supabase.ts b/langchain-gpt4all/src/vectorstores/supabase.ts
similarity index 100%
rename from langchain/src/vectorstores/supabase.ts
rename to langchain-gpt4all/src/vectorstores/supabase.ts
diff --git a/langchain/src/vectorstores/tests/chroma.test.ts b/langchain-gpt4all/src/vectorstores/tests/chroma.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/chroma.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/chroma.test.ts
diff --git a/langchain/src/vectorstores/tests/hnswlib.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/hnswlib.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/hnswlib.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/hnswlib.int.test.ts
diff --git a/langchain/src/vectorstores/tests/hnswlib.test.ts b/langchain-gpt4all/src/vectorstores/tests/hnswlib.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/hnswlib.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/hnswlib.test.ts
diff --git a/langchain/src/vectorstores/tests/memory.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/memory.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/memory.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/memory.int.test.ts
diff --git a/langchain/src/vectorstores/tests/milvus.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/milvus.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/milvus.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/milvus.int.test.ts
diff --git a/langchain/src/vectorstores/tests/mongo.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/mongo.int.test.ts
similarity index 97%
rename from langchain/src/vectorstores/tests/mongo.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/mongo.int.test.ts
index d21597c9bfe2..304c89d53405 100755
--- a/langchain/src/vectorstores/tests/mongo.int.test.ts
+++ b/langchain-gpt4all/src/vectorstores/tests/mongo.int.test.ts
@@ -34,7 +34,7 @@ test.skip("MongoVectorStore with external ids", async () => {
const client = new MongoClient(process.env.MONGO_URI!);
try {
- const collection = client.db("langchain").collection("test");
+ const collection = client.db("langchain-gpt4all").collection("test");
const vectorStore = new MongoVectorStore(new CohereEmbeddings(), {
client,
diff --git a/langchain/src/vectorstores/tests/myscale.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/myscale.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/myscale.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/myscale.int.test.ts
diff --git a/langchain/src/vectorstores/tests/opensearch.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/opensearch.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/opensearch.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/opensearch.int.test.ts
diff --git a/langchain/src/vectorstores/tests/pinecone.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/pinecone.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/pinecone.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/pinecone.int.test.ts
diff --git a/langchain/src/vectorstores/tests/pinecone.test.ts b/langchain-gpt4all/src/vectorstores/tests/pinecone.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/pinecone.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/pinecone.test.ts
diff --git a/langchain/src/vectorstores/tests/supabase.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/supabase.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/supabase.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/supabase.int.test.ts
diff --git a/langchain/src/vectorstores/tests/supabase.test.ts b/langchain-gpt4all/src/vectorstores/tests/supabase.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/supabase.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/supabase.test.ts
diff --git a/langchain/src/vectorstores/tests/weaviate.int.test.ts b/langchain-gpt4all/src/vectorstores/tests/weaviate.int.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/weaviate.int.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/weaviate.int.test.ts
diff --git a/langchain/src/vectorstores/tests/weaviate.test.ts b/langchain-gpt4all/src/vectorstores/tests/weaviate.test.ts
similarity index 100%
rename from langchain/src/vectorstores/tests/weaviate.test.ts
rename to langchain-gpt4all/src/vectorstores/tests/weaviate.test.ts
diff --git a/langchain/src/vectorstores/weaviate.ts b/langchain-gpt4all/src/vectorstores/weaviate.ts
similarity index 100%
rename from langchain/src/vectorstores/weaviate.ts
rename to langchain-gpt4all/src/vectorstores/weaviate.ts
diff --git a/langchain/tsconfig.cjs.json b/langchain-gpt4all/tsconfig.cjs.json
similarity index 100%
rename from langchain/tsconfig.cjs.json
rename to langchain-gpt4all/tsconfig.cjs.json
diff --git a/langchain/tsconfig.json b/langchain-gpt4all/tsconfig.json
similarity index 97%
rename from langchain/tsconfig.json
rename to langchain-gpt4all/tsconfig.json
index 39362fcd2ead..12a57e2b8809 100644
--- a/langchain/tsconfig.json
+++ b/langchain-gpt4all/tsconfig.json
@@ -131,7 +131,7 @@
"excludeExternals": true,
"excludeNotDocumented": false,
"includeVersion": true,
- "sourceLinkTemplate": "https://github.com/hwchase17/langchainjs/blob/{gitRevision}/{path}#L{line}",
+ "sourceLinkTemplate": "https://github.com/lucasjohnston/langchainjs-gpt4all/blob/{gitRevision}/{path}#L{line}",
"readme": "none",
"out": "docs"
}
diff --git a/langchain/src/chat_models/index.ts b/langchain/src/chat_models/index.ts
deleted file mode 100644
index 316f8ce34a89..000000000000
--- a/langchain/src/chat_models/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/chat_models' is deprecated. Import from eg. 'langchain/chat_models/openai' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
-);
-
-export { BaseChatModel, BaseChatModelParams, SimpleChatModel } from "./base.js";
-export { ChatOpenAI } from "./openai.js";
-export { ChatAnthropic } from "./anthropic.js";
diff --git a/langchain/src/embeddings/index.ts b/langchain/src/embeddings/index.ts
deleted file mode 100644
index 63bc72ec1ffb..000000000000
--- a/langchain/src/embeddings/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* #__PURE__ */ console.error(
- "[WARN] Importing from 'langchain/embeddings' is deprecated. Import from eg. 'langchain/embeddings/openai' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions."
-);
-
-export { OpenAIEmbeddings } from "./openai.js";
-export { CohereEmbeddings } from "./cohere.js";
-export { Embeddings } from "./base.js";
-export { FakeEmbeddings } from "./fake.js";
diff --git a/package.json b/package.json
index fa321e9db9b8..aa93955e7456 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
{
"name": "langchainjs-gpt4all",
- "version": "0.0.5",
+ "version": "0.0.6",
"engines": {
"node": ">=18"
},
"workspaces": [
- "langchain",
+ "langchain-gpt4all",
"examples",
"docs",
"test-exports-esbuild",
@@ -32,13 +32,13 @@
"test:unit": "turbo run test",
"test:int": "turbo run test:integration",
"test:exports:docker": "docker compose up",
- "publish": "bash scripts/release-branch.sh && turbo run build lint test && yarn run test:exports:docker && yarn workspace langchain run release && echo '🔗 Open https://github.com/hwchase17/langchainjs/compare/release?expand=1 and merge the release PR'",
+ "publish": "bash scripts/release-branch.sh && turbo run build lint test && yarn run test:exports:docker && yarn workspace langchain-gpt4all run release && echo '🔗 Open https://github.com/lucasjohnston/langchainjs-gpt4all/compare/release?expand=1 and merge the release PR'",
"example": "yarn workspace examples start",
"prepare": "husky install",
"precommit": "turbo run precommit",
"docs": "yarn workspace docs start"
},
- "author": "LangChain",
+ "author": "Lucas Johnston ",
"license": "MIT",
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
diff --git a/scripts/docker-ci-entrypoint.sh b/scripts/docker-ci-entrypoint.sh
index 8a33782017c9..f80e7907048c 100644
--- a/scripts/docker-ci-entrypoint.sh
+++ b/scripts/docker-ci-entrypoint.sh
@@ -7,7 +7,7 @@ export CI=true
cp -r ../package/* .
# Replace the workspace dependency with the local copy, and install all others
-yarn add ../langchain
+yarn add ../langchain-gpt4all
# Check the build command completes successfully
yarn build
diff --git a/test-exports-cf/package.json b/test-exports-cf/package.json
index 12af6d95d2e5..b6f30af9270c 100644
--- a/test-exports-cf/package.json
+++ b/test-exports-cf/package.json
@@ -8,7 +8,7 @@
"wrangler": "2.14.0"
},
"dependencies": {
- "langchain": "workspace:*"
+ "langchain-gpt4all": "workspace:*"
},
"private": true,
"scripts": {
diff --git a/test-exports-cf/src/entrypoints.js b/test-exports-cf/src/entrypoints.js
index 791e315429e0..91128dce5684 100644
--- a/test-exports-cf/src/entrypoints.js
+++ b/test-exports-cf/src/entrypoints.js
@@ -1,36 +1,36 @@
-export * from "langchain/agents";
-export * from "langchain/base_language";
-export * from "langchain/tools";
-export * from "langchain/chains";
-export * from "langchain/embeddings/base";
-export * from "langchain/embeddings/fake";
-export * from "langchain/embeddings/openai";
-export * from "langchain/llms/base";
-export * from "langchain/llms/openai";
-export * from "langchain/prompts";
-export * from "langchain/vectorstores/base";
-export * from "langchain/vectorstores/memory";
-export * from "langchain/vectorstores/prisma";
-export * from "langchain/text_splitter";
-export * from "langchain/memory";
-export * from "langchain/document";
-export * from "langchain/docstore";
-export * from "langchain/document_loaders/base";
-export * from "langchain/chat_models/base";
-export * from "langchain/chat_models/openai";
-export * from "langchain/chat_models/anthropic";
-export * from "langchain/schema";
-export * from "langchain/schema/output_parser";
-export * from "langchain/callbacks";
-export * from "langchain/output_parsers";
-export * from "langchain/retrievers/remote";
-export * from "langchain/retrievers/databerry";
-export * from "langchain/retrievers/contextual_compression";
-export * from "langchain/retrievers/document_compressors";
-export * from "langchain/retrievers/time_weighted";
-export * from "langchain/retrievers/document_compressors/chain_extract";
-export * from "langchain/retrievers/hyde";
-export * from "langchain/cache";
-export * from "langchain/stores/file/in_memory";
-export * from "langchain/experimental/autogpt";
-export * from "langchain/experimental/babyagi";
+export * from "langchain-gpt4all/agents";
+export * from "langchain-gpt4all/base_language";
+export * from "langchain-gpt4all/tools";
+export * from "langchain-gpt4all/chains";
+export * from "langchain-gpt4all/embeddings/base";
+export * from "langchain-gpt4all/embeddings/fake";
+export * from "langchain-gpt4all/embeddings/openai";
+export * from "langchain-gpt4all/llms/base";
+export * from "langchain-gpt4all/llms/openai";
+export * from "langchain-gpt4all/prompts";
+export * from "langchain-gpt4all/vectorstores/base";
+export * from "langchain-gpt4all/vectorstores/memory";
+export * from "langchain-gpt4all/vectorstores/prisma";
+export * from "langchain-gpt4all/text_splitter";
+export * from "langchain-gpt4all/memory";
+export * from "langchain-gpt4all/document";
+export * from "langchain-gpt4all/docstore";
+export * from "langchain-gpt4all/document_loaders/base";
+export * from "langchain-gpt4all/chat_models/base";
+export * from "langchain-gpt4all/chat_models/openai";
+export * from "langchain-gpt4all/chat_models/anthropic";
+export * from "langchain-gpt4all/schema";
+export * from "langchain-gpt4all/schema/output_parser";
+export * from "langchain-gpt4all/callbacks";
+export * from "langchain-gpt4all/output_parsers";
+export * from "langchain-gpt4all/retrievers/remote";
+export * from "langchain-gpt4all/retrievers/databerry";
+export * from "langchain-gpt4all/retrievers/contextual_compression";
+export * from "langchain-gpt4all/retrievers/document_compressors";
+export * from "langchain-gpt4all/retrievers/time_weighted";
+export * from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+export * from "langchain-gpt4all/retrievers/hyde";
+export * from "langchain-gpt4all/cache";
+export * from "langchain-gpt4all/stores/file/in_memory";
+export * from "langchain-gpt4all/experimental/autogpt";
+export * from "langchain-gpt4all/experimental/babyagi";
diff --git a/test-exports-cf/src/index.ts b/test-exports-cf/src/index.ts
index 07846a98fe86..e267869a6328 100644
--- a/test-exports-cf/src/index.ts
+++ b/test-exports-cf/src/index.ts
@@ -12,15 +12,15 @@
import "./entrypoints.js";
// Import a few things we'll use to test the exports
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
-import { OpenAI } from "langchain/llms/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { HNLoader } from "langchain/document_loaders/web/hn";
+} from "langchain-gpt4all/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { HNLoader } from "langchain-gpt4all/document_loaders/web/hn";
export interface Env {
OPENAI_API_KEY?: string;
@@ -36,17 +36,16 @@ export default {
env: Env,
ctx: ExecutionContext
): Promise {
-
- const constructorParameters
- = env.AZURE_OPENAI_API_KEY ? {
- azureOpenAIApiKey: env.AZURE_OPENAI_API_KEY,
- azureOpenAIApiInstanceName: env.AZURE_OPENAI_API_INSTANCE_NAME,
- azureOpenAIApiDeploymentName: env.AZURE_OPENAI_API_DEPLOYMENT_NAME,
- azureOpenAIApiVersion: env.AZURE_OPENAI_API_VERSION,
- }
+ const constructorParameters = env.AZURE_OPENAI_API_KEY
+ ? {
+ azureOpenAIApiKey: env.AZURE_OPENAI_API_KEY,
+ azureOpenAIApiInstanceName: env.AZURE_OPENAI_API_INSTANCE_NAME,
+ azureOpenAIApiDeploymentName: env.AZURE_OPENAI_API_DEPLOYMENT_NAME,
+ azureOpenAIApiVersion: env.AZURE_OPENAI_API_VERSION,
+ }
: {
- openAIApiKey: env.OPENAI_API_KEY,
- }
+ openAIApiKey: env.OPENAI_API_KEY,
+ };
// Intantiate a few things to test the exports
new OpenAI(constructorParameters);
diff --git a/test-exports-cjs/package.json b/test-exports-cjs/package.json
index b83b4cb248eb..7d1ca500539a 100644
--- a/test-exports-cjs/package.json
+++ b/test-exports-cjs/package.json
@@ -2,7 +2,7 @@
"name": "test-exports-cjs",
"version": "0.0.0",
"private": true,
- "description": "CJS Tests for the things exported by the langchain package",
+ "description": "CJS Tests for the things exported by the langchain-gpt4all package",
"main": "./index.mjs",
"scripts": {
"build": "tsc",
@@ -20,7 +20,7 @@
"dependencies": {
"d3-dsv": "2",
"hnswlib-node": "^1.4.2",
- "langchain": "workspace:*"
+ "langchain-gpt4all": "workspace:*"
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
diff --git a/test-exports-cjs/src/entrypoints.js b/test-exports-cjs/src/entrypoints.js
index 23afdccadce4..2d098846dcdf 100644
--- a/test-exports-cjs/src/entrypoints.js
+++ b/test-exports-cjs/src/entrypoints.js
@@ -1,36 +1,36 @@
-const agents = require("langchain/agents");
-const base_language = require("langchain/base_language");
-const tools = require("langchain/tools");
-const chains = require("langchain/chains");
-const embeddings_base = require("langchain/embeddings/base");
-const embeddings_fake = require("langchain/embeddings/fake");
-const embeddings_openai = require("langchain/embeddings/openai");
-const llms_base = require("langchain/llms/base");
-const llms_openai = require("langchain/llms/openai");
-const prompts = require("langchain/prompts");
-const vectorstores_base = require("langchain/vectorstores/base");
-const vectorstores_memory = require("langchain/vectorstores/memory");
-const vectorstores_prisma = require("langchain/vectorstores/prisma");
-const text_splitter = require("langchain/text_splitter");
-const memory = require("langchain/memory");
-const document = require("langchain/document");
-const docstore = require("langchain/docstore");
-const document_loaders_base = require("langchain/document_loaders/base");
-const chat_models_base = require("langchain/chat_models/base");
-const chat_models_openai = require("langchain/chat_models/openai");
-const chat_models_anthropic = require("langchain/chat_models/anthropic");
-const schema = require("langchain/schema");
-const schema_output_parser = require("langchain/schema/output_parser");
-const callbacks = require("langchain/callbacks");
-const output_parsers = require("langchain/output_parsers");
-const retrievers_remote = require("langchain/retrievers/remote");
-const retrievers_databerry = require("langchain/retrievers/databerry");
-const retrievers_contextual_compression = require("langchain/retrievers/contextual_compression");
-const retrievers_document_compressors = require("langchain/retrievers/document_compressors");
-const retrievers_time_weighted = require("langchain/retrievers/time_weighted");
-const retrievers_document_compressors_chain_extract = require("langchain/retrievers/document_compressors/chain_extract");
-const retrievers_hyde = require("langchain/retrievers/hyde");
-const cache = require("langchain/cache");
-const stores_file_in_memory = require("langchain/stores/file/in_memory");
-const experimental_autogpt = require("langchain/experimental/autogpt");
-const experimental_babyagi = require("langchain/experimental/babyagi");
+const agents = require("langchain-gpt4all/agents");
+const base_language = require("langchain-gpt4all/base_language");
+const tools = require("langchain-gpt4all/tools");
+const chains = require("langchain-gpt4all/chains");
+const embeddings_base = require("langchain-gpt4all/embeddings/base");
+const embeddings_fake = require("langchain-gpt4all/embeddings/fake");
+const embeddings_openai = require("langchain-gpt4all/embeddings/openai");
+const llms_base = require("langchain-gpt4all/llms/base");
+const llms_openai = require("langchain-gpt4all/llms/openai");
+const prompts = require("langchain-gpt4all/prompts");
+const vectorstores_base = require("langchain-gpt4all/vectorstores/base");
+const vectorstores_memory = require("langchain-gpt4all/vectorstores/memory");
+const vectorstores_prisma = require("langchain-gpt4all/vectorstores/prisma");
+const text_splitter = require("langchain-gpt4all/text_splitter");
+const memory = require("langchain-gpt4all/memory");
+const document = require("langchain-gpt4all/document");
+const docstore = require("langchain-gpt4all/docstore");
+const document_loaders_base = require("langchain-gpt4all/document_loaders/base");
+const chat_models_base = require("langchain-gpt4all/chat_models/base");
+const chat_models_openai = require("langchain-gpt4all/chat_models/openai");
+const chat_models_anthropic = require("langchain-gpt4all/chat_models/anthropic");
+const schema = require("langchain-gpt4all/schema");
+const schema_output_parser = require("langchain-gpt4all/schema/output_parser");
+const callbacks = require("langchain-gpt4all/callbacks");
+const output_parsers = require("langchain-gpt4all/output_parsers");
+const retrievers_remote = require("langchain-gpt4all/retrievers/remote");
+const retrievers_databerry = require("langchain-gpt4all/retrievers/databerry");
+const retrievers_contextual_compression = require("langchain-gpt4all/retrievers/contextual_compression");
+const retrievers_document_compressors = require("langchain-gpt4all/retrievers/document_compressors");
+const retrievers_time_weighted = require("langchain-gpt4all/retrievers/time_weighted");
+const retrievers_document_compressors_chain_extract = require("langchain-gpt4all/retrievers/document_compressors/chain_extract");
+const retrievers_hyde = require("langchain-gpt4all/retrievers/hyde");
+const cache = require("langchain-gpt4all/cache");
+const stores_file_in_memory = require("langchain-gpt4all/stores/file/in_memory");
+const experimental_autogpt = require("langchain-gpt4all/experimental/autogpt");
+const experimental_babyagi = require("langchain-gpt4all/experimental/babyagi");
diff --git a/test-exports-cjs/src/import.js b/test-exports-cjs/src/import.js
index 537fac5d483b..ad121c3e8c8d 100644
--- a/test-exports-cjs/src/import.js
+++ b/test-exports-cjs/src/import.js
@@ -1,13 +1,19 @@
async function test() {
const { default: assert } = await import("assert");
- const { OpenAI } = await import("langchain/llms/openai");
- const { LLMChain } = await import("langchain/chains");
- const { ChatPromptTemplate } = await import("langchain/prompts");
- const { loadPrompt } = await import("langchain/prompts/load");
- const { HNSWLib } = await import("langchain/vectorstores/hnswlib");
- const { OpenAIEmbeddings } = await import("langchain/embeddings/openai");
- const { InMemoryDocstore, Document } = await import("langchain/docstore");
- const { CSVLoader } = await import("langchain/document_loaders/fs/csv");
+ const { OpenAI } = await import("langchain-gpt4all/llms/openai");
+ const { LLMChain } = await import("langchain-gpt4all/chains");
+ const { ChatPromptTemplate } = await import("langchain-gpt4all/prompts");
+ const { loadPrompt } = await import("langchain-gpt4all/prompts/load");
+ const { HNSWLib } = await import("langchain-gpt4all/vectorstores/hnswlib");
+ const { OpenAIEmbeddings } = await import(
+ "langchain-gpt4all/embeddings/openai"
+ );
+ const { InMemoryDocstore, Document } = await import(
+ "langchain-gpt4all/docstore"
+ );
+ const { CSVLoader } = await import(
+ "langchain-gpt4all/document_loaders/fs/csv"
+ );
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-cjs/src/index.mjs b/test-exports-cjs/src/index.mjs
index d4faad183c74..34221621f620 100644
--- a/test-exports-cjs/src/index.mjs
+++ b/test-exports-cjs/src/index.mjs
@@ -1,12 +1,12 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-cjs/src/index.ts b/test-exports-cjs/src/index.ts
index d7de47824101..f4cf2c4c5a68 100644
--- a/test-exports-cjs/src/index.ts
+++ b/test-exports-cjs/src/index.ts
@@ -1,12 +1,12 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
async function test(useAzure: boolean = false) {
// Test exports
diff --git a/test-exports-cjs/src/require.js b/test-exports-cjs/src/require.js
index ee191e4ead97..8dd7e5c83955 100644
--- a/test-exports-cjs/src/require.js
+++ b/test-exports-cjs/src/require.js
@@ -1,12 +1,12 @@
const assert = require("assert");
-const { OpenAI } = require("langchain/llms/openai");
-const { LLMChain } = require("langchain/chains");
-const { ChatPromptTemplate } = require("langchain/prompts");
-const { loadPrompt } = require("langchain/prompts/load");
-const { HNSWLib } = require("langchain/vectorstores/hnswlib");
-const { OpenAIEmbeddings } = require("langchain/embeddings/openai");
-const { InMemoryDocstore, Document } = require("langchain/docstore");
-const { CSVLoader } = require("langchain/document_loaders/fs/csv");
+const { OpenAI } = require("langchain-gpt4all/llms/openai");
+const { LLMChain } = require("langchain-gpt4all/chains");
+const { ChatPromptTemplate } = require("langchain-gpt4all/prompts");
+const { loadPrompt } = require("langchain-gpt4all/prompts/load");
+const { HNSWLib } = require("langchain-gpt4all/vectorstores/hnswlib");
+const { OpenAIEmbeddings } = require("langchain-gpt4all/embeddings/openai");
+const { InMemoryDocstore, Document } = require("langchain-gpt4all/docstore");
+const { CSVLoader } = require("langchain-gpt4all/document_loaders/fs/csv");
async function test() {
// Test exports
diff --git a/test-exports-cra/package.json b/test-exports-cra/package.json
index c890b589ae6f..8e7f7acbc62b 100644
--- a/test-exports-cra/package.json
+++ b/test-exports-cra/package.json
@@ -6,7 +6,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
- "langchain": "workspace:*",
+ "langchain-gpt4all": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
diff --git a/test-exports-cra/src/App.js b/test-exports-cra/src/App.js
index 35142c9e4fd3..ef04501dc073 100644
--- a/test-exports-cra/src/App.js
+++ b/test-exports-cra/src/App.js
@@ -4,15 +4,15 @@
import "./entrypoints.js";
// Import a few things we'll use to test the exports
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
import { useCallback } from "react";
-import { CallbackManager } from "langchain/callbacks";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
// Don't do this in your app, it would leak your API key
const OPENAI_API_KEY = process.env.REACT_APP_OPENAI_API_KEY;
diff --git a/test-exports-cra/src/entrypoints.js b/test-exports-cra/src/entrypoints.js
index 791e315429e0..91128dce5684 100644
--- a/test-exports-cra/src/entrypoints.js
+++ b/test-exports-cra/src/entrypoints.js
@@ -1,36 +1,36 @@
-export * from "langchain/agents";
-export * from "langchain/base_language";
-export * from "langchain/tools";
-export * from "langchain/chains";
-export * from "langchain/embeddings/base";
-export * from "langchain/embeddings/fake";
-export * from "langchain/embeddings/openai";
-export * from "langchain/llms/base";
-export * from "langchain/llms/openai";
-export * from "langchain/prompts";
-export * from "langchain/vectorstores/base";
-export * from "langchain/vectorstores/memory";
-export * from "langchain/vectorstores/prisma";
-export * from "langchain/text_splitter";
-export * from "langchain/memory";
-export * from "langchain/document";
-export * from "langchain/docstore";
-export * from "langchain/document_loaders/base";
-export * from "langchain/chat_models/base";
-export * from "langchain/chat_models/openai";
-export * from "langchain/chat_models/anthropic";
-export * from "langchain/schema";
-export * from "langchain/schema/output_parser";
-export * from "langchain/callbacks";
-export * from "langchain/output_parsers";
-export * from "langchain/retrievers/remote";
-export * from "langchain/retrievers/databerry";
-export * from "langchain/retrievers/contextual_compression";
-export * from "langchain/retrievers/document_compressors";
-export * from "langchain/retrievers/time_weighted";
-export * from "langchain/retrievers/document_compressors/chain_extract";
-export * from "langchain/retrievers/hyde";
-export * from "langchain/cache";
-export * from "langchain/stores/file/in_memory";
-export * from "langchain/experimental/autogpt";
-export * from "langchain/experimental/babyagi";
+export * from "langchain-gpt4all/agents";
+export * from "langchain-gpt4all/base_language";
+export * from "langchain-gpt4all/tools";
+export * from "langchain-gpt4all/chains";
+export * from "langchain-gpt4all/embeddings/base";
+export * from "langchain-gpt4all/embeddings/fake";
+export * from "langchain-gpt4all/embeddings/openai";
+export * from "langchain-gpt4all/llms/base";
+export * from "langchain-gpt4all/llms/openai";
+export * from "langchain-gpt4all/prompts";
+export * from "langchain-gpt4all/vectorstores/base";
+export * from "langchain-gpt4all/vectorstores/memory";
+export * from "langchain-gpt4all/vectorstores/prisma";
+export * from "langchain-gpt4all/text_splitter";
+export * from "langchain-gpt4all/memory";
+export * from "langchain-gpt4all/document";
+export * from "langchain-gpt4all/docstore";
+export * from "langchain-gpt4all/document_loaders/base";
+export * from "langchain-gpt4all/chat_models/base";
+export * from "langchain-gpt4all/chat_models/openai";
+export * from "langchain-gpt4all/chat_models/anthropic";
+export * from "langchain-gpt4all/schema";
+export * from "langchain-gpt4all/schema/output_parser";
+export * from "langchain-gpt4all/callbacks";
+export * from "langchain-gpt4all/output_parsers";
+export * from "langchain-gpt4all/retrievers/remote";
+export * from "langchain-gpt4all/retrievers/databerry";
+export * from "langchain-gpt4all/retrievers/contextual_compression";
+export * from "langchain-gpt4all/retrievers/document_compressors";
+export * from "langchain-gpt4all/retrievers/time_weighted";
+export * from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+export * from "langchain-gpt4all/retrievers/hyde";
+export * from "langchain-gpt4all/cache";
+export * from "langchain-gpt4all/stores/file/in_memory";
+export * from "langchain-gpt4all/experimental/autogpt";
+export * from "langchain-gpt4all/experimental/babyagi";
diff --git a/test-exports-esbuild/package.json b/test-exports-esbuild/package.json
index f5a2639877e0..bdc9449bd47e 100644
--- a/test-exports-esbuild/package.json
+++ b/test-exports-esbuild/package.json
@@ -2,7 +2,7 @@
"name": "test-exports-esbuild",
"version": "0.0.0",
"private": true,
- "description": "Tests for the things exported by the langchain package",
+ "description": "Tests for the things exported by the langchain-gpt4all package",
"main": "./index.mjs",
"type": "module",
"scripts": {
@@ -18,7 +18,7 @@
"dependencies": {
"d3-dsv": "2",
"hnswlib-node": "^1.4.2",
- "langchain": "workspace:*"
+ "langchain-gpt4all": "workspace:*"
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
diff --git a/test-exports-esbuild/src/entrypoints.js b/test-exports-esbuild/src/entrypoints.js
index 317b2db7a024..b4873000452d 100644
--- a/test-exports-esbuild/src/entrypoints.js
+++ b/test-exports-esbuild/src/entrypoints.js
@@ -1,36 +1,36 @@
-import * as agents from "langchain/agents";
-import * as base_language from "langchain/base_language";
-import * as tools from "langchain/tools";
-import * as chains from "langchain/chains";
-import * as embeddings_base from "langchain/embeddings/base";
-import * as embeddings_fake from "langchain/embeddings/fake";
-import * as embeddings_openai from "langchain/embeddings/openai";
-import * as llms_base from "langchain/llms/base";
-import * as llms_openai from "langchain/llms/openai";
-import * as prompts from "langchain/prompts";
-import * as vectorstores_base from "langchain/vectorstores/base";
-import * as vectorstores_memory from "langchain/vectorstores/memory";
-import * as vectorstores_prisma from "langchain/vectorstores/prisma";
-import * as text_splitter from "langchain/text_splitter";
-import * as memory from "langchain/memory";
-import * as document from "langchain/document";
-import * as docstore from "langchain/docstore";
-import * as document_loaders_base from "langchain/document_loaders/base";
-import * as chat_models_base from "langchain/chat_models/base";
-import * as chat_models_openai from "langchain/chat_models/openai";
-import * as chat_models_anthropic from "langchain/chat_models/anthropic";
-import * as schema from "langchain/schema";
-import * as schema_output_parser from "langchain/schema/output_parser";
-import * as callbacks from "langchain/callbacks";
-import * as output_parsers from "langchain/output_parsers";
-import * as retrievers_remote from "langchain/retrievers/remote";
-import * as retrievers_databerry from "langchain/retrievers/databerry";
-import * as retrievers_contextual_compression from "langchain/retrievers/contextual_compression";
-import * as retrievers_document_compressors from "langchain/retrievers/document_compressors";
-import * as retrievers_time_weighted from "langchain/retrievers/time_weighted";
-import * as retrievers_document_compressors_chain_extract from "langchain/retrievers/document_compressors/chain_extract";
-import * as retrievers_hyde from "langchain/retrievers/hyde";
-import * as cache from "langchain/cache";
-import * as stores_file_in_memory from "langchain/stores/file/in_memory";
-import * as experimental_autogpt from "langchain/experimental/autogpt";
-import * as experimental_babyagi from "langchain/experimental/babyagi";
+import * as agents from "langchain-gpt4all/agents";
+import * as base_language from "langchain-gpt4all/base_language";
+import * as tools from "langchain-gpt4all/tools";
+import * as chains from "langchain-gpt4all/chains";
+import * as embeddings_base from "langchain-gpt4all/embeddings/base";
+import * as embeddings_fake from "langchain-gpt4all/embeddings/fake";
+import * as embeddings_openai from "langchain-gpt4all/embeddings/openai";
+import * as llms_base from "langchain-gpt4all/llms/base";
+import * as llms_openai from "langchain-gpt4all/llms/openai";
+import * as prompts from "langchain-gpt4all/prompts";
+import * as vectorstores_base from "langchain-gpt4all/vectorstores/base";
+import * as vectorstores_memory from "langchain-gpt4all/vectorstores/memory";
+import * as vectorstores_prisma from "langchain-gpt4all/vectorstores/prisma";
+import * as text_splitter from "langchain-gpt4all/text_splitter";
+import * as memory from "langchain-gpt4all/memory";
+import * as document from "langchain-gpt4all/document";
+import * as docstore from "langchain-gpt4all/docstore";
+import * as document_loaders_base from "langchain-gpt4all/document_loaders/base";
+import * as chat_models_base from "langchain-gpt4all/chat_models/base";
+import * as chat_models_openai from "langchain-gpt4all/chat_models/openai";
+import * as chat_models_anthropic from "langchain-gpt4all/chat_models/anthropic";
+import * as schema from "langchain-gpt4all/schema";
+import * as schema_output_parser from "langchain-gpt4all/schema/output_parser";
+import * as callbacks from "langchain-gpt4all/callbacks";
+import * as output_parsers from "langchain-gpt4all/output_parsers";
+import * as retrievers_remote from "langchain-gpt4all/retrievers/remote";
+import * as retrievers_databerry from "langchain-gpt4all/retrievers/databerry";
+import * as retrievers_contextual_compression from "langchain-gpt4all/retrievers/contextual_compression";
+import * as retrievers_document_compressors from "langchain-gpt4all/retrievers/document_compressors";
+import * as retrievers_time_weighted from "langchain-gpt4all/retrievers/time_weighted";
+import * as retrievers_document_compressors_chain_extract from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+import * as retrievers_hyde from "langchain-gpt4all/retrievers/hyde";
+import * as cache from "langchain-gpt4all/cache";
+import * as stores_file_in_memory from "langchain-gpt4all/stores/file/in_memory";
+import * as experimental_autogpt from "langchain-gpt4all/experimental/autogpt";
+import * as experimental_babyagi from "langchain-gpt4all/experimental/babyagi";
diff --git a/test-exports-esbuild/src/import.cjs b/test-exports-esbuild/src/import.cjs
index 537fac5d483b..ad121c3e8c8d 100644
--- a/test-exports-esbuild/src/import.cjs
+++ b/test-exports-esbuild/src/import.cjs
@@ -1,13 +1,19 @@
async function test() {
const { default: assert } = await import("assert");
- const { OpenAI } = await import("langchain/llms/openai");
- const { LLMChain } = await import("langchain/chains");
- const { ChatPromptTemplate } = await import("langchain/prompts");
- const { loadPrompt } = await import("langchain/prompts/load");
- const { HNSWLib } = await import("langchain/vectorstores/hnswlib");
- const { OpenAIEmbeddings } = await import("langchain/embeddings/openai");
- const { InMemoryDocstore, Document } = await import("langchain/docstore");
- const { CSVLoader } = await import("langchain/document_loaders/fs/csv");
+ const { OpenAI } = await import("langchain-gpt4all/llms/openai");
+ const { LLMChain } = await import("langchain-gpt4all/chains");
+ const { ChatPromptTemplate } = await import("langchain-gpt4all/prompts");
+ const { loadPrompt } = await import("langchain-gpt4all/prompts/load");
+ const { HNSWLib } = await import("langchain-gpt4all/vectorstores/hnswlib");
+ const { OpenAIEmbeddings } = await import(
+ "langchain-gpt4all/embeddings/openai"
+ );
+ const { InMemoryDocstore, Document } = await import(
+ "langchain-gpt4all/docstore"
+ );
+ const { CSVLoader } = await import(
+ "langchain-gpt4all/document_loaders/fs/csv"
+ );
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-esbuild/src/index.js b/test-exports-esbuild/src/index.js
index bd40026a8acd..aab51af46dd2 100644
--- a/test-exports-esbuild/src/index.js
+++ b/test-exports-esbuild/src/index.js
@@ -1,13 +1,13 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
-import { CallbackManager } from "langchain/callbacks";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-esbuild/src/require.cjs b/test-exports-esbuild/src/require.cjs
index ee191e4ead97..8dd7e5c83955 100644
--- a/test-exports-esbuild/src/require.cjs
+++ b/test-exports-esbuild/src/require.cjs
@@ -1,12 +1,12 @@
const assert = require("assert");
-const { OpenAI } = require("langchain/llms/openai");
-const { LLMChain } = require("langchain/chains");
-const { ChatPromptTemplate } = require("langchain/prompts");
-const { loadPrompt } = require("langchain/prompts/load");
-const { HNSWLib } = require("langchain/vectorstores/hnswlib");
-const { OpenAIEmbeddings } = require("langchain/embeddings/openai");
-const { InMemoryDocstore, Document } = require("langchain/docstore");
-const { CSVLoader } = require("langchain/document_loaders/fs/csv");
+const { OpenAI } = require("langchain-gpt4all/llms/openai");
+const { LLMChain } = require("langchain-gpt4all/chains");
+const { ChatPromptTemplate } = require("langchain-gpt4all/prompts");
+const { loadPrompt } = require("langchain-gpt4all/prompts/load");
+const { HNSWLib } = require("langchain-gpt4all/vectorstores/hnswlib");
+const { OpenAIEmbeddings } = require("langchain-gpt4all/embeddings/openai");
+const { InMemoryDocstore, Document } = require("langchain-gpt4all/docstore");
+const { CSVLoader } = require("langchain-gpt4all/document_loaders/fs/csv");
async function test() {
// Test exports
diff --git a/test-exports-esbuild/src/typescript.ts b/test-exports-esbuild/src/typescript.ts
index 0a89af9635f0..963888c22926 100644
--- a/test-exports-esbuild/src/typescript.ts
+++ b/test-exports-esbuild/src/typescript.ts
@@ -1,12 +1,12 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
async function test(useAzure: boolean = false) {
// Test exports
diff --git a/test-exports-esm/package.json b/test-exports-esm/package.json
index d987f5460f71..a6ae7ab50517 100644
--- a/test-exports-esm/package.json
+++ b/test-exports-esm/package.json
@@ -2,7 +2,7 @@
"name": "test-exports-esm",
"version": "0.0.0",
"private": true,
- "description": "Tests for the things exported by the langchain package",
+ "description": "Tests for the things exported by the langchain-gpt4all package",
"main": "./index.mjs",
"type": "module",
"scripts": {
@@ -21,7 +21,7 @@
"dependencies": {
"d3-dsv": "2",
"hnswlib-node": "^1.4.2",
- "langchain": "workspace:*"
+ "langchain-gpt4all": "workspace:*"
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
diff --git a/test-exports-esm/src/entrypoints.js b/test-exports-esm/src/entrypoints.js
index 317b2db7a024..b4873000452d 100644
--- a/test-exports-esm/src/entrypoints.js
+++ b/test-exports-esm/src/entrypoints.js
@@ -1,36 +1,36 @@
-import * as agents from "langchain/agents";
-import * as base_language from "langchain/base_language";
-import * as tools from "langchain/tools";
-import * as chains from "langchain/chains";
-import * as embeddings_base from "langchain/embeddings/base";
-import * as embeddings_fake from "langchain/embeddings/fake";
-import * as embeddings_openai from "langchain/embeddings/openai";
-import * as llms_base from "langchain/llms/base";
-import * as llms_openai from "langchain/llms/openai";
-import * as prompts from "langchain/prompts";
-import * as vectorstores_base from "langchain/vectorstores/base";
-import * as vectorstores_memory from "langchain/vectorstores/memory";
-import * as vectorstores_prisma from "langchain/vectorstores/prisma";
-import * as text_splitter from "langchain/text_splitter";
-import * as memory from "langchain/memory";
-import * as document from "langchain/document";
-import * as docstore from "langchain/docstore";
-import * as document_loaders_base from "langchain/document_loaders/base";
-import * as chat_models_base from "langchain/chat_models/base";
-import * as chat_models_openai from "langchain/chat_models/openai";
-import * as chat_models_anthropic from "langchain/chat_models/anthropic";
-import * as schema from "langchain/schema";
-import * as schema_output_parser from "langchain/schema/output_parser";
-import * as callbacks from "langchain/callbacks";
-import * as output_parsers from "langchain/output_parsers";
-import * as retrievers_remote from "langchain/retrievers/remote";
-import * as retrievers_databerry from "langchain/retrievers/databerry";
-import * as retrievers_contextual_compression from "langchain/retrievers/contextual_compression";
-import * as retrievers_document_compressors from "langchain/retrievers/document_compressors";
-import * as retrievers_time_weighted from "langchain/retrievers/time_weighted";
-import * as retrievers_document_compressors_chain_extract from "langchain/retrievers/document_compressors/chain_extract";
-import * as retrievers_hyde from "langchain/retrievers/hyde";
-import * as cache from "langchain/cache";
-import * as stores_file_in_memory from "langchain/stores/file/in_memory";
-import * as experimental_autogpt from "langchain/experimental/autogpt";
-import * as experimental_babyagi from "langchain/experimental/babyagi";
+import * as agents from "langchain-gpt4all/agents";
+import * as base_language from "langchain-gpt4all/base_language";
+import * as tools from "langchain-gpt4all/tools";
+import * as chains from "langchain-gpt4all/chains";
+import * as embeddings_base from "langchain-gpt4all/embeddings/base";
+import * as embeddings_fake from "langchain-gpt4all/embeddings/fake";
+import * as embeddings_openai from "langchain-gpt4all/embeddings/openai";
+import * as llms_base from "langchain-gpt4all/llms/base";
+import * as llms_openai from "langchain-gpt4all/llms/openai";
+import * as prompts from "langchain-gpt4all/prompts";
+import * as vectorstores_base from "langchain-gpt4all/vectorstores/base";
+import * as vectorstores_memory from "langchain-gpt4all/vectorstores/memory";
+import * as vectorstores_prisma from "langchain-gpt4all/vectorstores/prisma";
+import * as text_splitter from "langchain-gpt4all/text_splitter";
+import * as memory from "langchain-gpt4all/memory";
+import * as document from "langchain-gpt4all/document";
+import * as docstore from "langchain-gpt4all/docstore";
+import * as document_loaders_base from "langchain-gpt4all/document_loaders/base";
+import * as chat_models_base from "langchain-gpt4all/chat_models/base";
+import * as chat_models_openai from "langchain-gpt4all/chat_models/openai";
+import * as chat_models_anthropic from "langchain-gpt4all/chat_models/anthropic";
+import * as schema from "langchain-gpt4all/schema";
+import * as schema_output_parser from "langchain-gpt4all/schema/output_parser";
+import * as callbacks from "langchain-gpt4all/callbacks";
+import * as output_parsers from "langchain-gpt4all/output_parsers";
+import * as retrievers_remote from "langchain-gpt4all/retrievers/remote";
+import * as retrievers_databerry from "langchain-gpt4all/retrievers/databerry";
+import * as retrievers_contextual_compression from "langchain-gpt4all/retrievers/contextual_compression";
+import * as retrievers_document_compressors from "langchain-gpt4all/retrievers/document_compressors";
+import * as retrievers_time_weighted from "langchain-gpt4all/retrievers/time_weighted";
+import * as retrievers_document_compressors_chain_extract from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+import * as retrievers_hyde from "langchain-gpt4all/retrievers/hyde";
+import * as cache from "langchain-gpt4all/cache";
+import * as stores_file_in_memory from "langchain-gpt4all/stores/file/in_memory";
+import * as experimental_autogpt from "langchain-gpt4all/experimental/autogpt";
+import * as experimental_babyagi from "langchain-gpt4all/experimental/babyagi";
diff --git a/test-exports-esm/src/import.cjs b/test-exports-esm/src/import.cjs
index 537fac5d483b..ad121c3e8c8d 100644
--- a/test-exports-esm/src/import.cjs
+++ b/test-exports-esm/src/import.cjs
@@ -1,13 +1,19 @@
async function test() {
const { default: assert } = await import("assert");
- const { OpenAI } = await import("langchain/llms/openai");
- const { LLMChain } = await import("langchain/chains");
- const { ChatPromptTemplate } = await import("langchain/prompts");
- const { loadPrompt } = await import("langchain/prompts/load");
- const { HNSWLib } = await import("langchain/vectorstores/hnswlib");
- const { OpenAIEmbeddings } = await import("langchain/embeddings/openai");
- const { InMemoryDocstore, Document } = await import("langchain/docstore");
- const { CSVLoader } = await import("langchain/document_loaders/fs/csv");
+ const { OpenAI } = await import("langchain-gpt4all/llms/openai");
+ const { LLMChain } = await import("langchain-gpt4all/chains");
+ const { ChatPromptTemplate } = await import("langchain-gpt4all/prompts");
+ const { loadPrompt } = await import("langchain-gpt4all/prompts/load");
+ const { HNSWLib } = await import("langchain-gpt4all/vectorstores/hnswlib");
+ const { OpenAIEmbeddings } = await import(
+ "langchain-gpt4all/embeddings/openai"
+ );
+ const { InMemoryDocstore, Document } = await import(
+ "langchain-gpt4all/docstore"
+ );
+ const { CSVLoader } = await import(
+ "langchain-gpt4all/document_loaders/fs/csv"
+ );
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-esm/src/index.js b/test-exports-esm/src/index.js
index bd40026a8acd..aab51af46dd2 100644
--- a/test-exports-esm/src/index.js
+++ b/test-exports-esm/src/index.js
@@ -1,13 +1,13 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
-import { CallbackManager } from "langchain/callbacks";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
// Test exports
assert(typeof OpenAI === "function");
diff --git a/test-exports-esm/src/index.ts b/test-exports-esm/src/index.ts
index 0a89af9635f0..963888c22926 100644
--- a/test-exports-esm/src/index.ts
+++ b/test-exports-esm/src/index.ts
@@ -1,12 +1,12 @@
import assert from "assert";
-import { OpenAI } from "langchain/llms/openai";
-import { LLMChain } from "langchain/chains";
-import { ChatPromptTemplate } from "langchain/prompts";
-import { loadPrompt } from "langchain/prompts/load";
-import { HNSWLib } from "langchain/vectorstores/hnswlib";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { InMemoryDocstore, Document } from "langchain/docstore";
-import { CSVLoader } from "langchain/document_loaders/fs/csv";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatPromptTemplate } from "langchain-gpt4all/prompts";
+import { loadPrompt } from "langchain-gpt4all/prompts/load";
+import { HNSWLib } from "langchain-gpt4all/vectorstores/hnswlib";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { InMemoryDocstore, Document } from "langchain-gpt4all/docstore";
+import { CSVLoader } from "langchain-gpt4all/document_loaders/fs/csv";
async function test(useAzure: boolean = false) {
// Test exports
diff --git a/test-exports-esm/src/require.cjs b/test-exports-esm/src/require.cjs
index ee191e4ead97..8dd7e5c83955 100644
--- a/test-exports-esm/src/require.cjs
+++ b/test-exports-esm/src/require.cjs
@@ -1,12 +1,12 @@
const assert = require("assert");
-const { OpenAI } = require("langchain/llms/openai");
-const { LLMChain } = require("langchain/chains");
-const { ChatPromptTemplate } = require("langchain/prompts");
-const { loadPrompt } = require("langchain/prompts/load");
-const { HNSWLib } = require("langchain/vectorstores/hnswlib");
-const { OpenAIEmbeddings } = require("langchain/embeddings/openai");
-const { InMemoryDocstore, Document } = require("langchain/docstore");
-const { CSVLoader } = require("langchain/document_loaders/fs/csv");
+const { OpenAI } = require("langchain-gpt4all/llms/openai");
+const { LLMChain } = require("langchain-gpt4all/chains");
+const { ChatPromptTemplate } = require("langchain-gpt4all/prompts");
+const { loadPrompt } = require("langchain-gpt4all/prompts/load");
+const { HNSWLib } = require("langchain-gpt4all/vectorstores/hnswlib");
+const { OpenAIEmbeddings } = require("langchain-gpt4all/embeddings/openai");
+const { InMemoryDocstore, Document } = require("langchain-gpt4all/docstore");
+const { CSVLoader } = require("langchain-gpt4all/document_loaders/fs/csv");
async function test() {
// Test exports
diff --git a/test-exports-vercel/package.json b/test-exports-vercel/package.json
index e4e49c233d38..e1d6d7d1ad56 100644
--- a/test-exports-vercel/package.json
+++ b/test-exports-vercel/package.json
@@ -14,7 +14,7 @@
"@types/react-dom": "18.0.11",
"eslint": "8.37.0",
"eslint-config-next": "13.3.0",
- "langchain": "workspace:*",
+ "langchain-gpt4all": "workspace:*",
"next": "13.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
diff --git a/test-exports-vercel/src/entrypoints.js b/test-exports-vercel/src/entrypoints.js
index 791e315429e0..91128dce5684 100644
--- a/test-exports-vercel/src/entrypoints.js
+++ b/test-exports-vercel/src/entrypoints.js
@@ -1,36 +1,36 @@
-export * from "langchain/agents";
-export * from "langchain/base_language";
-export * from "langchain/tools";
-export * from "langchain/chains";
-export * from "langchain/embeddings/base";
-export * from "langchain/embeddings/fake";
-export * from "langchain/embeddings/openai";
-export * from "langchain/llms/base";
-export * from "langchain/llms/openai";
-export * from "langchain/prompts";
-export * from "langchain/vectorstores/base";
-export * from "langchain/vectorstores/memory";
-export * from "langchain/vectorstores/prisma";
-export * from "langchain/text_splitter";
-export * from "langchain/memory";
-export * from "langchain/document";
-export * from "langchain/docstore";
-export * from "langchain/document_loaders/base";
-export * from "langchain/chat_models/base";
-export * from "langchain/chat_models/openai";
-export * from "langchain/chat_models/anthropic";
-export * from "langchain/schema";
-export * from "langchain/schema/output_parser";
-export * from "langchain/callbacks";
-export * from "langchain/output_parsers";
-export * from "langchain/retrievers/remote";
-export * from "langchain/retrievers/databerry";
-export * from "langchain/retrievers/contextual_compression";
-export * from "langchain/retrievers/document_compressors";
-export * from "langchain/retrievers/time_weighted";
-export * from "langchain/retrievers/document_compressors/chain_extract";
-export * from "langchain/retrievers/hyde";
-export * from "langchain/cache";
-export * from "langchain/stores/file/in_memory";
-export * from "langchain/experimental/autogpt";
-export * from "langchain/experimental/babyagi";
+export * from "langchain-gpt4all/agents";
+export * from "langchain-gpt4all/base_language";
+export * from "langchain-gpt4all/tools";
+export * from "langchain-gpt4all/chains";
+export * from "langchain-gpt4all/embeddings/base";
+export * from "langchain-gpt4all/embeddings/fake";
+export * from "langchain-gpt4all/embeddings/openai";
+export * from "langchain-gpt4all/llms/base";
+export * from "langchain-gpt4all/llms/openai";
+export * from "langchain-gpt4all/prompts";
+export * from "langchain-gpt4all/vectorstores/base";
+export * from "langchain-gpt4all/vectorstores/memory";
+export * from "langchain-gpt4all/vectorstores/prisma";
+export * from "langchain-gpt4all/text_splitter";
+export * from "langchain-gpt4all/memory";
+export * from "langchain-gpt4all/document";
+export * from "langchain-gpt4all/docstore";
+export * from "langchain-gpt4all/document_loaders/base";
+export * from "langchain-gpt4all/chat_models/base";
+export * from "langchain-gpt4all/chat_models/openai";
+export * from "langchain-gpt4all/chat_models/anthropic";
+export * from "langchain-gpt4all/schema";
+export * from "langchain-gpt4all/schema/output_parser";
+export * from "langchain-gpt4all/callbacks";
+export * from "langchain-gpt4all/output_parsers";
+export * from "langchain-gpt4all/retrievers/remote";
+export * from "langchain-gpt4all/retrievers/databerry";
+export * from "langchain-gpt4all/retrievers/contextual_compression";
+export * from "langchain-gpt4all/retrievers/document_compressors";
+export * from "langchain-gpt4all/retrievers/time_weighted";
+export * from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+export * from "langchain-gpt4all/retrievers/hyde";
+export * from "langchain-gpt4all/cache";
+export * from "langchain-gpt4all/stores/file/in_memory";
+export * from "langchain-gpt4all/experimental/autogpt";
+export * from "langchain-gpt4all/experimental/babyagi";
diff --git a/test-exports-vercel/src/pages/api/hello-edge.ts b/test-exports-vercel/src/pages/api/hello-edge.ts
index c36dc18c4bdb..c43c44b042bc 100644
--- a/test-exports-vercel/src/pages/api/hello-edge.ts
+++ b/test-exports-vercel/src/pages/api/hello-edge.ts
@@ -4,16 +4,16 @@
import "../../entrypoints.js";
// Import a few things we'll use to test the exports
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
-import { OpenAI } from "langchain/llms/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { CallbackManager } from "langchain/callbacks";
-import { ChatAgent } from "langchain/agents";
+} from "langchain-gpt4all/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
+import { ChatAgent } from "langchain-gpt4all/agents";
import { NextRequest, NextResponse } from "next/server";
diff --git a/test-exports-vercel/src/pages/api/hello-serverless.ts b/test-exports-vercel/src/pages/api/hello-serverless.ts
index 3c8be32941b3..940dd6da71c2 100644
--- a/test-exports-vercel/src/pages/api/hello-serverless.ts
+++ b/test-exports-vercel/src/pages/api/hello-serverless.ts
@@ -4,15 +4,15 @@
import "../../entrypoints.js";
// Import a few things we'll use to test the exports
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
-import { OpenAI } from "langchain/llms/openai";
-import { OpenAIEmbeddings } from "langchain/embeddings/openai";
-import { TextLoader } from "langchain/document_loaders/fs/text";
+} from "langchain-gpt4all/prompts";
+import { OpenAI } from "langchain-gpt4all/llms/openai";
+import { OpenAIEmbeddings } from "langchain-gpt4all/embeddings/openai";
+import { TextLoader } from "langchain-gpt4all/document_loaders/fs/text";
import { NextApiRequest, NextApiResponse } from "next";
diff --git a/test-exports-vercel/src/pages/index.tsx b/test-exports-vercel/src/pages/index.tsx
index 2a08c18a24cc..ab0e27f21af6 100644
--- a/test-exports-vercel/src/pages/index.tsx
+++ b/test-exports-vercel/src/pages/index.tsx
@@ -4,13 +4,13 @@ import "../entrypoints.js";
import Head from "next/head";
import styles from "@/styles/Home.module.css";
import { useCallback } from "react";
-import { ChatOpenAI } from "langchain/chat_models/openai";
-import { CallbackManager } from "langchain/callbacks";
-import { LLMChain } from "langchain/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
+import { LLMChain } from "langchain-gpt4all/chains";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
+} from "langchain-gpt4all/prompts";
// Don't do this in your app, it would leak your API key
const OPENAI_API_KEY = process.env.NEXT_PUBLIC_OPENAI_API_KEY;
diff --git a/test-exports-vite/package.json b/test-exports-vite/package.json
index 0fafdde263d3..6f7b2ca31783 100644
--- a/test-exports-vite/package.json
+++ b/test-exports-vite/package.json
@@ -10,7 +10,7 @@
"test": "tsc"
},
"dependencies": {
- "langchain": "workspace:*"
+ "langchain-gpt4all": "workspace:*"
},
"devDependencies": {
"typescript": "^5.0.0",
diff --git a/test-exports-vite/src/chain.ts b/test-exports-vite/src/chain.ts
index 97f0cc98b9f7..7be95a8a0eea 100644
--- a/test-exports-vite/src/chain.ts
+++ b/test-exports-vite/src/chain.ts
@@ -1,11 +1,11 @@
// Import a few things we'll use to test the exports
-import { LLMChain } from "langchain/chains";
-import { ChatOpenAI } from "langchain/chat_models/openai";
+import { LLMChain } from "langchain-gpt4all/chains";
+import { ChatOpenAI } from "langchain-gpt4all/chat_models/openai";
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
-} from "langchain/prompts";
-import { CallbackManager } from "langchain/callbacks";
+} from "langchain-gpt4all/prompts";
+import { CallbackManager } from "langchain-gpt4all/callbacks";
export function setupChain(element: HTMLButtonElement) {
const runChain = async () => {
diff --git a/test-exports-vite/src/entrypoints.js b/test-exports-vite/src/entrypoints.js
index 791e315429e0..91128dce5684 100644
--- a/test-exports-vite/src/entrypoints.js
+++ b/test-exports-vite/src/entrypoints.js
@@ -1,36 +1,36 @@
-export * from "langchain/agents";
-export * from "langchain/base_language";
-export * from "langchain/tools";
-export * from "langchain/chains";
-export * from "langchain/embeddings/base";
-export * from "langchain/embeddings/fake";
-export * from "langchain/embeddings/openai";
-export * from "langchain/llms/base";
-export * from "langchain/llms/openai";
-export * from "langchain/prompts";
-export * from "langchain/vectorstores/base";
-export * from "langchain/vectorstores/memory";
-export * from "langchain/vectorstores/prisma";
-export * from "langchain/text_splitter";
-export * from "langchain/memory";
-export * from "langchain/document";
-export * from "langchain/docstore";
-export * from "langchain/document_loaders/base";
-export * from "langchain/chat_models/base";
-export * from "langchain/chat_models/openai";
-export * from "langchain/chat_models/anthropic";
-export * from "langchain/schema";
-export * from "langchain/schema/output_parser";
-export * from "langchain/callbacks";
-export * from "langchain/output_parsers";
-export * from "langchain/retrievers/remote";
-export * from "langchain/retrievers/databerry";
-export * from "langchain/retrievers/contextual_compression";
-export * from "langchain/retrievers/document_compressors";
-export * from "langchain/retrievers/time_weighted";
-export * from "langchain/retrievers/document_compressors/chain_extract";
-export * from "langchain/retrievers/hyde";
-export * from "langchain/cache";
-export * from "langchain/stores/file/in_memory";
-export * from "langchain/experimental/autogpt";
-export * from "langchain/experimental/babyagi";
+export * from "langchain-gpt4all/agents";
+export * from "langchain-gpt4all/base_language";
+export * from "langchain-gpt4all/tools";
+export * from "langchain-gpt4all/chains";
+export * from "langchain-gpt4all/embeddings/base";
+export * from "langchain-gpt4all/embeddings/fake";
+export * from "langchain-gpt4all/embeddings/openai";
+export * from "langchain-gpt4all/llms/base";
+export * from "langchain-gpt4all/llms/openai";
+export * from "langchain-gpt4all/prompts";
+export * from "langchain-gpt4all/vectorstores/base";
+export * from "langchain-gpt4all/vectorstores/memory";
+export * from "langchain-gpt4all/vectorstores/prisma";
+export * from "langchain-gpt4all/text_splitter";
+export * from "langchain-gpt4all/memory";
+export * from "langchain-gpt4all/document";
+export * from "langchain-gpt4all/docstore";
+export * from "langchain-gpt4all/document_loaders/base";
+export * from "langchain-gpt4all/chat_models/base";
+export * from "langchain-gpt4all/chat_models/openai";
+export * from "langchain-gpt4all/chat_models/anthropic";
+export * from "langchain-gpt4all/schema";
+export * from "langchain-gpt4all/schema/output_parser";
+export * from "langchain-gpt4all/callbacks";
+export * from "langchain-gpt4all/output_parsers";
+export * from "langchain-gpt4all/retrievers/remote";
+export * from "langchain-gpt4all/retrievers/databerry";
+export * from "langchain-gpt4all/retrievers/contextual_compression";
+export * from "langchain-gpt4all/retrievers/document_compressors";
+export * from "langchain-gpt4all/retrievers/time_weighted";
+export * from "langchain-gpt4all/retrievers/document_compressors/chain_extract";
+export * from "langchain-gpt4all/retrievers/hyde";
+export * from "langchain-gpt4all/cache";
+export * from "langchain-gpt4all/stores/file/in_memory";
+export * from "langchain-gpt4all/experimental/autogpt";
+export * from "langchain-gpt4all/experimental/babyagi";
diff --git a/yarn.lock b/yarn.lock
index f4b11b6ca514..0d862fb95944 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -13876,7 +13876,7 @@ __metadata:
eslint-plugin-prettier: ^4.2.1
graphql: ^16.6.0
js-yaml: ^4.1.0
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
ml-distance: ^4.0.0
mongodb: ^5.2.0
prettier: ^2.8.3
@@ -17993,9 +17993,9 @@ __metadata:
languageName: node
linkType: hard
-"langchain@workspace:*, langchain@workspace:langchain":
+"langchain-gpt4all@workspace:*, langchain-gpt4all@workspace:langchain-gpt4all":
version: 0.0.0-use.local
- resolution: "langchain@workspace:langchain"
+ resolution: "langchain-gpt4all@workspace:langchain-gpt4all"
dependencies:
"@anthropic-ai/sdk": ^0.4.3
"@aws-sdk/client-dynamodb": ^3.310.0
@@ -24750,7 +24750,7 @@ __metadata:
resolution: "test-exports-cf@workspace:test-exports-cf"
dependencies:
"@cloudflare/workers-types": ^4.20230321.0
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
typescript: ^5.0.3
vitest: ^0.29.8
wrangler: 2.14.0
@@ -24765,7 +24765,7 @@ __metadata:
"@types/node": ^18.15.11
d3-dsv: 2
hnswlib-node: ^1.4.2
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
prettier: ^2.8.3
typescript: ^5.0.0
languageName: unknown
@@ -24779,7 +24779,7 @@ __metadata:
"@testing-library/react": ^13.4.0
"@testing-library/user-event": ^13.5.0
jest-environment-jsdom: 28.1.3
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
react: ^18.2.0
react-dom: ^18.2.0
react-scripts: 5.0.1
@@ -24796,7 +24796,7 @@ __metadata:
d3-dsv: 2
esbuild: ^0.17.18
hnswlib-node: ^1.4.2
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
prettier: ^2.8.3
typescript: ^5.0.0
languageName: unknown
@@ -24810,7 +24810,7 @@ __metadata:
"@types/node": ^18.15.11
d3-dsv: 2
hnswlib-node: ^1.4.2
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
prettier: ^2.8.3
typescript: ^5.0.0
languageName: unknown
@@ -24825,7 +24825,7 @@ __metadata:
"@types/react-dom": 18.0.11
eslint: 8.37.0
eslint-config-next: 13.3.0
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
next: 13.3.0
react: 18.2.0
react-dom: 18.2.0
@@ -24837,7 +24837,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "test-exports-vite@workspace:test-exports-vite"
dependencies:
- langchain: "workspace:*"
+ langchain-gpt4all: "workspace:*"
typescript: ^5.0.0
vite: ^4.2.0
vite-plugin-top-level-await: ^1.3.0
@@ -25378,11 +25378,11 @@ __metadata:
"typedoc-plugin-markdown@patch:typedoc-plugin-markdown@npm%3A4.0.0-next.6#./.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch::locator=langchainjs-gpt4all%40workspace%3A.":
version: 4.0.0-next.6
- resolution: "typedoc-plugin-markdown@patch:typedoc-plugin-markdown@npm%3A4.0.0-next.6#./.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch::version=4.0.0-next.6&hash=a0cf58&locator=langchainjs-gpt4all%40workspace%3A."
+ resolution: "typedoc-plugin-markdown@patch:typedoc-plugin-markdown@npm%3A4.0.0-next.6#./.yarn/patches/typedoc-plugin-markdown-npm-4.0.0-next.6-96b4b47746.patch::version=4.0.0-next.6&hash=6640e9&locator=langchainjs-gpt4all%40workspace%3A."
peerDependencies:
prettier: ">=1.8.0"
typedoc: ">=0.24.0"
- checksum: f6c8d4c2e2c3da6fa1b56f9f77668286ceb62455f6b7008921f949aca1e41fcf50987f64f13c1e809c043a6c66da8c6e0693e55f99c2a4ad2be07bb137b2f3c8
+ checksum: 82cfcf75a71de3e74812d362a58447e98d06a616336bd7e74f53f431887208e5c4c223e858a93ec75862e4b8fb107914c37aa01327ee4e53528bbb0390323ce3
languageName: node
linkType: hard