Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

agno-agi/ai-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5a76df3 · May 23, 2024

History

16 Commits
Feb 4, 2024
May 23, 2024
Feb 4, 2024
Jan 15, 2024
Feb 4, 2024
Jan 15, 2024
Feb 27, 2024
Jan 15, 2024
Jan 15, 2024
Jan 15, 2024
Jan 15, 2024
Jan 15, 2024
Jan 15, 2024
Jan 15, 2024
May 23, 2024
May 23, 2024
Jan 15, 2024

Repository files navigation

AI API

This repo contains the code for running an AI Api in 2 environments:

  1. dev: A development environment running locally on docker
  2. prd: A production environment running on AWS ECS

Setup Workspace

  1. Clone the git repo

from the ai-api dir:

  1. Create + activate a virtual env:
python3 -m venv aienv
source aienv/bin/activate
  1. Install phidata:
pip install phidata
  1. Setup workspace:
phi ws setup
  1. Copy workspace/example_secrets to workspace/secrets:
cp -r workspace/example_secrets workspace/secrets
  1. Optional: Create .env file:
cp example.env .env

Run Api locally

  1. Install docker desktop

  2. Set OpenAI Key

Set the OPENAI_API_KEY environment variable using

export OPENAI_API_KEY=sk-***

OR set in the .env file

  1. Start the workspace using:
phi ws up

Open localhost:8000/docs to view the FastApi docs.

  1. Stop the workspace using:
phi ws down

Next Steps: