MakerDZ / lang-chain-test

🧠 API to search your custom data using OpenAI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🧠 AI search based on custom data

Have you ever imagined having a user experience where you can search your custom data, just like using ChatGPT? You can easily achieve this by using JavaScript. Simply input your OpenAI ChatGPT API key and custom database, and witness the magic unfold!

⚙️ Installation & Setup

clone the repository

To test the project, go to github and clone the repo.

git clone https://github.com/MakerDZ/lang-chain-test.git

install dependencies

Intall necessary dependenciese by using your favourite package manager.

npm install
yarn install
pnpm install

setup API key

Go to OpenAI dashboard, generate an API key, and then create an .env file by referring to the format in the .example.env file.

custom dataset

To search your custom data using OpenAI, you can feed your dataset into a data.txt file. Any data format is acceptable.

feel the magic

Go to the index.ts file located under the src folder and modify the arguments of the searchCustomData() function. After making the necessary changes, initiate the development query by running the dev command.

npm dev
yarn dev
pnpm dev

About

🧠 API to search your custom data using OpenAI.


Languages

Language:TypeScript 100.0%