Revert "Sonar code smell sure"

This reverts commit 4318f7dac3.
This commit is contained in:
shamoon
2025-09-14 16:30:30 -07:00
parent 4b07179b01
commit a569b0574d
2 changed files with 12 additions and 0 deletions

View File

@@ -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,6 +57,7 @@ class Migration(migrations.Migration):
field=models.CharField(
blank=True,
max_length=32,
null=True,
verbose_name="Sets the LLM embedding model",
),
),
@@ -63,6 +67,7 @@ class Migration(migrations.Migration):
field=models.CharField(
blank=True,
max_length=32,
null=True,
verbose_name="Sets the LLM model",
),
),
@@ -72,6 +77,7 @@ class Migration(migrations.Migration):
field=models.CharField(
blank=True,
max_length=128,
null=True,
verbose_name="Sets the LLM endpoint, optional",
),
),

View File

@@ -291,6 +291,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
llm_embedding_backend = models.CharField(
verbose_name=_("Sets the LLM embedding backend"),
null=True,
blank=True,
max_length=32,
choices=LLMEmbeddingBackend.choices,
@@ -298,12 +299,14 @@ class ApplicationConfiguration(AbstractSingletonModel):
llm_embedding_model = models.CharField(
verbose_name=_("Sets the LLM embedding model"),
null=True,
blank=True,
max_length=32,
)
llm_backend = models.CharField(
verbose_name=_("Sets the LLM backend"),
null=True,
blank=True,
max_length=32,
choices=LLMBackend.choices,
@@ -311,18 +314,21 @@ class ApplicationConfiguration(AbstractSingletonModel):
llm_model = models.CharField(
verbose_name=_("Sets the LLM model"),
null=True,
blank=True,
max_length=32,
)
llm_api_key = models.CharField(
verbose_name=_("Sets the LLM API key"),
null=True,
blank=True,
max_length=128,
)
llm_endpoint = models.CharField(
verbose_name=_("Sets the LLM endpoint, optional"),
null=True,
blank=True,
max_length=128,
)