Metadata-Version: 2.1
Name: ivoryOS
Version: 0.1.1
Summary: an open-source Python package enabling Self-Driving Labs (SDLs) interoperability
Home-page: https://gitlab.com/heingroup/ivoryos
Author: Ivory Zhang
Author-email: ivoryzhang@chem.ubc.ca
License: MIT
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ax-platform
Requires-Dist: bcrypt
Requires-Dist: Flask-Login
Requires-Dist: Flask-Session
Requires-Dist: Flask-SocketIO
Requires-Dist: Flask-SQLAlchemy
Requires-Dist: Flask-WTF
Requires-Dist: mysqlclient==2.1.1
Requires-Dist: SQLAlchemy-Utils
Requires-Dist: openai
Requires-Dist: python-dotenv

![logo](https://gitlab.com/heingroup/ivoryos/-/blob/main/ivoryos.png)
# ivoryOS: interoperable Web UI for SDLs
ivoryOS is an open-source Python package enabling SDL interoperability. Add a web UI to SDLs anytime.
## Description
Granting SDLs flexibility and modularity makes it almost impossible to design a UI, yet it's a necessity for allowing more people to interact with it (democratisation). 
This web UI aims to ease up the control of any Python-based SDLs by displaying functions and parameters for initialized modules dynamically. 
The modules can be hardware API, high-level functions, or experiment workflow.
With the least modification of the current workflow, user can design, save and run their experiment and monitor the process. 
## AI assistant
To streamline the experimental design on SDLs, we also integrate Large Language Models (LLMs) to interpret the inspected functions and generate code according to task descriptions.

## Installation
```
pip install ivoryos
```

## Usage
In your SDL script, use `ivoryos(__name__)`. Example in [sample_code.py](https://gitlab.com/heingroup/ivoryos/-/blob/main/example/dummy_ur/dummy_deck.py)

```python
from ivoryos.app import ivoryos
ivoryos(__name__)
```


## Enable LLMs with [OpenAI API](https://github.com/openai/openai-python)
1. Create a `.env` file for `OPENAI_API_KEY`
```
OPENAI_API_KEY="Your API Key"
```
2. In your SDL script, define model, you can use any GPT models.
```python
from ivoryos.app import ivoryos
ivoryos(__name__, model="gpt-3.5-turbo")
```

## Enable local LLMs with [Ollama](https://ollama.com/)
1. Download Ollama.
2. pull models from Ollama
3. In your SDL script, define LLM server and model, you can use any models available on Ollama.
```python
from ivoryos.app import ivoryos
ivoryos(__name__, llm_server="localhost", model="llama3.1")
```

## Developing
This is a wip project.

## Authors and Acknowledgement
Ivory Zhang, Lucy Hao

Authors acknowledge all former and current Hein Lab members for their valuable suggestions. 

## License
[LICENSE](LICENSE)
