Bladeren bron

adapt to lower case cohere (#3392)

### What problem does this PR solve?

#3384

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.14.0
Kevin Hu 11 maanden geleden
bovenliggende
commit
e44e3a67b0
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3
    0
      api/db/init_data.py

+ 3
- 0
api/db/init_data.py Bestand weergeven

def init_llm_factory(): def init_llm_factory():
try: try:
LLMService.filter_delete([(LLM.fid == "MiniMax" or LLM.fid == "Minimax")]) LLMService.filter_delete([(LLM.fid == "MiniMax" or LLM.fid == "Minimax")])
LLMService.filter_delete([(LLM.fid == "cohere")])
LLMFactoriesService.filter_delete([LLMFactories.name == "cohere"])
except Exception: except Exception:
pass pass


LLMFactoriesService.filter_delete([LLMFactoriesService.model.name == "QAnything"]) LLMFactoriesService.filter_delete([LLMFactoriesService.model.name == "QAnything"])
LLMService.filter_delete([LLMService.model.fid == "QAnything"]) LLMService.filter_delete([LLMService.model.fid == "QAnything"])
TenantLLMService.filter_update([TenantLLMService.model.llm_factory == "QAnything"], {"llm_factory": "Youdao"}) TenantLLMService.filter_update([TenantLLMService.model.llm_factory == "QAnything"], {"llm_factory": "Youdao"})
TenantLLMService.filter_update([TenantLLMService.model.llm_factory == "cohere"], {"llm_factory": "Cohere"})
TenantService.filter_update([1 == 1], { TenantService.filter_update([1 == 1], {
"parser_ids": "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,knowledge_graph:Knowledge Graph,email:Email"}) "parser_ids": "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One,audio:Audio,knowledge_graph:Knowledge Graph,email:Email"})
## insert openai two embedding models to the current openai user. ## insert openai two embedding models to the current openai user.

Laden…
Annuleren
Opslaan