Fix docker build, fix temporary chat

This commit is contained in:
hlohaus 2025-11-10 19:56:51 +01:00
parent bed8b7c083
commit 2955729584
2 changed files with 4 additions and 5 deletions

View file

@ -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

View file

@ -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: