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

XFEstudio/gpt4free

Update __init__.py

fixed the line where it checks if stream is requested. I made the change because before it ignored what the user typed because there was a invalid conversion from the boolean to string where the if stream clause would always be true. Simple workaround :)

ef3fdfa8
Kacper Kwapisz <kwapikapi@gmail.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/api/__init__.py +1 -1
@@ -78,7 +78,7 @@ class Api:
78 78 item_data['messages'] = ast.literal_eval(item_data.get('messages'))
79 79
80 80 model = item_data.get('model')
81 stream = item_data.get('stream')
81 stream = True if item_data.get("stream") == "True" else False
82 82 messages = item_data.get('messages')
83 83
84 84 try: