shipwithjev

Catalog / Tools & apps

0382GitHub

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.

iapp-technology/openthai-systemoneREADME ↗
# 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 +

Also filed under Tools & apps

  1. 0573

    Support chat: agent offered a human escalation path

    A frustrated customer hits a bot loop twice; the judge checks whether a human handoff was offered.

    everyai-com · Tools & apps

  2. 0572

    Subscription cancel: effective date is explicit

    An agent cancels a subscription; the judge checks the exact date the cancellation takes effect.

    everyai-com · Tools & apps

  3. 0571

    Sales quote: numbers match the official price list

    An agent quotes $29/seat against a price list; the judge checks the quote matches exactly.

    everyai-com · Tools & apps

  4. 0570

    Refund chat: agent stated the amount before issuing it

    A support agent issues a $42.50 refund; the judge checks the exact amount was stated before the refund was confirmed.

    everyai-com · Tools & apps