

PromethAI Backend
136 15What is PromethAI ?
PromethAI is a Python-based AGI project that recommends choices based on a user’s goals and preferences and can modify its recommendations based on user feedback.
Our focus is currently on food, but the system is extendible to any area.
PromethAI Features
-
Optimized for Autonomous Agents
-
Personalized for each user
-
Introduces decision trees to help user navigate and decide on a solution
-
Runs asynchronusly
-
For App builds, check out this repo promethAI-GUI
-
Supports automating tasks and executing decisions
-
Multiple Vector DBs supported trough Langchain
-
Low latency
-
Easy to use
-
Easy to deploy
💻 Demo
🛣 Architecture
🛣 Roadmap
⚙️ Setting up
-
Download the repo using
git clone https://github.com/topoteretes/PromethAI-Backend-Backend.git
in your terminal or directly from github page in zip format. -
Navigate to the directory using
cd PromethAI-Backend
and create a copy of.env.template
and name it.env
. -
Enter your unique OpenAI API Key, Google key, Custom search engine ID without any quotes or spaces in
.env
file. Follow the links below to get your keys:
Keys | Accessing the keys |
---|---|
OpenAI API Key | Sign up and create an API key at OpenAI Developer |
Pinecone API Key | Sign up and create an API key at Pinecone.io |
Google API key | Create a project in the Google Cloud Console and enable the API you need (for example: Google Custom Search JSON API). Then, create an API key in the “Credentials” section. |
Custom search engine ID | Visit Google Programmable Search Engine to create a custom search engine for your application and obtain the search engine ID. |
-
Ensure that Docker and Docker Compose are installed in your system, if not, Install it from here.
-
Once you have Docker Desktop running, run command :
docker-compose up promethai --build
in promethai directory. Open your browser and go tolocalhost:3000
to see promethAI running.
Resources
Papers like “Generative Agents: Interactive Simulacra of Human Behavior”
Quick start
Make sure to add your credentions in the .env file. Launch the app with:
docker-compose build promethai && docker-compose up promethai
How it Works
Here is what happens everytime the AI is queried by the user:
-
AI vectorizes the query and stores it in a Pinecone Vector Database
-
AI looks inside its memory and finds memories and past queries that are relevant to the current query
-
AI thinks about what action to take
-
AI stores the thought from Step 3
-
Based on the thought from Step 3 and relevant memories from Step 2, AI generates an output
-
AI stores the current query and its answer in its Pinecone vector database memory
How to use
docker-compose build promethai
- Access the API by doing CURL requests, example:
curl -X POST "http://0.0.0.0:8000/data-request" -H "Content-Type: application/json" --data-raw
Example of available endpoint
The available endpoint:
POST request to '/recipe-request' endpoint that takes a JSON payload containing 'user_id', 'session_id', 'factors' keys, and returns a JSON response with a 'response' key.
All endpoints receive a payload in JSON format and return a response in JSON format.
Example of curl requests
curl --location --request POST 'http://0.0.0.0:8000/recipe-request' \
--header 'Content-Type: application/json' \
--data-raw '{
"payload": {
"user_id": "659",
"session_id": "459",
"model_speed":"slow",
"prompt":"I would like a healthy chicken meal over 125$"
}
}'