16 lines
352 B
Python
16 lines
352 B
Python
import enum
|
|
|
|
from tortoise import fields
|
|
from tortoise.models import Model
|
|
|
|
|
|
class EmbeddingEngine(enum.Enum):
|
|
OPENAI = "openai"
|
|
OLLAMA = "ollama"
|
|
|
|
|
|
class PaperlessDocument(Model):
|
|
id = fields.UUIDField(primary_key=True)
|
|
paperless_id = fields.CharField(unique=True)
|
|
embedding_model = fields.CharEnumField(enum_type=EmbeddingEngine)
|