feat: add migrations, test scripts, and utility tools
- Add database migrations (006-028) for face recognition, identity, file_uuid - Add test scripts for ASR, face, search, processing - Add portal frontend (Tauri) - Add config, benchmark, and monitoring utilities - Add model checkpoints and pretrained model references
This commit is contained in:
26
insert_handlers.py
Normal file
26
insert_handlers.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
|
||||
with open("src/api/server.rs", "r") as f:
|
||||
content = f.read()
|
||||
|
||||
# Read new handlers
|
||||
with open("new_handlers.txt", "r") as f:
|
||||
new_handlers = f.read()
|
||||
|
||||
# Pattern: closing brace of n8n_search, blank line, start of hybrid_search
|
||||
# Use exact newlines
|
||||
pattern = r"\}\n\nasync fn hybrid_search\("
|
||||
replacement = "}\n\n" + new_handlers + "\n\nasync fn hybrid_search("
|
||||
|
||||
new_content = re.sub(pattern, replacement, content, count=1)
|
||||
|
||||
if new_content == content:
|
||||
print("Pattern not found")
|
||||
sys.exit(1)
|
||||
|
||||
with open("src/api/server.rs", "w") as f:
|
||||
f.write(new_content)
|
||||
|
||||
print("Inserted BM25 handlers")
|
||||
Reference in New Issue
Block a user