Run your own AI
Project description
ownAI
With ownAI you can run your own AIs.
ownAI is an open-source platform written in Python using the Flask framework. It allows you to host and manage AI applications with a web interface for interaction. ownAI supports the customization of AIs for specific use cases and provides a flexible environment for your AI projects.
Table of Contents
- Features
- Quick start
- Installation
- Production setup
- Development setup
- Usage
- AI files
- Contributing
- License
Features
- Host and manage AI applications
- Web-based interface for interacting with AI models
- Support for AI customization to suit specific needs
- Create and manage additional knowledge for AIs
- Open-source and community-driven
Quick start
To get started quickly, clone this repository to your Linux server and execute:
./ownai-server.sh
This will guide you through the installation process and start the server. For a detailed installation guide, please refer to the following section.
Installation
ownAI requires Python 3.8 or higher. To install and set up ownAI, follow these steps:
- Clone the repository:
git clone https://github.com/own-ai/ownAI.git
- Enter the project directory:
cd ownAI
- Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
-
Configure the server by copying the
.env.templatefile to.envand then editing the.envfile. -
Initialize the database:
flask init-db
- Register a new user:
flask add-user
- Start the server:
flask run
Now, you should be able to access the ownAI web interface at http://localhost:5000.
Production setup
For a production setup, we recommend using a WSGI server such as Gunicorn. If you followed the steps above, Gunicorn is already installed in your virtual environment. To start the server, run:
gunicorn -b 0.0.0.0:5000 --worker-class geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 "backaind:create_app()"
We recommend using a reverse proxy such as nginx to handle HTTPS.
Development setup
If you want to contribute to the ownAI frontend, you can set up a development environment as follows:
- Install Node.js and npm.
- Install the frontend dependencies:
npm install
- Start the development server (this already includes starting the Flask backend server):
npm run dev
Usage
To start interacting with your own AI, visit the web interface at http://localhost:5000 and follow these steps:
-
Log in using the credentials you set up during installation.
-
Click on the ownAI logo in the upper left corner to open the main menu.
-
Choose "AI Workshop" and click the "New AI" button.
-
Load an Aifile (see below for details and in the examples directory for examples).
-
Optionally customize the AI to suit your needs.
-
Optionally select "Knowledge" from the main menu to upload additional knowledge (if your AI chain supports it).
-
Select "Interaction" from the main menu and enter your input text or data in the provided input box.
AI files
ownAI uses .aifile files to store and load the specification and configuration of AIs.
In the examples directory you can find many different examples to run various AI models locally or to use external providers.
Please also refer to the readme file in the examples directory.
If you want to get started quickly and run your AIs by yourself, please have a look at the ctransformers, gpt4all and huggingface_pipeline examples. These allow you to run your own AIs on your machine with little or no further setup.
If you want to create your own aifiles, have a look at the aifilemaker.py script, which you can use as a starting point.
Contributing
We welcome contributions from the community. To contribute, please:
- Fork the repository
- Create a new branch for your feature or bugfix
- Commit your changes
- Open a pull request
Please follow the coding style guidelines and ensure your changes are well-documented. Thank you very much for your contribution!
License
ownAI is released under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ownAI-0.2.0.tar.gz.
File metadata
- Download URL: ownAI-0.2.0.tar.gz
- Upload date:
- Size: 262.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed1e1b96d0896f0e9f9234dc4eaac3dc1a809876aad11eaeb9827560ef9fcc5b
|
|
| MD5 |
69990be61356cc5da62bb153be17b167
|
|
| BLAKE2b-256 |
9c52731bfed68a682a8d55ca8857321f41bf10cfd8a1f140fb358426b963c8b9
|
File details
Details for the file ownAI-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ownAI-0.2.0-py3-none-any.whl
- Upload date:
- Size: 257.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e10156d695bd3d7ecb2a62dbc633b01646708c6ddfce0446c9beef8b89a96461
|
|
| MD5 |
5431749156de6af2958afaaa0a4145e8
|
|
| BLAKE2b-256 |
776bb7657f1e4b7bf442fede32c75d7f5eae396f2a0956e92c97620386a6f694
|