OpenThai-SystemOne
Thai and English decision model with a slot-softmax head whose request and response shape mirrors the official API, so existing SDK code can point at it.
# OpenThai-SystemOne
Open-source Thai + English **System One decision model**: a Qwen3.5-0.8B text tower whose LM head is replaced by a
**256-way slot softmax**, continued-pretrained on Thai, and trained to answer typed questions (`choice` / `score` /
`noul`) about an arbitrary *state* in a single forward pass with calibrated probabilities. The request/response contract
mirrors TypeSafe AI's `POST /v1/systemone` (Jev), so SDK code written for TypeSafe can point at this model.
## Quickstart
```bash
pip install "git+https://github.com/iapp-technology/openthai-systemone" # or: pip install openthai-systemone
```
```python
from openthai_systemone import SystemOneClient, Choice, Score, Noul
client = SystemOneClient("iapp/OpenThai-SystemOne") # CUDA, MPS or CPU
resp = client.system_one(
state={"ticket": "โดนหักเงินซ้ำสองครั้ง ขอเงินคืนด่วน โทรไปสามรอบแล้วไม่มีใครรับ"},
questions={
"department": Choice(instructions="ทีมใดควรรับผิดชอบ", criteria={"billing": "การเงิน/คืนเงิน", "technical": "ระบบใช้งานไม่ได้", "sales": None}),
"frustration": Score(instructions="ลูกค้าหงุดหงิดแค่ไหน", criteria=["ใจเย็น", "หงุดหงิดแต่สุภาพ", "โกรธมาก"]),
"refund": Noul(instructions="ลูกค้าขอเงินคืนอย่างชัดเจนหรือไม่"),
},
)
print(resp.answers["department"].choice, resp.answers["department"].probabilities)
print(resp.answers["frustration"].score, resp.answers["refund"].noul)
```
HTTP server with the same JSON contract as TypeSafe's `POST /v1/systemone`:
```bash
OPENTHAI_SYSTEMONE_MODEL=iapp/OpenThai-SystemOne uvicorn openthai_systemone.server:app --port 8000
```
Model card with benchmark tables: https://huggingface.co/iapp/OpenThai-SystemOne.
## Layout
```
openthai_systemone/ pip package: types (Choice/Score/Noul), formatting (prompt +