[Frontend][Bugfix] Pass default_chat_template_kwargs to AnthropicServingMessages (#37899)
Signed-off-by: jetxa <jetxzhang@outlook.com>
This commit is contained in:
@@ -72,6 +72,7 @@ class AnthropicServingMessages(OpenAIServingChat):
|
||||
tool_parser: str | None = None,
|
||||
enable_prompt_tokens_details: bool = False,
|
||||
enable_force_include_usage: bool = False,
|
||||
default_chat_template_kwargs: dict[str, Any] | None = None,
|
||||
):
|
||||
super().__init__(
|
||||
engine_client=engine_client,
|
||||
@@ -87,6 +88,7 @@ class AnthropicServingMessages(OpenAIServingChat):
|
||||
tool_parser=tool_parser,
|
||||
enable_prompt_tokens_details=enable_prompt_tokens_details,
|
||||
enable_force_include_usage=enable_force_include_usage,
|
||||
default_chat_template_kwargs=default_chat_template_kwargs,
|
||||
)
|
||||
self.stop_reason_map = {
|
||||
"stop": "end_turn",
|
||||
|
||||
@@ -150,6 +150,7 @@ async def init_generate_state(
|
||||
reasoning_parser=args.structured_outputs_config.reasoning_parser,
|
||||
enable_prompt_tokens_details=args.enable_prompt_tokens_details,
|
||||
enable_force_include_usage=args.enable_force_include_usage,
|
||||
default_chat_template_kwargs=args.default_chat_template_kwargs,
|
||||
)
|
||||
if "generate" in supported_tasks
|
||||
else None
|
||||
|
||||
Reference in New Issue
Block a user