mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-05-20 15:50:10 +08:00
fix: 修复 Gemini 多段文本响应内容拼接问题
This commit is contained in:
@@ -232,7 +232,9 @@ def _extract_text(response: Dict[str, Any], model: str, stream: bool = False) ->
|
||||
else:
|
||||
text = candidate["content"]["parts"][0]["text"]
|
||||
else:
|
||||
text = candidate["content"]["parts"][0]["text"]
|
||||
text = ""
|
||||
for part in candidate["content"]["parts"]:
|
||||
text += part["text"]
|
||||
text = _add_search_link_text(model, candidate, text)
|
||||
else:
|
||||
text = "暂无返回"
|
||||
|
||||
Reference in New Issue
Block a user