Created
June 7, 2024 06:25
-
-
Save glorat/4a1d2dcaaa4259ff38092085dd1762c4 to your computer and use it in GitHub Desktop.
Upgrade a typescript project to langchain v0.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { updateEntrypointsFrom0_x_xTo0_2_x } from "@langchain/scripts/migrations"; | |
const pathToMyProject = "./functions/src"; // This path is used in the following glob pattern: `${projectPath}/**/*.{ts,tsx,js,jsx}`. | |
updateEntrypointsFrom0_x_xTo0_2_x({ | |
projectPath: pathToMyProject, | |
tsConfigPath: "tsconfig.json", // Path to the tsConfig file. This will be used to load all the project files into the script. | |
// testRun: true, // If true, the script will not save any changes, but will log the changes that would be made. | |
shouldLog: true, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment