A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 10:15 UTC
[MISC] Removed unused function find_all_indices() from tool_parsers/utils.py (#35683)
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
Taneem Ibrahim committed
Mar 2, 2026 at 23:58 UTC
3a6cbf16e27e164e81ac2259fe211cd930adf48f
1 file changed
-15
vllm/tool_parsers/utils.py
-15
@@ -93,21 +93,6 @@ def extract_intermediate_diff(curr: str, old: str) -> str:
93
return diff
94
95
96
-def find_all_indices(string: str, substring: str) -> list[int]:
97
- """
98
- Find all (starting) indices of a substring in a given string. Useful for
99
- tool call extraction
100
- """
101
- indices = []
102
- index = -1
103
- while True:
104
- index = string.find(substring, index + 1)
105
- if index == -1:
106
- break
107
- indices.append(index)
108
- return indices
109
-
110
-
96
# partial_json_parser doesn't support extra data and
97
# JSONDecoder.raw_decode doesn't support partial JSON
98
def partial_json_loads(input_str: str, flags: Allow) -> tuple[Any, int]: