Merge pull request #669 from jmikedupont2/skypilot

Skypilot
pull/663/merge
Kye Gomez 4 weeks ago committed by GitHub
commit ede33ba571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

49
.gitignore vendored

@ -224,3 +224,52 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
.vscode/settings.json .vscode/settings.json
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data

@ -21,6 +21,7 @@ import traceback
from swarms import Agent from swarms import Agent
from dotenv import load_dotenv from dotenv import load_dotenv
print ("starting")
# Load environment variables # Load environment variables
load_dotenv() load_dotenv()
@ -613,17 +614,25 @@ class SwarmsAPI:
def create_app() -> FastAPI: def create_app() -> FastAPI:
"""Create and configure the FastAPI application.""" """Create and configure the FastAPI application."""
print("create app")
api = SwarmsAPI() api = SwarmsAPI()
return api.app return api.app
if __name__ == "__main__": #if __name__ == "__main__":
if __name__ == '__main__':
#freeze_support()
print("yes in main")
# Configure uvicorn logging # Configure uvicorn logging
logger.info("API Starting") logger.info("API Starting")
uvicorn.run( uvicorn.run(
"main:create_app", "main:create_app",
host="0.0.0.0", host="0.0.0.0",
port=8000, port=8000,
reload=True, # reload=True,
workers=4, # workers=4,
) )
else:
print("not in main")
Loading…
Cancel
Save