feat : BaseToolParser.feed 增加可选 token_ids 参数
- format_chunk ABC 改为 (token, **kwargs),body/token_ids 通过 kw 传入 - ProtocolHandler._handle_stream 逐 token encode 并透传 - Anthropic builder 用 **kwargs 吸收不使用的参数,零变更 - 新增 3 个 token_ids 参数测试
This commit is contained in:
@@ -73,7 +73,7 @@ class AnthropicResponseBuilder(ResponseBuilder):
|
||||
),
|
||||
]
|
||||
|
||||
def format_chunk(self, token: str, body: str) -> List[str]:
|
||||
def format_chunk(self, token: str, **kwargs) -> List[str]:
|
||||
return [
|
||||
sse_event(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user