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

XFEstudio/gpt4free

Fix docker build, fix temporary chat

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

代码差异

2 个文件 +4 -5
Modified docker/Dockerfile +1 -2
@@ -45,8 +45,7 @@ WORKDIR $G4F_DIR
45 45 COPY requirements.txt $G4F_DIR
46 46
47 47 # Upgrade pip for the latest features and install the project's Python dependencies.
48 RUN pip install --break-system-packages --upgrade pip \
49 && pip install --break-system-packages -r requirements.txt
48 RUN pip install --break-system-packages -r requirements.txt
50 49
51 50 # Copy the entire package into the container.
52 51 ADD --chown=$SEL_UID:$SEL_GID g4f $G4F_DIR/g4f
Modified g4f/Provider/needs_auth/OpenaiChat.py +3 -3
@@ -319,7 +319,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
319 319 debug.error("OpenaiChat: Download image failed")
320 320 debug.error(e)
321 321 if download_urls:
322 return ImagePreview(download_urls, prompt, {"headers":auth_result.headers}) if is_sediment else ImageResponse(download_urls, prompt, {"headers":auth_result.headers})
322 return ImagePreview(download_urls, prompt, {"headers": auth_result.headers}) if is_sediment else ImageResponse(download_urls, prompt, {"headers": auth_result.headers})
323 323
324 324 @classmethod
325 325 async def create_authed(
@@ -363,7 +363,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
363 363 RuntimeError: If an error occurs during processing.
364 364 """
365 365 if temporary is None:
366 temporary = action is not None and conversation_id is not None
366 temporary = action is not None and conversation_id is None
367 367 if action is None:
368 368 action = "next"
369 369 async with StreamSession(
@@ -647,7 +647,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
647 647 if sources.list:
648 648 yield sources
649 649 if conversation.generated_images:
650 yield ImageResponse(conversation.generated_images.urls, conversation.prompt, {"headers":auth_result.headers})
650 yield ImageResponse(conversation.generated_images.urls, conversation.prompt, {"headers": auth_result.headers})
651 651 conversation.generated_images = None
652 652 conversation.prompt = None
653 653 if return_conversation: