mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-23 10:57:44 +08:00
feat: enhance content filtering, token usage tracking, and stream error handling in chat-stream modules
This commit is contained in:
8
tests/compat/expected/sse_content_filter_status.json
Normal file
8
tests/compat/expected/sse_content_filter_status.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"parts": [],
|
||||
"finished": true,
|
||||
"new_type": "text",
|
||||
"content_filter": true,
|
||||
"output_tokens": 77,
|
||||
"error_message": ""
|
||||
}
|
||||
7
tests/compat/expected/sse_leaked_content_filter.json
Normal file
7
tests/compat/expected/sse_leaked_content_filter.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parts": [
|
||||
{"text": "正常输出", "type": "text"}
|
||||
],
|
||||
"finished": false,
|
||||
"new_type": "text"
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"cases": [
|
||||
{"name": "ascii_short", "tokens": 1},
|
||||
{"name": "whitespace_only", "tokens": 1},
|
||||
{"name": "newline_only", "tokens": 1},
|
||||
{"name": "cjk", "tokens": 3},
|
||||
{"name": "mixed", "tokens": 4}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user