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

XFEstudio/gpt4free

fix: Correct string formatting for authorization header in PollinationsAI provider

65f4b724
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/Provider/PollinationsAI.py +1 -1
@@ -484,7 +484,7 @@ class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
484 484 if api_key and not api_key.startswith("g4f_") and not api_key.startswith("gfs_"):
485 485 headers = {"authorization": f"Bearer {api_key}"}
486 486 elif cls.balance > 0:
487 headers = {"authorization": f"Bearer {"".join(cls.api_key)}"}
487 headers = {"authorization": f"Bearer {''.join(cls.api_key)}"}
488 488 yield JsonRequest.from_dict(data)
489 489 if headers:
490 490 url = cls.gen_text_api_endpoint