mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-02 08:17:48 +08:00
Refa: improve model verification ux (#13392)
### What problem does this PR solve? Improve model verification UX. #13395 ### Type of change - [x] Refactoring --------- Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
@ -514,6 +514,10 @@ def test_add_llm_factory_specific_key_assembly_unit(monkeypatch):
|
||||
async def async_chat(self, *_args, **_kwargs):
|
||||
return "ok", 1
|
||||
|
||||
async def async_chat_streamly(self, *_args, **_kwargs):
|
||||
yield "ok"
|
||||
yield 1
|
||||
|
||||
class _TTSOK:
|
||||
def __init__(self, key, model_name, base_url="", **_kwargs):
|
||||
captured["tts"].append((key, model_name, base_url))
|
||||
@ -679,6 +683,10 @@ def test_add_llm_model_type_probe_and_persistence_matrix_unit(monkeypatch):
|
||||
async def async_chat(self, *_args, **_kwargs):
|
||||
return "**ERROR**: chat failed", 0
|
||||
|
||||
async def async_chat_streamly(self, *_args, **_kwargs):
|
||||
yield "**ERROR**: chat failed"
|
||||
yield 0
|
||||
|
||||
class _ChatPass:
|
||||
def __init__(self, *_args, **_kwargs):
|
||||
pass
|
||||
@ -686,6 +694,10 @@ def test_add_llm_model_type_probe_and_persistence_matrix_unit(monkeypatch):
|
||||
async def async_chat(self, *_args, **_kwargs):
|
||||
return "ok", 1
|
||||
|
||||
async def async_chat_streamly(self, *_args, **_kwargs):
|
||||
yield "ok"
|
||||
yield 1
|
||||
|
||||
class _RerankFail:
|
||||
def __init__(self, *_args, **_kwargs):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user