azure-open-ai-embeddings-qna

(β˜… 847)

A simple web application for a OpenAI-enabled document search. This repo uses Azure OpenAI Service for creating embeddings vectors from documents. For answering the question of a user, it retrieves the most relevant document and then uses GPT-3, GPT-3.5 or GPT-4 to extract the matching answer for the question.

  • .env.template
  • .gitignore
  • BatchProcess.Dockerfile
  • BatchProcess.Dockerfile.dockerignore
  • docker-compose.yml
  • LICENSE
  • README.md
  • WebApp.Dockerfile
  • WebApp.Dockerfile.dockerignore

# Installation Guide

1. Get the code
git clone https://github.com/ruoccofabrizio/azure-open-ai-embeddings-qna

Downloads the entire project code from GitHub to your computer.

cd azure-open-ai-embeddings-qna

Moves into the project folder you just downloaded.

2. Docker

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker compose up

Builds and starts all defined containers (server, database, etc.) at once, in the background.

docker run -p 6379:6379 redis/redis-stack-server:latest

Runs the built image as an actual container.

docker run -p 7071:80 fruocco/oai-batch:latest

Runs the built image as an actual container.

docker run --env-file .env -p 8080:80 fruocco/oai-embeddings:latest

Runs the built image as an actual container.

docker build . -f Dockerfile -t your_docker_registry/your_docker_image:your_tag

Builds a runnable image based on the Dockerfile.

βœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

3. Python

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Python 3 On Windows, be sure to check 'Add Python to PATH' during installation.
python -m venv .venv

Runs the Python script (or module).

pip install -r code\requirements.txt

Installs the Python libraries listed in requirements.txt (or similar).

βœ… If it runs without errors and prints output in the terminal, it worked.

Pulled directly from this repo's README.

// repository documentation