From 2955729584ca26a6dbc98f735aee10305dcc29a3 Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:56:51 +0100 Subject: [PATCH] Fix docker build, fix temporary chat --- docker/Dockerfile | 3 +-- g4f/Provider/needs_auth/OpenaiChat.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 1a12dca0..0221c54d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -45,8 +45,7 @@ WORKDIR $G4F_DIR COPY requirements.txt $G4F_DIR # Upgrade pip for the latest features and install the project's Python dependencies. -RUN pip install --break-system-packages --upgrade pip \ - && pip install --break-system-packages -r requirements.txt +RUN pip install --break-system-packages -r requirements.txt # Copy the entire package into the container. ADD --chown=$SEL_UID:$SEL_GID g4f $G4F_DIR/g4f diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index be1ffbfb..5e51a7b8 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -319,7 +319,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin): debug.error("OpenaiChat: Download image failed") debug.error(e) if download_urls: - return ImagePreview(download_urls, prompt, {"headers":auth_result.headers}) if is_sediment else ImageResponse(download_urls, prompt, {"headers":auth_result.headers}) + return ImagePreview(download_urls, prompt, {"headers": auth_result.headers}) if is_sediment else ImageResponse(download_urls, prompt, {"headers": auth_result.headers}) @classmethod async def create_authed( @@ -363,7 +363,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin): RuntimeError: If an error occurs during processing. """ if temporary is None: - temporary = action is not None and conversation_id is not None + temporary = action is not None and conversation_id is None if action is None: action = "next" async with StreamSession( @@ -647,7 +647,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin): if sources.list: yield sources if conversation.generated_images: - yield ImageResponse(conversation.generated_images.urls, conversation.prompt, {"headers":auth_result.headers}) + yield ImageResponse(conversation.generated_images.urls, conversation.prompt, {"headers": auth_result.headers}) conversation.generated_images = None conversation.prompt = None if return_conversation: