XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix response handling in Perplexity provider to clear value when it matches the end of full response

3d264705
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -0
Modified g4f/Provider/Perplexity.py +2 -0
@@ -273,6 +273,8 @@ class Perplexity(AsyncGeneratorProvider, ProviderModelMixin):
273 273 if value and isinstance(value, str):
274 274 if value.startswith(full_response):
275 275 value = value[len(full_response):]
276 elif full_response.endswith(value):
277 value = ""
276 278 if value:
277 279 full_response += value
278 280 yield value