🖼️ Infra ✨ Feature? ❤️🩹 Bug? 📞 Help?
Since it's compatible with OpenAI Assistants API, this is how you would integrate the client side:
![hal-9100](https://private-user-images.githubusercontent.com/25003283/292030231-77d78c9a-cc44-492a-b085-8f22e9d5e4ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTIwOTYsIm5iZiI6MTcyNDA5MTc5NiwicGF0aCI6Ii8yNTAwMzI4My8yOTIwMzAyMzEtNzdkNzhjOWEtY2M0NC00OTJhLWIwODUtOGYyMmU5ZDVlNGVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE4MjMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0ZTVmODg5MTUwNzJlNjBiNjRhNGEzMDczNDFmNTM2NGIyMjZlYjI1YjVlZGVmZTgxOGQ4ZjNiOGIwZTcwNDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kBndJvUe9VhLTydTUtD0v0R0A_3POA1R4gmp5cHHn5k)
- [2024/01/19] 🔥 Added usage w ollama. Keep reading 👇.
- [2024/01/19] 🔥 Action tool. Let your Assistant make requests to APIs.
- [2023/12/19] 🔥 New example: Open source LLM with code interpreter. Learn more.
- [2023/12/08] 🔥 New example: Open source LLM with function calling. Learn more.
- [2023/11/29] 🔥 New example: Using mistral-7b, an open source LLM. Check it out.
- Code Interpreter: Generate and runs Python code in a sandboxed environment autonomously. (beta)
- Knowledge Retrieval: Retrieves external knowledge or documents autonomously.
- Function Calling: Defines and executes custom functions autonomously.
- Actions: Execute requests to external APIs autonomously.
- Files: Supports a range of file formats.
- Enterprise production-ready:
- observability (metrics, errors, traces, logs, etc.)
- scalability (serverless, caching, autoscaling, etc.)
- security (encryption, authentication, authorization, etc.)
- You operate on a large scale and want to reduce your costs
- You want to increase your speed
- You want to increase customization (e.g. use your own models, extend the API, etc.)
- You work in a data-sensitive environment (healthcare, IoT, military, law, etc.)
- Your product does have poor internet access (military, IoT, extreme environment, etc.)
![hal-9100](https://private-user-images.githubusercontent.com/25003283/303919620-225dce60-2bc5-4489-a030-c9d865527a57.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTIwOTYsIm5iZiI6MTcyNDA5MTc5NiwicGF0aCI6Ii8yNTAwMzI4My8zMDM5MTk2MjAtMjI1ZGNlNjAtMmJjNS00NDg5LWEwMzAtYzlkODY1NTI3YTU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE4MjMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkyMDdmM2M3MTBmNjZlOTI1MjFiNjcxYTgxMjM1NWQ4OTBkMzVhNjFiMTM2MmVhNDJhYmU5Njc4MWRkOGM5MzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.m90udxoEZ8qABxydsrYSMMgreUcbyaojtLa1XfyKZD0)
HAL-9100 is in continuous development, with the aim of always offering better infrastructure for Edge LLMs. To achieve this, it is based on several principles that define its functionality and scope.
Less prompt is more
As few prompts as possible should be hard-coded into the infrastructure, just enough to bridge the gap between Software 1.0 and Software 3.0 and give the client as much control as possible on the prompts.
Edge-first
HAL-9100 does not require internet access by focusing on open source LLMs. Which means you own your data and your models. It runs on a Raspberry PI (LLM included).
OpenAI-compatible
OpenAI spent a large amount of the best brain power to design this API, which makes it an incredible experience for developers. Support for OpenAI LLMs are not a priority at all though.
Reliable and deterministic
HAL-9100 focus on reliability and being as deterministic as possible by default. That's why everything has to be tested and benchmarked.
Flexible
A minimal number of hard-coded prompts and behaviors, a wide range of models, infrastructure components and deployment options and it play well with the open-source ecosystem, while only integrating projects that have stood the test of time.
Get started in less than a minute through GitHub Codespaces:
Or:
git clone https://github.com/stellar-amenities/hal-9100
cd hal-9100
To get started quickly, let's use Anyscale API.
Get an API key from Anyscale. You can get it here. Replace in hal-9100.toml the model_api_key
with your API key.
Usage w/ ollama
- use
model_url = "http://ollama:11434/v1/chat/completions"
- set
gemma:2b
in examples/quickstart.js - and run
docker compose --profile api --profile ollama -f docker/docker-compose.yml up
Install OpenAI SDK: npm i openai
Start the infra:
docker compose --profile api -f docker/docker-compose.yml up
Run the quickstart:
node examples/quickstart.js
Is there a hosted version?
No. HAL-9100 is not a hosted service. It's a software that you can deploy on your infrastructure. We can help you deploy it on your infrastructure. Contact us.
Which LLM API can I use?
Examples of LLM APIs that does support OpenAI API-like, that you can use:
- ollama
- MLC-LLM
- FastChat (good if you have a mac)
- vLLM (good if you have a modern gpu)
- Perplexity API
- Mistral API
- anyscale
- together ai
We recommend these models:
- mistralai/Mixtral-8x7B-Instruct-v0.1
- mistralai/mistral-7b
Other models have not been extensively tested and may not work as expected, but you can try them.