Quickstart
Last updated
Last updated
Be sure to complete the installation instructions before continuing with this guide.
Before starting AIOS, you need to make sure you have installed the LLM backends that you would like to run. Here are the LLM providers for supported backends for AIOS.
Providers | Completion | Function-calling |
---|---|---|
After installling LLM backends, multiple API keys may be required to set up. Here we provide the easier way to set up API API keys, you can create the .env file and set up the required keys and add new keys based on your needs.
To start the AIOS, one way is to setup the aios_config.json as the following:
Another way is to pass arguments to commands in the terminal, which are shown below.
You need to get your OpenAI API key from https://platform.openai.com/api-keys. Then set up your OpenAI API key as an environment variable
Then run main.py with the models provided by OpenAI API
You need to get your Gemini API key from https://ai.google.dev/gemini-api
Then run main.py with the models provided by OpenAI API
If you want to use open-sourced models provided by huggingface, here we provide three options: * Use with ollama * Use with vllm * Use with native huggingface models
You need to download ollama from from https://ollama.com/.
Then you need to start the ollama server either from ollama app
or using the following command in the terminal
To use models provided by ollama, you need to pull the available models from https://ollama.com/library
ollama can support CPU-only environment, so if you do not have CUDA environment
You can run aios with ollama models by
However, if you have the GPU environment, you can also pass GPU-related parameters to speed up using the following command
Some of the huggingface models require authentification, if you want to use all of the models you need to set up your authentification token in https://huggingface.co/settings/tokens and set up it as an environment variable using the following command
You can run with the
By default, huggingface will download the models in the ~/.cache directory. If you want to designate the download directory, you can set up it using the following command
If you want to speed up the inference of huggingface models, you can use vllm as the backend.
Note
It is important to note that vllm currently only supports linux and GPU-enabled environment. So if you do not have the environment, you need to choose other options.
Considering that vllm itself does not support passing designated GPU ids, you need to either setup the environment variable,
Then run the command
or you can pass the CUDA_VISIBLE_DEVICES as the prefix
OpenAI
✅
✅
Anthropic
✅
✅
Google-vertex-ai
✅
✅
vllm
✅
✅
ollama
✅
✅
huggingface
✅
Grok AI
✅
✅