Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.62 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.62 KB

FastAPI Backend

This is the backend API for EVA, using FastAPI and Python.

Overview

The most significant file is the GPT handler, which is responsible for handling all prompts, decoding all responses, and building the report. It can be found here. Additionally, the entire prompting behavior is configurable and can be modified by changing the values in the config directory found here.

Resources

FastAPI Docs Local DynamoDB (Part 1) Local DynamoDB (Part 2)

Local Setup

Before starting, make sure you have Python 3.9.

  1. Create a new virtual environment:

    python3 -m venv .venv
    source .venv/Scripts/activate
  2. Install the required Python libraries using pip:

    pip install -r requirements.txt
  3. Add your environment variables. For example:

    PORT=5000
    DB_REGION_NAME="us-east-1"
    DB_ACCESS_KEY_ID="..."
    DB_SECRET_ACCESS_KEY="..."
    OPENAI_API_KEY="..."
    CLIENT_ORIGIN_URL="http://localhost:3000"
    AUTH0_DOMAIN="...us.auth0.com"
    AUTH0_AUDIENCE="https://example.com"
    
  4. Run the server:

    python main.py
  5. Navigate to http://localhost:5000/docs to test that the server is working.

Cloud Deployment

This project is deployed to AWS Lambda using the serverless library. More information about how to do this will be added soon.