Browse Source

Fix: long api key issue. (#6267)

### What problem does this PR solve?

#6248

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 months ago
parent
commit
e689532e6e
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      api/db/db_models.py

+ 2
- 2
api/db/db_models.py View File

@@ -648,7 +648,7 @@ class TenantLLM(DataBaseModel):
help_text="LLM name",
default="",
index=True)
api_key = CharField(max_length=1024, null=True, help_text="API KEY", index=True)
api_key = CharField(max_length=2048, null=True, help_text="API KEY", index=True)
api_base = CharField(max_length=255, null=True, help_text="API Base")
max_tokens = IntegerField(default=8192, index=True)
used_tokens = IntegerField(default=0, index=True)
@@ -1027,7 +1027,7 @@ def migrate_db():
try:
migrate(
migrator.alter_column_type('tenant_llm', 'api_key',
CharField(max_length=1024, null=True, help_text="API KEY", index=True))
CharField(max_length=2048, null=True, help_text="API KEY", index=True))
)
except Exception:
pass

Loading…
Cancel
Save