diff options
author | ThatLukinhasGuy <139662282+thatlukinhasguy1@users.noreply.github.com> | 2023-11-04 21:51:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 21:51:32 +0100 |
commit | 87cf743a41c8bf1ac9950b336b8abfb98f9d66b1 (patch) | |
tree | 9b43af5cb4f4e2e1211c99894c25abdd3ec4a4b3 | |
parent | Update __init__.py (#1) (diff) | |
download | gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar.gz gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar.bz2 gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar.lz gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar.xz gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.tar.zst gpt4free-87cf743a41c8bf1ac9950b336b8abfb98f9d66b1.zip |
-rw-r--r-- | g4f/api/__init__.py | 4 |
1 files 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) |