Skip to content

Aidea-Hub/ai-backend

Repository files navigation

ai-backend

  • Contains google cloud functions that use langchain to interact with OpenAI api calls

Setup

  1. Git clone ai-backend repository
https://github.com/Aidea-Hub/ai-backend.git
  1. Generate your API key from Open AI and set it in your env (OPENAI_API_KEY). Follow the guide from Open AI here.

Running locally

  1. cd into each functions's folder and install the requirements
cd path/to/function_directory
pip install -r requirements.txt
  1. Run each function locally. Follow the respective function's README instructions. It should look something like:
functions-framework-python --target <function_name>

Project Strcuture

ai-backend/
├── function_1/
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
├── function_2/
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
└── README.md

Deployment guide

cd path/to/function_directory

gcloud functions deploy function_name \
--runtime python310 \
--trigger-http \
--allow-unauthenticated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages