아바타 저장소 승격 계약을 완성
This commit is contained in:
parent
ac9b702688
commit
ccdcfcd2f5
36 changed files with 14734 additions and 222 deletions
|
|
@ -15,6 +15,7 @@ from typing import Any, AsyncIterator, Optional, Sequence
|
|||
import asyncpg
|
||||
|
||||
from .config import settings
|
||||
from .upload_storage import connected_database_target_sha256
|
||||
|
||||
# 전역 풀 핸들. main.py lifespan 에서 init/close.
|
||||
_pool: Optional[asyncpg.Pool] = None
|
||||
|
|
@ -27,6 +28,13 @@ async def _init_connection(conn: asyncpg.Connection) -> None:
|
|||
- vector(1024): pgvector. 런타임 인코딩은 RAG 경로에서 처리(여기선 텍스트 캐스트 허용).
|
||||
TODO: pgvector 바이너리 코덱 등록(register_vector) — RAG 라우터 구현 시 BGE-M3 1024d 연동.
|
||||
"""
|
||||
if settings.user_upload_manifest_required:
|
||||
actual_database_target_sha256 = await connected_database_target_sha256(conn)
|
||||
if (
|
||||
actual_database_target_sha256
|
||||
!= settings.public_runtime_db_target_sha256
|
||||
):
|
||||
raise RuntimeError("connected public runtime database target drift")
|
||||
await conn.set_type_codec(
|
||||
"jsonb",
|
||||
encoder=lambda v: json.dumps(v, ensure_ascii=False),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue