fix: ProgressBar默认输出到stdout

- file参数默认值改为None, 内部用 or sys.stdout 兜底
- 清理inference API中未使用的import (Optional, time, field)
- 删除test_protocol中未使用的ctx变量
This commit is contained in:
2026-05-26 13:27:05 +08:00
parent 94d6e713e9
commit dd1b39f435
5 changed files with 5 additions and 7 deletions
-1
View File
@@ -121,7 +121,6 @@ class TestOpenAIResponseBuilder:
assert p["choices"][0]["finish_reason"] is None
def test_format_chunk(self, builder):
ctx = _make_ctx()
event = builder.format_chunk("hello")
payload = json.loads(event.split("data: ", 1)[1])
assert payload["choices"][0]["delta"]["content"] == "hello"