- Contains google cloud functions that use langchain to interact with OpenAI api calls
- Git clone ai-backend repository
https://github.com/Aidea-Hub/ai-backend.git
- Generate your API key from Open AI and set it in your env (
OPENAI_API_KEY
). Follow the guide from Open AI here.
- cd into each functions's folder and install the requirements
cd path/to/function_directory
pip install -r requirements.txt
- Run each function locally. Follow the respective function's README instructions. It should look something like:
functions-framework-python --target <function_name>
ai-backend/
├── function_1/
│ ├── README.md
│ ├── main.py
│ └── requirements.txt
├── function_2/
│ ├── README.md
│ ├── main.py
│ └── requirements.txt
└── README.md
cd path/to/function_directory
gcloud functions deploy function_name \
--runtime python310 \
--trigger-http \
--allow-unauthenticated