forked from XSpoonAi/spoon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (20 loc) · 834 Bytes
/
Copy pathmain.py
File metadata and controls
26 lines (20 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import argparse
import asyncio
import logging
from cli.commands import SpoonAICLI
logging.getLogger("requests").setLevel(logging.ERROR)
logging.getLogger("urllib3").setLevel(logging.ERROR)
async def main():
parser = argparse.ArgumentParser(description="SpoonAI CLI")
parser.add_argument('--server', action='store_true', help='Start the server')
parser.add_argument('--host', default='0.0.0.0', help='Server host')
parser.add_argument('--port', default=8000, type=int, help='Server port')
parser.add_argument('--verbose', action='store_true', help='Verbose output')
args = parser.parse_args()
if args.server:
raise NotImplementedError("Server model is not implemented yet")
else:
cli = SpoonAICLI()
await cli.run()
if __name__ == "__main__":
asyncio.run(main())