mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-24 08:19:19 +00:00
Args: Add subcommands to run actions
Migrate OpenAPI and sample config export to subcommands "export-openapi" and "export-config". Also add a "download" subcommand that passes args to the TabbyAPI downloader. This allows models to be downloaded via the API and CLI args. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
4
start.py
4
start.py
@@ -275,8 +275,6 @@ if __name__ == "__main__":
|
||||
from common.args import convert_args_to_dict
|
||||
from main import entrypoint
|
||||
|
||||
converted_args = convert_args_to_dict(args, parser)
|
||||
|
||||
# Create a config if it doesn't exist
|
||||
# This is not necessary to run TabbyAPI, but is new user proof
|
||||
config_path = (
|
||||
@@ -292,7 +290,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
print("Starting TabbyAPI...")
|
||||
entrypoint(converted_args)
|
||||
entrypoint(args, parser)
|
||||
except (ModuleNotFoundError, ImportError):
|
||||
traceback.print_exc()
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user