feat(v2): 模型设置(用户可调小模型/大模型/管线,/config + UI)
This commit is contained in:
@@ -66,6 +66,24 @@ def test_metrics(client):
|
||||
assert "review" in data
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def test_config_get_put_reset(client):
|
||||
# GET 默认
|
||||
r = client.get("/config")
|
||||
assert r.status_code == 200
|
||||
assert r.json()["worker"]["backend"] in ("llama_server", "openai", "mock")
|
||||
# PUT 更新 worker
|
||||
r2 = client.put("/config", json={"worker": {"backend": "mock", "temperature": 0.5}})
|
||||
assert r2.status_code == 200
|
||||
assert r2.json()["worker"]["temperature"] == 0.5
|
||||
# 重置
|
||||
r3 = client.post("/config/reset")
|
||||
assert r3.status_code == 200
|
||||
assert r3.json()["worker"]["backend"] == "llama_server"
|
||||
|
||||
|
||||
def test_workspace_not_found(client):
|
||||
resp = client.get("/runs/nonexistent/workspace")
|
||||
assert resp.status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user