A progressive Node.js framework for building efficient and scalable server-side applications.
This repo uses NestJS, Angular, LangChain, and AI models to build a fullstack application to summarize a web page.
The NestJS application register the following LangChain integration:
- LangChain + Gemini API + Gemini-1.5-Pro model
Google Cloud credits are provided for this project. #GeminiSprint.
$ npm install
$
$ cd ./nestjs-text-summarization
$ npm install
$
$ cd ../ng-text-summarization-app
$ npm install
Name | Description |
---|---|
PORT | Backend Port. Default to3000 |
GOOGLE_GEMINI_API_KEY | Google Gemini API Key |
GOOGLE_GEMINI_MODEL | Google Gemini model. Default gemini-pro |
WEB_PORT | Angular Port number |
- Copy
.env.docker.example
to.env
- Update the environment variables in
.env
$ cp .env.docker.example .env
$ docker-compose up -d
- Open the browser and navigate to http://localhost:3000/api
- Test the API in Swagger
- Open the browser and navigate to http://localhost:4200
- Use the simple UI to input a web page URL to generate text summarization