Increase max_length for LLM config fields

This commit is contained in:
shamoon
2025-11-30 07:50:55 -08:00
parent 86192fb74c
commit 33c4758ef4
2 changed files with 12 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
name="llm_api_key", name="llm_api_key",
field=models.CharField( field=models.CharField(
blank=True, blank=True,
max_length=128, max_length=1024,
null=True, null=True,
verbose_name="Sets the LLM API key", verbose_name="Sets the LLM API key",
), ),
@@ -35,7 +35,7 @@ class Migration(migrations.Migration):
field=models.CharField( field=models.CharField(
blank=True, blank=True,
choices=[("openai", "OpenAI"), ("ollama", "Ollama")], choices=[("openai", "OpenAI"), ("ollama", "Ollama")],
max_length=32, max_length=128,
null=True, null=True,
verbose_name="Sets the LLM backend", verbose_name="Sets the LLM backend",
), ),
@@ -46,7 +46,7 @@ class Migration(migrations.Migration):
field=models.CharField( field=models.CharField(
blank=True, blank=True,
choices=[("openai", "OpenAI"), ("huggingface", "Huggingface")], choices=[("openai", "OpenAI"), ("huggingface", "Huggingface")],
max_length=32, max_length=128,
null=True, null=True,
verbose_name="Sets the LLM embedding backend", verbose_name="Sets the LLM embedding backend",
), ),
@@ -56,7 +56,7 @@ class Migration(migrations.Migration):
name="llm_embedding_model", name="llm_embedding_model",
field=models.CharField( field=models.CharField(
blank=True, blank=True,
max_length=32, max_length=128,
null=True, null=True,
verbose_name="Sets the LLM embedding model", verbose_name="Sets the LLM embedding model",
), ),
@@ -66,7 +66,7 @@ class Migration(migrations.Migration):
name="llm_endpoint", name="llm_endpoint",
field=models.CharField( field=models.CharField(
blank=True, blank=True,
max_length=128, max_length=256,
null=True, null=True,
verbose_name="Sets the LLM endpoint, optional", verbose_name="Sets the LLM endpoint, optional",
), ),
@@ -76,7 +76,7 @@ class Migration(migrations.Migration):
name="llm_model", name="llm_model",
field=models.CharField( field=models.CharField(
blank=True, blank=True,
max_length=32, max_length=128,
null=True, null=True,
verbose_name="Sets the LLM model", verbose_name="Sets the LLM model",
), ),

View File

@@ -293,7 +293,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
verbose_name=_("Sets the LLM embedding backend"), verbose_name=_("Sets the LLM embedding backend"),
blank=True, blank=True,
null=True, null=True,
max_length=32, max_length=128,
choices=LLMEmbeddingBackend.choices, choices=LLMEmbeddingBackend.choices,
) )
@@ -301,14 +301,14 @@ class ApplicationConfiguration(AbstractSingletonModel):
verbose_name=_("Sets the LLM embedding model"), verbose_name=_("Sets the LLM embedding model"),
blank=True, blank=True,
null=True, null=True,
max_length=32, max_length=128,
) )
llm_backend = models.CharField( llm_backend = models.CharField(
verbose_name=_("Sets the LLM backend"), verbose_name=_("Sets the LLM backend"),
blank=True, blank=True,
null=True, null=True,
max_length=32, max_length=128,
choices=LLMBackend.choices, choices=LLMBackend.choices,
) )
@@ -316,21 +316,21 @@ class ApplicationConfiguration(AbstractSingletonModel):
verbose_name=_("Sets the LLM model"), verbose_name=_("Sets the LLM model"),
blank=True, blank=True,
null=True, null=True,
max_length=32, max_length=128,
) )
llm_api_key = models.CharField( llm_api_key = models.CharField(
verbose_name=_("Sets the LLM API key"), verbose_name=_("Sets the LLM API key"),
blank=True, blank=True,
null=True, null=True,
max_length=128, max_length=1024,
) )
llm_endpoint = models.CharField( llm_endpoint = models.CharField(
verbose_name=_("Sets the LLM endpoint, optional"), verbose_name=_("Sets the LLM endpoint, optional"),
blank=True, blank=True,
null=True, null=True,
max_length=128, max_length=256,
) )
class Meta: class Meta: