realise document upload - Part 1

This commit is contained in:
Josako
2024-04-30 22:47:44 +02:00
parent 602a450114
commit 9f350b5ea0
9 changed files with 128 additions and 3 deletions

View File

@@ -76,3 +76,13 @@ class EmbeddingMistral(db.Model):
# 1024 is the MISTRAL Embedding dimension.
# If another embedding model is chosen, this dimension may need to be changed.
embedding = db.Column(Vector(1024), nullable=False)
class EmbeddingSmallOpenAI(db.Model):
id = db.Column(db.Integer, primary_key=True)
doc_vers_id = db.Column(db.Integer, db.ForeignKey(DocumentVersion.id), nullable=False)
active = db.Column(db.Boolean, nullable=False, default=True)
# 1536 is the OpenAI Small Embedding dimension.
# If another embedding model is chosen, this dimension may need to be changed.
embedding = db.Column(Vector(1536), nullable=False)