mirror of
https://github.com/Laurent2916/nio-llm.git
synced 2024-11-21 05:38:48 +00:00
🎨 sort main function arguments by length
This commit is contained in:
parent
2fce498162
commit
8e2c9938ed
|
@ -21,12 +21,13 @@ logger = logging.getLogger("nio-llm.main")
|
|||
@click.option("--room", "-r", help="The room to join.", required=True)
|
||||
@click.option("--preprompt", "-t", help="The preprompt to use.", required=True)
|
||||
def main(
|
||||
homeserver: str,
|
||||
device_id: str,
|
||||
username: str,
|
||||
password: str,
|
||||
*,
|
||||
room: str,
|
||||
password: str,
|
||||
username: str,
|
||||
device_id: str,
|
||||
preprompt: str,
|
||||
homeserver: str,
|
||||
) -> None:
|
||||
"""Run the main program.
|
||||
|
||||
|
@ -43,25 +44,26 @@ def main(
|
|||
# start the async loop
|
||||
asyncio.get_event_loop().run_until_complete(
|
||||
_main(
|
||||
ggml_path=ggml_path,
|
||||
homeserver=homeserver,
|
||||
device_id=device_id,
|
||||
username=username,
|
||||
password=password,
|
||||
preprompt=preprompt,
|
||||
room=room,
|
||||
password=password,
|
||||
username=username,
|
||||
device_id=device_id,
|
||||
ggml_path=ggml_path,
|
||||
preprompt=preprompt,
|
||||
homeserver=homeserver,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
async def _main(
|
||||
homeserver: str,
|
||||
device_id: str,
|
||||
username: str,
|
||||
*,
|
||||
room: str,
|
||||
password: str,
|
||||
username: str,
|
||||
device_id: str,
|
||||
preprompt: str,
|
||||
ggml_path: Path,
|
||||
room: str,
|
||||
homeserver: str,
|
||||
) -> None:
|
||||
"""Run the async main program.
|
||||
|
||||
|
@ -69,12 +71,12 @@ async def _main(
|
|||
"""
|
||||
# create the client
|
||||
client = LLMClient(
|
||||
homeserver=homeserver,
|
||||
device_id=device_id,
|
||||
username=username,
|
||||
room=room,
|
||||
preprompt=preprompt,
|
||||
username=username,
|
||||
device_id=device_id,
|
||||
ggml_path=ggml_path,
|
||||
preprompt=preprompt,
|
||||
homeserver=homeserver,
|
||||
)
|
||||
|
||||
# Login to the homeserver
|
||||
|
|
Loading…
Reference in a new issue