update webui and add CLIs
Former-commit-id: 1368dda22ab875914c9dd86ee5146a4f6a4736ad
This commit is contained in:
@@ -224,7 +224,8 @@ def create_app(chat_model: "ChatModel") -> "FastAPI":
|
||||
return app
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def run_api():
|
||||
chat_model = ChatModel()
|
||||
app = create_app(chat_model)
|
||||
print("Visit http://localhost:{}/docs for API document.".format(os.environ.get("API_PORT", 8000)))
|
||||
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("API_PORT", 8000)), workers=1)
|
||||
|
||||
Reference in New Issue
Block a user