Skip to content

Commit

Permalink
docs: Update installation steps for AIOS Kernel and SDK (#429)
Browse files Browse the repository at this point in the history
* Fix

* Feat: Prioritize API Key from Config File

Problem: The system was using environment variables for API keys.
Solution: Changed the code to first check the config file for API keys. If not found, it falls back to environment variables.
Impact: Ensures API keys are managed centrally in the config file, improving flexibility and control.

* Update adapter.py

* fix: use PR code instead of main branch in workflow

Before: Workflow always used main branch code
After: Workflow uses PR code when testing PR

* Update test_ollama.yml

* Update test_ollama.yml

* Update test_ollama.yml

* Update README: Add AIOS Refresh Command

* feat: Add dynamic LLM configuration support in AIOS kernel

# Description
This PR enables AIOS kernel to dynamically handle LLM configurations from users, allowing:

1. Dynamic API key updates for different LLM providers
2. Runtime configuration refresh without restart
3. Secure API key management

## Changes
- Added config update endpoint in kernel
- Added configuration refresh mechanism
- Updated environment variable handling

* Update kernel.py

* Fix:LLM API Key Error Handling

## What's Changed
- Added proper error handling for invalid API keys
- Fixed response parsing for LiteLLM completion calls
- Added HTTP status codes for different error types:
  - 402 for API key issues
  - 500 for other errors

* feat:Improve API Key Error Handling

- Added API key masking in error messages (e.g., "ab****12")

* docs: Update installation steps for AIOS Kernel and SDK
  • Loading branch information
XiangZhang-zx authored Jan 23, 2025
1 parent 69f0e48 commit 6290c60
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ When no environment variables are set, the following API keys will be shown:
- `HF_AUTH_TOKEN`: HuggingFace authentication token for accessing models
- `HF_HOME`: Optional path to store HuggingFace models



#### Installation from source

##### Step 1: Install AIOS Kernel
Git clone AIOS kernel
```bash
git clone https://github.com/agiresearch/AIOS.git
Expand All @@ -224,6 +228,13 @@ or else you can install the dependencies using
pip install -r requirements.txt
```

##### Step 2: Install AIOS SDK (Cerebrum)
1. Clone the Cerebrum repository and install:
```bash
git clone https://github.com/agiresearch/Cerebrum.git
cd Cerebrum && pip install -e .
```

**Note**: The machine where the AIOS kernel (AIOS) is installed must also have the AIOS SDK (Cerebrum) installed. Installing AIOS kernel will install the AIOS SDK automatically by default. If you are using the Local Kernel mode, i.e., you are running AIOS and agents on the same machine, then simply install both AIOS and Cerebrum on that machine. If you are using Remote Kernel mode, i.e., running AIOS on Machine 1 and running agents on Machine 2 and the agents remotely interact with the kernel, then you need to install both AIOS kernel and AIOS SDK on Machine 1, and install the AIOS SDK alone on Machine 2. Please follow the guidelines at [Cerebrum](https://github.com/agiresearch/Cerebrum) regarding how to install the SDK.

### Quickstart
Expand Down

0 comments on commit 6290c60

Please sign in to comment.