mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add support for novita.ai (#1910)
### What problem does this PR solve? #1853 add support for novita.ai ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Zhedong Cen <cenzhedong2@126.com>
This commit is contained in:
@ -532,8 +532,7 @@ class LLM(DataBaseModel):
|
||||
max_length=128,
|
||||
null=False,
|
||||
help_text="LLM name",
|
||||
index=True,
|
||||
primary_key=True)
|
||||
index=True)
|
||||
model_type = CharField(
|
||||
max_length=128,
|
||||
null=False,
|
||||
@ -558,6 +557,7 @@ class LLM(DataBaseModel):
|
||||
return self.llm_name
|
||||
|
||||
class Meta:
|
||||
primary_key = CompositeKey('fid', 'llm_name')
|
||||
db_table = "llm"
|
||||
|
||||
|
||||
@ -965,3 +965,8 @@ def migrate_db():
|
||||
)
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
DB.execute_sql('ALTER TABLE llm DROP PRIMARY KEY;')
|
||||
DB.execute_sql('ALTER TABLE llm ADD PRIMARY KEY (llm_name,fid);')
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user