Store training tip embeddings in column (attachment=False)
Binary fields default to attachment storage in Odoo 19, but FAISS embedding vectors need to be loaded in bulk via direct SQL for performance. Using attachment=False stores them in the table column. Made-with: Cursor
This commit is contained in:
@@ -24,7 +24,7 @@ class EncoachTrainingTip(models.Model):
|
||||
string="Category",
|
||||
)
|
||||
content = fields.Text(required=True)
|
||||
embedding = fields.Binary(string="FAISS Embedding Vector")
|
||||
embedding = fields.Binary(string="FAISS Embedding Vector", attachment=False)
|
||||
|
||||
def action_compute_embeddings(self):
|
||||
"""Compute sentence-transformer embeddings for tips missing them."""
|
||||
|
||||
Reference in New Issue
Block a user