fix: ProgressBar默认输出到stdout
- file参数默认值改为None, 内部用 or sys.stdout 兜底 - 清理inference API中未使用的import (Optional, time, field) - 删除test_protocol中未使用的ctx变量
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user