Skip to content

andreaslanderer/gpt-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

This repository contains a simple microservice providing a REST-API to demonstrate a use case utilizing OpenAI's GPT. The user has the possibility to provide background data as PDFs and ask questions based on the data inside the documents.

Getting started

Requirements

Make sure you have the following software installed:

  • Node 18.12.1 or above
  • NPM 9.1.2 or above
  • Postman App (optional)

Local Setup

Before you can start the service, you need to install all dependencies:

npm i

Since I'm using Redis as vector store you need to install it locally. The easiest way to do so is to use docker:

docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest

Before you can run the service, you need to set the following environment variables:

export OPENAI_API_KEY=<your-api-key>
echo $OPENAI_API_KEY

Afterwards, you can run the software

npm start

Testing

You can import the Postman collection into your local Postman app to test the API calls.

About

A simple use case to answer questions based on your own documents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors