This commit is contained in:
Sam Partee 2024-04-26 15:37:15 -07:00
parent 31d9fbf020
commit 8b62119cb2

View file

@ -7,8 +7,6 @@ from rich.console import Console
from rich.markup import escape from rich.markup import escape
from toolserve.server.core.conf import settings from toolserve.server.core.conf import settings
from toolserve.server.main import app
from toolserve.apm.pack import Packer
cli = typer.Typer() cli = typer.Typer()
@ -31,6 +29,8 @@ def serve(
Starts the server with host, port, and reload options. Uses Starts the server with host, port, and reload options. Uses
Uvicorn as ASGI server. Parameters allow runtime configuration. Uvicorn as ASGI server. Parameters allow runtime configuration.
""" """
from toolserve.server.main import app
try: try:
uvicorn.run( uvicorn.run(
app=app, app=app,
@ -56,6 +56,8 @@ def pack(
""" """
Creates a new tool pack with the given name, description, and result type. Creates a new tool pack with the given name, description, and result type.
""" """
from toolserve.apm.pack import Packer
try: try:
pack = Packer(directory) pack = Packer(directory)
pack.create_pack() pack.create_pack()