mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
- Expose ability to modify search model via Django admin interface - Previously the bi_encoder and cross_encoder models to use were set in code - Now it's user configurable but with a default config generated by default
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
# Generated by Django 4.2.5 on 2023-11-14 23:25
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("database", "0016_alter_subscription_renewal_date"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="SearchModel",
|
|
fields=[
|
|
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now=True)),
|
|
("name", models.CharField(default="default", max_length=200)),
|
|
("model_type", models.CharField(choices=[("text", "Text")], default="text", max_length=200)),
|
|
("bi_encoder", models.CharField(default="thenlper/gte-small", max_length=200)),
|
|
(
|
|
"cross_encoder",
|
|
models.CharField(
|
|
blank=True, default="cross-encoder/ms-marco-MiniLM-L-6-v2", max_length=200, null=True
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"abstract": False,
|
|
},
|
|
),
|
|
]
|