[Refactor] Remove unused interface methods (#57194)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -36,9 +36,6 @@ class _NoOpParser(DelegatingParser):
|
||||
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
||||
return False
|
||||
|
||||
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
||||
return input_ids
|
||||
|
||||
def extract_reasoning(self, model_output, request):
|
||||
return None, model_output
|
||||
|
||||
@@ -63,9 +60,6 @@ class _ReasoningOnlyParser(DelegatingParser):
|
||||
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
||||
return False
|
||||
|
||||
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
||||
return input_ids
|
||||
|
||||
def extract_reasoning(self, model_output, request):
|
||||
if "<think>" in model_output and "</think>" in model_output:
|
||||
start = model_output.index("<think>") + len("<think>")
|
||||
@@ -131,9 +125,6 @@ class _ToolCallingParser(DelegatingParser):
|
||||
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
||||
return False
|
||||
|
||||
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
||||
return input_ids
|
||||
|
||||
def extract_reasoning(self, model_output, request):
|
||||
return None, model_output
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ class _DummyDelegatingParser(DelegatingParser):
|
||||
def is_reasoning_end(self, input_ids: list[int]) -> bool:
|
||||
return False
|
||||
|
||||
def extract_content_ids(self, input_ids: list[int]) -> list[int]:
|
||||
return input_ids
|
||||
|
||||
def extract_reasoning(self, model_output: str, request):
|
||||
return None, model_output
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ async def generate_mock_outputs(
|
||||
class FakeHarmonyParser(HarmonyParser):
|
||||
def __init__(self):
|
||||
# Skip HarmonyParser initialization and script outputs directly.
|
||||
self.reasoning_parser = None
|
||||
self.tool_parser = None
|
||||
self._reasoning_parser = None
|
||||
self._tool_parser = None
|
||||
self._chunk_results: list[ChunkResult] = []
|
||||
self._flush_results: list[list[Segment]] = []
|
||||
self.processed_chunks: list[list[int]] = []
|
||||
|
||||
Reference in New Issue
Block a user