mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #7229] API CHAT COMPLETIONS - ERROR [asyncio] Unclosed client session #14667
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CodeGorger on GitHub (Nov 22, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7229
Bug Report
Installation Method
Via the provided docker.
Environment
0.3.35 and newer
0.3.8
Expected Behavior:
No error, filter outlet gets called properly.
Actual Behavior:
[Describe what actually happened.]
Description
Bug Summary:
Error upon usage of endpoint /api/chat/completions
Reproduction Details
Steps to Reproduce:
Use the endpoint /api/chat/completions of openwebui.
Logs and Screenshots
Docker Container Logs:
INFO: 213.146.3.1:36791 - "POST /api/chat/completions HTTP/1.1" 200 OK
ERROR [asyncio] Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f75840e4a90>
ERROR [asyncio] Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f757effd6a0>, 26900.859)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f7586e44a90>
Additional Information
Using the endpoint /api/chat/completions always causes an error. What does work, is the inlet function of our filter. Then the response from the llm gets streamed properly. At the end of the streaming, the error triggers and the outlet never gets called anymore.
This problem does not happen, when using the openwebui frontend.
Assumption: The error happens, when the connection (after the streaming) doesn't properly shut down in "backend/open_webui/main.py".
@ay4t commented on GitHub (Nov 22, 2024):
i have same issue when i using advanced RAG pipeline

but if i disable the outlet function it works very well but my pipeline functionality is not working
