SeaTable AI 是一个 SeaTable 扩展,它将 AI 功能集成到 SeaTable 中。部署 SeaTable AI 允许用户在 SeaTable 中执行基于 AI 的自动化步骤。
截止目前,支持以下类型的自动化步骤:
- 总结
- 分类
- OCR
- 提取
- 针对单个用例进行自定义
与Seatable 服务在同一台机器部署
注意:SeaTable AI 需要 SeaTable 6.0
部署 SeaTable AI 的最简单方法是将其部署在与 SeaTable Server 相同的主机上。
修改 .env 文件
要安装 SeaTable AI,请在.env文件的COMPOSE_FILE变量中包含seatable-ai.yml。这指示 Docker-Compose 包含seatable-ai服务。
在.env中添加 SeaTable AI 服务器配置:
vim .env
COMPOSE_FILE='.....,seatable-ai.yml'
ENABLE_SEATABLE_AI=true
SEATABLE_AI_SERVER_URL=http://seatable-ai:8888
LLM 配置
SeaTable AI 将结合使用人工智能功能和大型语言模型 (LLM) 服务。
为了保证 SeaTable AI 功能的高效使用,您需要选择一个大型的多模态模型。这要求所选模型支持图像输入和识别(例如,将 OCR 作为自动化的一部分运行)。
以下部分展示了最流行的托管 LLM 服务所需的配置设置。这些必须在.env文件中配置:
#openAISEATABLE_AI_LLM_TYPE=openaiSEATABLE_AI_LLM_KEY=<your openai LLM access key>SEATABLE_AI_LLM_MODEL=gpt-4o-mini# recommended
#deepseekSEATABLE_AI_LLM_TYPE=deepseekSEATABLE_AI_LLM_KEY=<your LLM access key>SEATABLE_AI_LLM_MODEL=deepseek-chat# recommended
#Azure OpenAISEATABLE_AI_LLM_TYPE=azureSEATABLE_AI_LLM_URL=# your deployment url, leave blank to use default endpointSEATABLE_AI_LLM_KEY=<your API key>SEATABLE_AI_LLM_MODEL=<your deployment name>
#OllamaSEATABLE_AI_LLM_TYPE=ollamaSEATABLE_AI_LLM_URL=<your LLM endpoint>SEATABLE_AI_LLM_KEY=<your LLM access key>SEATABLE_AI_LLM_MODEL=<your model-id>
#HuggingFaceSEATABLE_AI_LLM_TYPE=huggingfaceSEATABLE_AI_LLM_URL=<your huggingface API endpoint>SEATABLE_AI_LLM_KEY=<your huggingface API key>SEATABLE_AI_LLM_MODEL=<model provider>/<model-id>
#Self-Hosted Proxy ServerSEATABLE_AI_LLM_TYPE=proxySEATABLE_AI_LLM_URL=<your proxy url>SEATABLE_AI_LLM_KEY=<your proxy virtual key># optionalSEATABLE_AI_LLM_MODEL=<model-id>
#qwenSEATABLE_AI_LLM_TYPE=dashscopeSEATABLE_AI_LLM_URL=...SEATABLE_AI_LLM_KEY=...SEATABLE_AI_LLM_MODEL=...
#otherSEATABLE_AI_LLM_TYPE=otherSEATABLE_AI_LLM_URL=...SEATABLE_AI_LLM_KEY=...SEATABLE_AI_LLM_MODEL=...如果使用其他模型,您应该将SEATABLE_AI_LLM_TYPE设置为other或openai,并根据需要设置其他 LLM 配置。
如果要使用OCR功能,需要在seatable_ai的镜像seatable_ai_settings.py配置中添加类似如下配置:
OCR_SERVICE_URL = 'https://aip.baidubce.com'
OCR_SERVICE_API_KEY = '****'
OCR_SERVICE_SECRET_KEY = '*****'
下载 SeaTable AI 镜像并重启
下载 SeaTable AI 镜像并重启 SeaTable 服务
cd/opt/seatable
dockercomposeup-d
现在可以使用 SeaTable AI。
单独部署seatable AI
下载 Seatable AI 文件
SeaTable AI 配置
以下部分概述了一个 .env文件,其中包含运行seatable-ai所需的设置。这些更改应该在/opt/seatable/.env
中进行:
COMPOSE_FILE='seatable-ai-standalone.yml'COMPOSE_PATH_SEPARATOR=','
# system settingsTIME_ZONE='Europe/Berlin'
# databaseMARIADB_HOST=MARIADB_PORT=3306MARIADB_PASSWORD=
# redisREDIS_HOST=REDIS_PORT=6379REDIS_PASSWORD=
# This private key must have the same value as the JWT_PRIVATE_KEY variable on other SeaTable nodesJWT_PRIVATE_KEY=
# Public URL of your SeaTable serverSEATABLE_SERVER_URL=https://seatable.your-domain.com
# Cluster-internal URL of dtable-serverINNER_DTABLE_SERVER_URL=http://dtable-server:5000
# Cluster-internal URL of dtable-dbINNER_DTABLE_DB_URL=http://dtable-db:7777
# LLMSEATABLE_AI_LLM_TYPE=SEATABLE_AI_LLM_URL=SEATABLE_AI_LLM_KEY=SEATABLE_AI_LLM_MODEL=注意:默认情况下不公开端口。默认情况下,dtable-server(5000) 和dtable-db(7777) 的端口不会向主机公开。这需要在.yml文件中进行手动更改。
启动 SeaTable AI
您现在可以通过在终端中运行以下命令来启动 SeaTable AI
cd/opt/seatable
dockercomposeup-d
SeaTable 服务器的配置
因为seatable-ai现在在单独的主机或虚拟机上运行,必须在.env文件运行seatable-server容器
ENABLE_SEATABLE_AI=trueSEATABLE_AI_SERVER_URL='http://seatable-ai.example.com:8888'重新启动 seatable-server服务并测试您的 SeaTable AI
cd/opt/seatable
dockercomposeup-d
AI Token定价
AI 点数作为衡量 SeaTable 中 AI 相关使用情况的内部单位。它们根据每个 AI 模型的配置价格,直接与使用基于 AI 的功能消耗的Token数量相关联。
SeaTable 通过在用户角色上配置ai_credit_per_user选项,支持基于角色的 AI 信用额度。
组织用户的ai_credit_per_user :AI 点数在 SeaTable 组织内的所有用户之间共享。点数总数可以通过将ai_credit_per_user值乘以团队用户数量来计算。例如: 将ai_credit_per_user设置为 2将允许拥有 10 名成员的团队总共拥有 20 个 AI 点数。
价格设置
为了准确跟踪用户和组织使用的 AI 点数数量,您必须在 /opt/seatable-server/seatable/conf/dtable_web_settings.py
中配置Token定价。这可以通过配置AI_PRICE变量来实现,该变量是一个字典,将模型标识符(例如gpt-4o-mini)映射到每千个Token 的Token定价
AI_PRICES={
"gpt-4o-mini":{
"input_tokens_1k":0.01827,# price / 1000 tokens
"output_tokens_1k":0.07309# price / 1000 tokens
},}模型标识符:字典键必须与所选 AI 模型的确切值匹配,该值是通过 .env文件中的SEATABLE_AI_LLM_MODEL变量配置的。如果不匹配,AI 使用量将不计入任何配置的信用额度!