mirror of
https://github.com/open-webui/computer.git
synced 2026-11-22 21:50:43 -05:00
refac
This commit is contained in:
1 parent
4dfe96e0e8
commit
2514e96b12
3 files changed
+21
-1
No files matched your search
@@ -1403,6 +1403,16 @@ async def run_chat_task(
|
||||
output_queue: asyncio.Queue | None = None,
|
||||
):
|
||||
"""Plain async function. Makes raw API calls in a loop."""
|
||||
if request is None:
|
||||
try:
|
||||
from cptr.app import app as cptr_app
|
||||
from cptr.utils.identity import internal_request_for_user
|
||||
|
||||
request = await internal_request_for_user(cptr_app, user_id)
|
||||
except Exception:
|
||||
logger.debug(
|
||||
"[task %s] internal request creation failed", message_id[:8], exc_info=True
|
||||
)
|
||||
|
||||
async def emit(**data):
|
||||
"""Stream an output delta to the user."""
|
||||
|
||||
Reference in new issue
Block a user