109 lines
2.7 KiB
Python
109 lines
2.7 KiB
Python
from pydal import DAL, Field
|
|
db = DAL("sqlite://databases/storage.db")
|
|
db.define_table(
|
|
"trusted",
|
|
Field("path"),
|
|
Field("mode"),
|
|
Field("trusted"),
|
|
Field("duration",type="double",default=0),#audio
|
|
Field("sizeMB",type="double",default=0),# audio,factura
|
|
Field("length",type="integer",default=0),#texto
|
|
Field('last_modified', 'datetime'),
|
|
Field('modification_count', 'integer', default=0),
|
|
Field('hash')
|
|
)
|
|
|
|
db.define_table(
|
|
"prompt",
|
|
Field("prompt"),
|
|
Field("mode"),
|
|
Field("length",type="integer",default=0),
|
|
Field('hash',unique=True),
|
|
Field('last_modified', 'datetime'),
|
|
)
|
|
|
|
|
|
db.define_table(
|
|
"analitic_voice",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("similarity", type="double"),
|
|
Field("similaritypartial", type="double"),
|
|
Field('last_modified', 'datetime')
|
|
)
|
|
|
|
db.define_table(
|
|
"analitic_ocr",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("similarity", type="double"),
|
|
Field("similaritypartial", type="double"),
|
|
Field("jsonok" ,type="integer"),
|
|
Field('last_modified', 'datetime')
|
|
)
|
|
|
|
db.define_table(
|
|
"analitic_llm_compra",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("relevance", type="double"),
|
|
Field("bias", type="double"),
|
|
Field("toxic", type="double"),
|
|
Field("correctness", type="double"),
|
|
Field("relevance_r"),
|
|
Field("bias_r"),
|
|
Field("toxic_r"),
|
|
Field("correctness_r"),
|
|
Field('last_modified', 'datetime')
|
|
)
|
|
|
|
db.define_table(
|
|
"analitic_llm_factura",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("similarity", type="double"),
|
|
Field("similaritypartial", type="double"),
|
|
Field('last_modified', 'datetime')
|
|
)
|
|
|
|
db.define_table(
|
|
"analitic_llm_generaciontexto",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("relevance", type="double"),
|
|
Field("bias", type="double"),
|
|
Field("toxic", type="double"),
|
|
Field("correctness", type="double"),
|
|
Field("relevance_r"),
|
|
Field("bias_r"),
|
|
Field("toxic_r"),
|
|
Field("correctness_r"),
|
|
Field('last_modified', 'datetime')
|
|
)
|
|
|
|
db.define_table(
|
|
"analitic_llm_rag",
|
|
Field("content"),
|
|
Field("trusted"),
|
|
Field("model"),
|
|
Field("time", type="double"),
|
|
Field("path"),
|
|
Field("similarity", type="double"),
|
|
Field("similaritypartial", type="double"),
|
|
Field('last_modified', 'datetime')
|
|
) |