feat(func_call): Add more check in BaseFormatDetector.parse_streaming_increment (#7479)

This commit is contained in:
Chang Su
2025-06-23 11:15:47 -07:00
committed by GitHub
parent 25549433e8
commit 34b6b8426f
2 changed files with 5 additions and 4 deletions

View File

@@ -142,6 +142,10 @@ class BaseFormatDetector(ABC):
try:
if current_text.startswith(self.bot_token):
start_idx = len(self.bot_token)
elif self.current_tool_id > 0 and current_text.startswith(
self.tool_call_separator + self.bot_token
):
start_idx = len(self.tool_call_separator + self.bot_token)
elif self.current_tool_id > 0 and current_text.startswith(
self.tool_call_separator
):