Skip to content

Commit

Permalink
Merge pull request #669 from jmikedupont2/skypilot
Browse files Browse the repository at this point in the history
Skypilot
  • Loading branch information
kyegomez authored Dec 10, 2024
2 parents 0f46f64 + 823051a commit ede33ba
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,52 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.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

15 changes: 12 additions & 3 deletions api/agent_api.py → api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from swarms import Agent
from dotenv import load_dotenv

print ("starting")
# Load environment variables
load_dotenv()

Expand Down Expand Up @@ -613,17 +614,25 @@ async def _cleanup_old_metrics(self, agent_id: UUID):

def create_app() -> FastAPI:
"""Create and configure the FastAPI application."""
print("create app")
api = SwarmsAPI()
return api.app


if __name__ == "__main__":
#if __name__ == "__main__":
if __name__ == '__main__':
#freeze_support()
print("yes in main")
# Configure uvicorn logging
logger.info("API Starting")

uvicorn.run(
"main:create_app",
host="0.0.0.0",
port=8000,
reload=True,
workers=4,
# reload=True,
# workers=4,
)
else:
print("not in main")

0 comments on commit ede33ba

Please sign in to comment.