diff --git a/src/paperless/migrations/0005_applicationconfiguration_ai_enabled_and_more.py b/src/paperless/migrations/0005_applicationconfiguration_ai_enabled_and_more.py index 0776091da..df0de8351 100644 --- a/src/paperless/migrations/0005_applicationconfiguration_ai_enabled_and_more.py +++ b/src/paperless/migrations/0005_applicationconfiguration_ai_enabled_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.8 on 2025-04-30 02:38 +# Generated by Django 5.2.6 on 2025-09-30 17:43 from django.db import migrations from django.db import models @@ -25,6 +25,7 @@ class Migration(migrations.Migration): field=models.CharField( blank=True, max_length=128, + null=True, verbose_name="Sets the LLM API key", ), ), @@ -35,6 +36,7 @@ class Migration(migrations.Migration): blank=True, choices=[("openai", "OpenAI"), ("ollama", "Ollama")], max_length=32, + null=True, verbose_name="Sets the LLM backend", ), ), @@ -45,6 +47,7 @@ class Migration(migrations.Migration): blank=True, choices=[("openai", "OpenAI"), ("huggingface", "Huggingface")], max_length=32, + null=True, verbose_name="Sets the LLM embedding backend", ), ), @@ -54,25 +57,28 @@ class Migration(migrations.Migration): field=models.CharField( blank=True, max_length=32, + null=True, verbose_name="Sets the LLM embedding model", ), ), - migrations.AddField( - model_name="applicationconfiguration", - name="llm_model", - field=models.CharField( - blank=True, - max_length=32, - verbose_name="Sets the LLM model", - ), - ), migrations.AddField( model_name="applicationconfiguration", name="llm_endpoint", field=models.CharField( blank=True, max_length=128, + null=True, verbose_name="Sets the LLM endpoint, optional", ), ), + migrations.AddField( + model_name="applicationconfiguration", + name="llm_model", + field=models.CharField( + blank=True, + max_length=32, + null=True, + verbose_name="Sets the LLM model", + ), + ), ] diff --git a/src/paperless/models.py b/src/paperless/models.py index e77e73bcc..81ad8b176 100644 --- a/src/paperless/models.py +++ b/src/paperless/models.py @@ -292,6 +292,7 @@ class ApplicationConfiguration(AbstractSingletonModel): llm_embedding_backend = models.CharField( verbose_name=_("Sets the LLM embedding backend"), blank=True, + null=True, max_length=32, choices=LLMEmbeddingBackend.choices, ) @@ -299,12 +300,14 @@ class ApplicationConfiguration(AbstractSingletonModel): llm_embedding_model = models.CharField( verbose_name=_("Sets the LLM embedding model"), blank=True, + null=True, max_length=32, ) llm_backend = models.CharField( verbose_name=_("Sets the LLM backend"), blank=True, + null=True, max_length=32, choices=LLMBackend.choices, ) @@ -312,18 +315,21 @@ class ApplicationConfiguration(AbstractSingletonModel): llm_model = models.CharField( verbose_name=_("Sets the LLM model"), blank=True, + null=True, max_length=32, ) llm_api_key = models.CharField( verbose_name=_("Sets the LLM API key"), blank=True, + null=True, max_length=128, ) llm_endpoint = models.CharField( verbose_name=_("Sets the LLM endpoint, optional"), blank=True, + null=True, max_length=128, )