refs #740: add Few-shot management tab

This commit is contained in:
devmrko
2026-07-28 15:46:53 +09:00
parent 041ab4f287
commit 9d2c75459f
4 changed files with 336 additions and 3 deletions

View File

@@ -4,7 +4,13 @@ from pathlib import Path
import unittest
from src.poc4.qa_history import evaluate_sql, load_benchmark_questions
from src.poc4.qa_history_store import _normalize_oracle_dsn, schema_statements
from src.poc4.qa_history_store import (
REFERENCE_STATUSES,
QaHistoryStoreError,
_choice,
_normalize_oracle_dsn,
schema_statements,
)
class QaHistoryTest(unittest.TestCase):
@@ -75,6 +81,11 @@ class QaHistoryTest(unittest.TestCase):
self.assertIn("CREATE TABLE SG_AI_QA_ANSWER", statements)
self.assertIn("answer_seq NUMBER GENERATED ALWAYS AS IDENTITY", statements)
def test_few_shot_status_is_normalized_and_unknown_status_is_rejected(self) -> None:
self.assertEqual("APPROVED", _choice(" approved ", REFERENCE_STATUSES, "검색 상태"))
with self.assertRaises(QaHistoryStoreError):
_choice("LIVE", REFERENCE_STATUSES, "검색 상태")
if __name__ == "__main__":
unittest.main()