47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.7 KiB
1.7 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| embedding_store_sqlvec | function | py | infra | 1.0.0 | impure | def embedding_store_sqlvec(db_path: str, table: str, ids: list, embeddings: list, dim: int = 384) -> int | Inserta embeddings en tabla sqlite-vec. Crea la tabla virtual si no existe. Insercion en batches. |
|
false | error_go_core |
|
|
int: cantidad de vectores insertados | false | python/functions/embedding/sqlvec.py |
Ejemplo
model = embedding_load_model(".local/models/e5-small")
docs = ["La IA transforma la industria", "Python es versatil"]
embs = embedding_encode(model, docs, mode="document")
n = embedding_store_sqlvec("vectors.db", "doc_embeddings", [0, 1], embs)
# n = 2
Notas
Usa sqlite-vec (extension pura C para SQLite). Los vectores se almacenan como blobs float32. Compatible con cualquier SQLite — se puede usar el mismo archivo para metadata con tablas normales. Insercion en batches de 500 para evitar limits de SQLite. Para 50k vectores dim=384: ~75 MB en disco, busqueda ~19ms/query.