summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThatLukinhasGuy <139662282+thatlukinhasguy1@users.noreply.github.com>2023-11-04 21:51:32 +0100
committerGitHub <noreply@github.com>2023-11-04 21:51:32 +0100
commit87cf743a41c8bf1ac9950b336b8abfb98f9d66b1 (patch)
tree9b43af5cb4f4e2e1211c99894c25abdd3ec4a4b3
parentUpdate __init__.py (#1) (diff)
downloadgpt4free-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__.py4
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)