Skip to content

kevmok/node-langchain-prompt

Repository files navigation

Node.js TypeScript Text Input and Language Model Project

Demo This project is a simple Node.js TypeScript application that prompts the user to enter text, then uses the text as input for a language model.

Features

  • Takes user input using the readline-sync package
  • Utilizes the langchain package for language model processing

Installation

  1. Clone the repository:
git clone https://github.com/kevmok/node-langchain-prompt.git
  1. Navigate to the project directory
cd node-langchain-prompt
  1. Install the dependencies
#npm
npm install

#yarn
yarn

#pnpm
pnpm install

Usage

Before running the project, make sure to set the OPENAI_KEY environment variable to your OpenAI API key.

You can either set it in your terminal or create a .env file in the project root with the following content:

OPENAI_KEY=your_openai_api_key_here

Run the project:

pnpm start

The application will prompt you to enter some text. After you provide the input, the language model will process it, and the application will display the result.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published