A super simple nodejs express API in TypeScript with Langchain history management and file training possibility.
Train and save your model based on provided file sources and save your history in a JSON file.
git clone
npm i
// or
yarn
npm run dev-local
Run Swagger
localhost:3400/docs
-
📁 Add files to the public/train folder (md, txt, json).
-
🏃 Start your app, and the vector store should be automatically initialized.
- History Context On each LLM call a historyId can be provided with this to stick to conversations and take them into account on LLM calls.
- Vector Store LLM can be trained by adding files (.txt, .json, .md) into the
public/train
folder and the result will be saved into thepublic/vectorStore
- File upload A FileUploadController to save files for training.
- Beautiful Code pleerock.
- Dependency Injection TypeDI.
- Clear Structure layers such as controllers, services, repositories, models, middlewares...
- Easy Exception Handling thanks to routing-controllers.
- Docker thanks to docker.
- Class-based to handle websocket events thanks to socket-controllers.
- Class-based to handle Cron Jobs thanks to cron-decorators.
- API Documentation thanks to swagger a
MIT - LICENSE NexTech-Fusion.com