Skip to content

Commit

Permalink
Merge pull request #721 from hwchase17/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
nfcampos authored Apr 10, 2023
2 parents 2a6d4be + 5b8cef3 commit f71acf4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
13 changes: 13 additions & 0 deletions docs/docs/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ This applies to all imports from the following 6 modules, which have been split

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";`

## Unsupported: Node.js 16

We do not support Node.js 16, but if you still want to run LangChain on Node.js 16, you will need to follow the instructions in this section. We do not guarantee that these instructions will continue to work in the future.
Expand Down
2 changes: 1 addition & 1 deletion langchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langchain",
"version": "0.0.52-0",
"version": "0.0.52",
"description": "Typescript bindings for langchain",
"type": "module",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions langchain/src/chains/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const loadChainFromFile: FileLoader<BaseChain> = async (
* @example
* Loading from LangchainHub:
* ```ts
* import { loadChain } from "langchain/chains";
* import { loadChain } from "langchain/chains/load";
* const chain = await loadChain("lc://chains/hello-world/chain.json");
* const res = await chain.call({ topic: "my favorite color" });
* ```
*
* @example
* Loading from local filesystem:
* ```ts
* import { loadChain } from "langchain/chains";
* import { loadChain } from "langchain/chains/load";
* const chain = await loadChain("/path/to/chain.json");
* ```
*/
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/llms/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { parseFileConfig } from "../util/parse.js";
*
* @example
* ```ts
* import { loadLLM } from "langchain/llms/openai";
* import { loadLLM } from "langchain/llms/load";
* const model = await loadLLM("/path/to/llm.json");
* ```
*/
Expand Down
4 changes: 2 additions & 2 deletions langchain/src/prompts/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const loadPromptFromFile: FileLoader<BasePromptTemplate> = (text, path) =>
* @example
* Loading from LangchainHub:
* ```ts
* import { loadPrompt } from "langchain/prompts";
* import { loadPrompt } from "langchain/prompts/load";
* const prompt = await loadPrompt("lc://prompts/hello-world/prompt.yaml");
* ```
*
* @example
* Loading from local filesystem:
* ```ts
* import { loadPrompt } from "langchain/prompts";
* import { loadPrompt } from "langchain/prompts/load";
* const prompt = await loadPrompt("/path/to/prompt.json");
* ```
*/
Expand Down

1 comment on commit f71acf4

@vercel
Copy link

@vercel vercel bot commented on f71acf4 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.