0.2.7 • Published 9 months ago
@beparallel/langchain-ts v0.2.7
@beparallel/langchain-ts
A TypeScript tool for extracting Langchain prompts and generating corresponding TypeScript types.
Features
- Extracts prompts from Langchain Hub
- Generates TypeScript interfaces for prompt inputs and outputs
- Automatically handles JSON schema conversion
- Command-line interface for easy integration
Installation
- Install the package
pnpm i @beparallel/langchain-ts- Set the environment variables in your
.envfile
LANGCHAIN_API_KEY=your_api_key
LANGCHAIN_TAG=your_tag- Set up the script in your
package.jsonfile
"scripts": {
...
"prompt:generate": "dotenv -f .env.* run -- npx langchain-types --file=X"
}Where X = the path to the file where you want to save the types.
- Run the script
pnpm prompt:generateContributing
Installation
pnpm iUsage
- Add the environment variables in your
.envfile
LANGCHAIN_API_KEY=your_api_key
LANGCHAIN_TAG=your_tag- Export them
export LANGCHAIN_API_KEY=your_api_key
export LANGCHAIN_TAG=your_tag- Run the script
pnpm prompt:generateRelease
- Update the version in the
package.jsonfile. - Run the following command to update the types.
pnpm prepublish- Run npm publish command
npm publish --access public- Commit and push the changes.
- Create a new release on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.
0.2.7
9 months ago
0.2.6
10 months ago
0.2.5
10 months ago
0.2.4
10 months ago
0.2.3
10 months ago
0.2.2
10 months ago
0.2.1
10 months ago
0.2.0
10 months ago
0.1.8
10 months ago
0.1.7
10 months ago
0.1.6
10 months ago
0.1.5
10 months ago
0.1.4
10 months ago
0.1.3
10 months ago
0.1.2
10 months ago
0.1.1
10 months ago
0.1.0
10 months ago