Add fastgpt as seperate assistant mode
This commit is contained in:
@@ -283,6 +283,30 @@ def test_translate_agent_schema_maps_volcengine_fields():
|
||||
}
|
||||
|
||||
|
||||
def test_translate_agent_schema_maps_llm_app_id():
|
||||
payload = {
|
||||
"agent": {
|
||||
"llm": {
|
||||
"provider": "fastgpt",
|
||||
"model": "fastgpt",
|
||||
"api_key": "llm-key",
|
||||
"api_url": "https://cloud.fastgpt.cn/api",
|
||||
"app_id": "app-fastgpt-123",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
translated = LocalYamlAssistantConfigAdapter._translate_agent_schema("assistant_demo", payload)
|
||||
assert translated is not None
|
||||
assert translated["services"]["llm"] == {
|
||||
"provider": "fastgpt",
|
||||
"model": "fastgpt",
|
||||
"apiKey": "llm-key",
|
||||
"baseUrl": "https://cloud.fastgpt.cn/api",
|
||||
"appId": "app-fastgpt-123",
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_backend_mode_disabled_uses_local_assistant_config_even_with_url(monkeypatch, tmp_path):
|
||||
class _FailIfCalledClientSession:
|
||||
|
||||
Reference in New Issue
Block a user