Skip to content

janyewest/delta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SOW Solution Recommender

An AI-powered consulting strategist tool that matches new client needs to past Statements of Work (SOWs) and generates solution recommendations. Built with FastAPI, Supabase, OpenAI, and Streamlit.

Features

  • Match client prompts to similar past SOWs using embeddings
  • Generate 2–3 tailored tech solution suggestions via GPT-4o model
  • Save suggestions to Supabase table
  • Export recommendations as a TXT file
  • Simple, clean Streamlit UI

Project Structure

consulting-app/
├─ main/
   ├── .env                 # Environment variables (not committed)
   ├── __init__.py
   ├── app.py               # FastAPI backend with API endpoints
   ├── run.sh               # Shell exe
   ├── seed_db.py           # Script to generate and store embeddings
   ├── streamlit_app.py     # Streamlit frontend UI
   ├── requirements.txt     # Python dependencies

└── static/          # Supabase schema and data tables
   ├── supabase_schema_ddl.sql
└── .gitignore
└── README.md

Setup Instructions

1. Environment Setup

git clone https://github.com/your-repo/sow-recommender
cd sow-recommender
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Environment Variables

Create a .env file with:

OPENAI_API_KEY=your_openai_key
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_or_service_role_key
SUPABASE_POSTGRES_URL=postgresql://user:pass@host:port/dbname

3. Database

Use static/database/supabase_schema_ddl.sql to ensure you’ve created the following tables in your Supabase PostgreSQL instance:

-- consulting.sows, consulting.clients, consulting.solutions
-- Plus:
CREATE TABLE consulting.embeddings (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  sow_id UUID UNIQUE REFERENCES consulting.sows(id) ON DELETE CASCADE,
  embedding BYTEA
);

CREATE TABLE consulting.saved_suggestions (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  prompt TEXT,
  suggestions TEXT[]
);

4. Seed Embeddings

python seed_db.py

5. Run Shell script

./run.sh

Example Prompt

We need to integrate multiple hospital data sources
 into a unified analytics platform on the cloud.

To-Do / Ideas

•	Deploy FastAPI + Streamlit online
•	Add user login and project history
•	Support multi-SOW report generation
•	Add confidence score visualizations

Powered By

•	FastAPI
•	Streamlit
•	OpenAI
•	Supabase

Releases

No releases published

Packages

 
 
 

Contributors