mirror of
https://github.com/Laurent2916/nio-llm.git
synced 2024-11-14 00:58:14 +00:00
✨ enable environment variable and force positional arguments in jsonsargparse CLI
This commit is contained in:
parent
ee6c165268
commit
0479c69fbc
|
@ -17,11 +17,11 @@ def main(
|
||||||
room: str,
|
room: str,
|
||||||
password: str,
|
password: str,
|
||||||
username: str,
|
username: str,
|
||||||
device_id: str,
|
|
||||||
preprompt: str,
|
preprompt: str,
|
||||||
|
device_id: str = "nio-llm",
|
||||||
|
homeserver: str = "https://matrix.org",
|
||||||
ggml_repoid: str = "TheBloke/stable-vicuna-13B-GGML",
|
ggml_repoid: str = "TheBloke/stable-vicuna-13B-GGML",
|
||||||
ggml_filename: str = "stable-vicuna-13B.ggmlv3.q5_1.bin",
|
ggml_filename: str = "stable-vicuna-13B.ggmlv3.q5_1.bin",
|
||||||
homeserver: str = "https://matrix.org",
|
|
||||||
sync_timeout: int = 30000,
|
sync_timeout: int = 30000,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Download llama model from HuggingFace and start the client.
|
"""Download llama model from HuggingFace and start the client.
|
||||||
|
@ -83,4 +83,9 @@ if __name__ == "__main__":
|
||||||
)
|
)
|
||||||
|
|
||||||
# run the main program (with environment variables)
|
# run the main program (with environment variables)
|
||||||
CLI(main)
|
CLI(
|
||||||
|
components=main,
|
||||||
|
as_positional=False,
|
||||||
|
env_prefix="NIO_LLM",
|
||||||
|
default_env=True,
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue