Fix tool_parser_cls type annotation from Callable to type[ToolParser] (#37957)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import asyncio
|
||||
import contextlib
|
||||
import json
|
||||
import time
|
||||
from collections.abc import AsyncGenerator, Callable, Mapping
|
||||
from collections.abc import AsyncGenerator, Mapping
|
||||
from dataclasses import dataclass, field
|
||||
from http import HTTPStatus
|
||||
from typing import Any, ClassVar, Generic, Protocol, TypeAlias, TypeVar
|
||||
@@ -882,7 +882,7 @@ class OpenAIServing:
|
||||
request: ResponsesRequest | ChatCompletionRequest,
|
||||
tokenizer: TokenizerLike | None,
|
||||
enable_auto_tools: bool,
|
||||
tool_parser_cls: Callable[[TokenizerLike], ToolParser] | None,
|
||||
tool_parser_cls: type[ToolParser] | None,
|
||||
content: str | None = None,
|
||||
) -> tuple[list[FunctionCall] | None, str | None]:
|
||||
function_calls = list[FunctionCall]()
|
||||
|
||||
Reference in New Issue
Block a user