Skip to content

airfold/airlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airlang

⚡ From Zero to Monitoring LLMs in 5 minutes ⚡

Airlang

⚡ 3 components: OpenAI, Streamlit, Airfold

Install

Install requirements (ideally in a virtual environment):

pip install -r requirements.txt

Quick Start in 2 Minutes

To get started we simply need to create a workspace in Airfold and retrieve an API key. It's 100% free and takes less than a minute.

We use Airfold because it makes it so much easier to build real-time applications.

  1. Go to Airfold app and create a new workspace.

  2. Press on the "Admin" token on the sidebar and copy it. The token should look like this: aft_6eab...KQvCddV.

  3. Then simply run af config in the project folder and paste the token:

$ af config
Configuring for API URL: https://api.airfold.co
? Api key: aft_6eab8...ocvKQddV

🚀 config successfully set up!
You can manually modify it in: '/home/user/airlang/.airfold/config.yaml'
  1. Push the project to your Airfold workspace:
af push ./airfold
  1. Add the pricing data to calculate costs:
af source append prices airfold/sources/prices.csv

Feel free to navigate to the UI and see all the sources and pipes you've pushed: Airfold UI

Let's ingest 1000 rows.

Run the script main.py You will need to set API keys: OPENAI_API_KEY and AIRFOLD_API_KEY

$ OPENAI_API_KEY=sk-xxxxxxxxx \
AIRFOLD_API_KEY=aft_6eab8f...QddV \
python main.py

main.py

streamlit run dashboard.py

Run the sample dashboard app:

AIRFOLD_API_KEY=aft_6eab8f...ddV \
streamlit run dashboard.py