From 87cf743a41c8bf1ac9950b336b8abfb98f9d66b1 Mon Sep 17 00:00:00 2001 From: ThatLukinhasGuy <139662282+thatlukinhasguy1@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:51:32 -0300 Subject: Update __init__.py --- g4f/api/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index d86364d1..8ea61dba 100644 --- a/g4f/api/__init__.py +++ b/g4f/api/__init__.py @@ -162,6 +162,6 @@ async def chat_completions(request: Request, item: JSONStructure = None): async def completions(): return Response(content=json.dumps({'info': 'Not working yet.'}, indent=4), media_type="application/json") -def run(ip): +def run(ip, thread_quantity): split_ip = ip.split(":") - uvicorn.run(app, host=split_ip[0], port=int(split_ip[1]), use_colors=False) + uvicorn.run(app, host=split_ip[0], port=int(split_ip[1]), use_colors=False, workers=thread_quantity) -- cgit v1.2.3