10000 GitHub - assistancechat/assistance
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

assistancechat/assistance

Repository files navigation

Assistance

The Python AI assistance library.

Installation

WASI Python Sandbox

Install wasmtime:

curl https://wasmtime.dev/install.sh -sSf | bash

Download python.wasm:

wget https://github.com/assistancechat/assistance/releases/download/python-wasm/python-3.11.1.wasm -O ~/.assistance/wasm/python.wasm

Test that it works:

wasmtime \
  --env PYTHONPATH=/assistance:/assistance/.venv/lib/python3.11/site-packages \
  --mapdir /assistance::$HOME/git/assistance \
  ~/.assistance/wasm/python.wasm \
  -- -c "print('hello world!')"

Acknowledgment to https://wasmlabs.dev/articles/python-wasm32-wasi/ where much of the above was inspired from.

Server Hosting

Supervisor

First time setup of supervisor:

sudo ln -s $HOME/git/assistance/dev/server/supervisor.conf /etc/supervisor/conf.d/assistance.conf
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status assistance

Restart supervisorctl

sudo supervisorctl restart assistance

Nginx

First time setup of nginx:

sudo ln -s $HOME/git/assistance/dev/server/nginx-site.conf /etc/nginx/sites-enabled/assistance
sudo nginx -s reload

Notes

Dev Tooling

Poetry Python version

poetry env use $(which python)

Sync data locally

rsync -r assistance:~/.assistance/* ~/.assistance/
rsync -r server:~/.assistance/* ~/.assistance/

Jupyter

poetry run python -m ipykernel install --user --name assistance
jupyter lab --ip=10.0.0.163

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  
0