feat:add ppio and openrouter llm stream,and ppio think in content remove_think.

fix: giteeai stream no remove_think content add char"<think>"
This commit is contained in:
Dong_master
2025-07-15 00:50:42 +08:00
committed by Junyan Qin
parent a7d638cc9a
commit 0042629bf0
3 changed files with 290 additions and 9 deletions
@@ -123,15 +123,7 @@ class GiteeAIChatCompletions(chatcmpl.OpenAIChatCompletions):
else:
delta['content'] = ''
else:
if reasoning_content is not None and idx == 0:
delta['content'] += f'<think>\n{reasoning_content}'
elif reasoning_content is None:
if self.is_content:
delta['content'] = delta['content']
else:
delta['content'] = f'\n<think>\n\n{delta["content"]}'
self.is_content = True
else:
if reasoning_content is not None:
delta['content'] += reasoning_content