LLM Alignment and Safety Toolkit
not supported yet
not supported yet
- [Optinal] Install conda if you want to keep your system clean. Then create a conda environment.
conda create -n last python=3.8
conda activate last
create a .env file in the root directory of the project and add the following variables
DATABASE_URL=sqlite://dashboard/app.sqlite3
REDIS_URL=redis://localhost:6379/0
then go to the project directory and run the following commands
poetry install && make compile
poetry run python dashboard/main.py
If this is the first time you run the dashboard, you need to create an admin user by visiting http://127.0.0.1:8000/admin/init
For more detail, checkout Dockfile and docker-compose.yml in case I miss something.
如果遇到redis服务出错的情况,使用 sudo /etc/init.d/redis-server restart 命令重启redis
见docs/examples中,数据上传样例.xlsx
目前系统集成了数个大模型,但需要用户自行在.env文件中配置大模型的API_TOKEN。
目前不支持在UI界面中直接创建大模型,只能通过代码的方式进行创建, 创建大模型的代码参照last/llms/model/http_xxx_api_model.py,核心思路是将Http request请求进行封装。
当需要使用中文时,使用from last.services.i18n import _
代替_
,并在需要翻译的字符串前加上_
,例如:
from last.services.i18n import _
label = _('label')
之后,使用make babel
提取需要翻译的字符串,文件存储在last/services/locales/zh_CN/LC_MESSAGES/messages.po
。
修改完成后,使用make compile
编译翻译文件。