fix MiniMax api error (#1567)

### What problem does this PR solve?

#1353 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Zhedong Cen <cenzhedong2@126.com>
This commit is contained in:
黄腾
2024-07-17 15:32:51 +08:00
committed by GitHub
parent fe5dd5b70a
commit 9ae57eb370
3 changed files with 91 additions and 13 deletions

View File

@ -558,7 +558,7 @@ class TenantLLM(DataBaseModel):
null=True,
help_text="LLM name",
default="")
api_key = CharField(max_length=255, null=True, help_text="API KEY")
api_key = CharField(max_length=1024, null=True, help_text="API KEY")
api_base = CharField(max_length=255, null=True, help_text="API Base")
used_tokens = IntegerField(default=0)
@ -885,3 +885,9 @@ def migrate_db():
)
except Exception as e:
pass
try:
migrate(
migrator.alter_column_type('tenant_llm', 'api_key', CharField(max_length=1024, null=True, help_text="API KEY"))
)
except Exception as e:
pass