text-generation-webui/extensions/api/script.py

12 lines
342 B
Python
Raw Normal View History

import extensions.api.blocking_api as blocking_api
import extensions.api.streaming_api as streaming_api
2023-03-15 16:52:46 -04:00
from modules import shared
BLOCKING_PORT = 5000
STREAMING_PORT = 5005
2023-05-09 21:49:39 -04:00
2023-03-19 09:22:24 -04:00
def setup():
blocking_api.start_server(BLOCKING_PORT, share=shared.args.public_api)
streaming_api.start_server(STREAMING_PORT, share=shared.args.public_api)