From 17dff31dec8d9887eaf40d170178a45c4fbbcfc2 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 4 Jun 2026 13:05:23 +0700 Subject: [PATCH] 690604:1305 ADR-034-134 #08.1 [skip CI] --- .gitea/workflows/ci-deploy.yml | 1 + .../04-00-docker-compose/Desk-5439/ocr-sidecar/app.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index da7a1e0a..b8966194 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -13,6 +13,7 @@ jobs: build: runs-on: self-hosted timeout-minutes: 15 + if: "!contains(github.event.head_commit.message, '[skip CI]')" steps: - name: Checkout (HTTPS) uses: actions/checkout@v4 diff --git a/specs/04-Infrastructure-OPS/04-00-docker-compose/Desk-5439/ocr-sidecar/app.py b/specs/04-Infrastructure-OPS/04-00-docker-compose/Desk-5439/ocr-sidecar/app.py index 6ea53483..c1a5d4f9 100644 --- a/specs/04-Infrastructure-OPS/04-00-docker-compose/Desk-5439/ocr-sidecar/app.py +++ b/specs/04-Infrastructure-OPS/04-00-docker-compose/Desk-5439/ocr-sidecar/app.py @@ -12,6 +12,7 @@ # - 2026-06-04: ADR-034 — เพิ่ม typhoon-np-dms-ocr เป็น canonical engine key; default TYPHOON_OCR_MODEL เปวน typhoon-np-dms-ocr:latest; alias โมเดลเก่ายังคงไว้ # - 2026-06-04: ให้ SYSTEM ใน Modelfile ทำงานแทน — ลบ prompt ซ้าซ้อน; sync options ให้ตรงกับ Modelfile (temperature 0.1, top_p 0.1, repeat_penalty 1.1) # - 2026-06-04: รับค่า temperature/top_p/repeat_penalty จาก frontend sandbox ได้ (optional override) +# - 2026-06-04: แก้ bug prompt="" ทำให้ Ollama ไม่ generate — เปลี่ยนเป็น minimal trigger prompt # - 2026-06-02: เพิ่มการตรวจสอบ API Key (X-API-Key Header) สำหรับ endpoints หลัก เพื่อความมั่นคงปลอดภัยตามข้อเสนอแนะ Code Review import os @@ -224,7 +225,7 @@ def process_with_typhoon_ocr(pil_image: Image.Image, options_override: dict = {} } payload = { "model": model_name, - "prompt": "", + "prompt": "Extract all text from this image.", "images": [image_base64], "stream": False, "options": options,