Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

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.

Installation

$ npm install
$
$ cd ./nestjs-text-summarization
$ npm install
$
$ cd ../ng-text-summarization-app
$ npm install

Environment variables

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

Running the app in Docker

  • Copy .env.docker.example to .env
  • Update the environment variables in .env
$ cp .env.docker.example .env
$ docker-compose up -d

Test APIs

Launch Angular App

  • Open the browser and navigate to http://localhost:4200
  • Use the simple UI to input a web page URL to generate text summarization