Skip to content

Commit 0958ee9

Browse files
committed
params fixes
1 parent 2c60436 commit 0958ee9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/server/tests/unit/test_completion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,13 @@ def test_completion_requested_fields(
283283
assert res.status_code == 200
284284
assert "content" in res.body
285285
assert len(res.body["content"])
286-
if len(requested_fields) > 0:
286+
if len(requested_fields):
287287
assert res.body["generation_settings/n_predict"] == n_predict
288288
assert res.body["prompt"] == "<s> " + prompt
289289
assert isinstance(res.body["content"], str)
290290
assert len(res.body) == len(requested_fields)
291291
else:
292-
assert len(res.body) > 0
292+
assert len(res.body)
293293
assert "generation_settings" in res.body
294294

295295

examples/server/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static json json_get_nested_values(const std::vector<std::string> & paths, const
9494

9595
for (const std::string & path : paths) {
9696
json current = js;
97-
const auto keys = string_split<std::string>(path, /*delim*/ '/');
97+
const auto keys = string_split<std::string>(path, /*separator*/ '/');
9898
bool valid_path = true;
9999
for (const std::string & k : keys) {
100100
if (valid_path && current.is_object() && current.contains(k)) {

0 commit comments

Comments
 (0)