Feat: v0.27.0 model provider (#16604)

This commit is contained in:
Lynn
2026-07-08 09:47:29 +08:00
committed by GitHub
parent cb93883f3f
commit 0ae5961e1c
94 changed files with 7539 additions and 3044 deletions

View File

@@ -345,7 +345,7 @@ def _load_chunk_module(monkeypatch):
@staticmethod
def get_tenant_embd_id(_doc_id):
return 1
return "tm-embd-1"
@staticmethod
def decrement_chunk_num(*args):
@@ -377,7 +377,7 @@ def _load_chunk_module(monkeypatch):
@staticmethod
def get_by_id(_kb_id):
return True, SimpleNamespace(pagerank=0.6, tenant_id="tenant-1", tenant_embd_id=2, tenant_llm_id=1)
return True, SimpleNamespace(pagerank=0.6, tenant_id="tenant-1", tenant_embd_id="tm-embd-2", tenant_llm_id="tm-llm-1")
kb_service_mod.KnowledgebaseService = _KnowledgebaseService
monkeypatch.setitem(sys.modules, "api.db.services.knowledgebase_service", kb_service_mod)
@@ -451,9 +451,9 @@ def _load_chunk_module(monkeypatch):
def get_by_id(tenant_id):
return True, SimpleNamespace(
llm_id="gpt-3.5-turbo",
tenant_llm_id=1,
tenant_llm_id="tm-llm-1",
embd_id="text-embedding-ada-002",
tenant_embd_id=2,
tenant_embd_id="tm-embd-2",
asr_id="whisper-1",
img2txt_id="gpt-4-vision-preview",
rerank_id="bge-reranker",