feat(qa): add web search provider port (#60)

This commit is contained in:
2026-11-26 10:19:42 +01:00
parent 2747e857b1
commit 097164e657
20 changed files with 996 additions and 65 deletions

View File

@ -0,0 +1,9 @@
ALTER TABLE summary_qa_turns
ADD COLUMN use_web_search BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN web_search_performed BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN citations JSONB NOT NULL DEFAULT '[]'::jsonb,
ADD CONSTRAINT qa_web_search_intent CHECK (NOT web_search_performed OR use_web_search),
ADD CONSTRAINT qa_web_citations_array CHECK (jsonb_typeof(citations)='array'),
ADD CONSTRAINT qa_web_citations_count CHECK (jsonb_array_length(citations)<=16),
ADD CONSTRAINT qa_web_citations_size CHECK (octet_length(citations::text)<=65536),
ADD CONSTRAINT qa_web_citations_performed CHECK (web_search_performed OR citations='[]'::jsonb);