summaryrefslogtreecommitdiffstats
path: root/g4f/cli.py
diff options
context:
space:
mode:
authorkafm <wdxdesperado@qq.com>2024-04-28 11:02:44 +0200
committerkafm <wdxdesperado@qq.com>2024-04-28 11:02:44 +0200
commit112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c (patch)
tree22936544568524f9dc9dc32cffa29332f1bf83e0 /g4f/cli.py
parentMerge pull request #1901 from hlohaus/arka (diff)
downloadgpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar.gz
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar.bz2
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar.lz
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar.xz
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.tar.zst
gpt4free-112ca6380bf80e6cbddbc9dfd1d1ef9846c7e55c.zip
Diffstat (limited to '')
-rw-r--r--g4f/cli.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/cli.py b/g4f/cli.py
index 86fc2dbb..9037a6f1 100644
--- a/g4f/cli.py
+++ b/g4f/cli.py
@@ -16,6 +16,7 @@ def main():
api_parser.add_argument("--workers", type=int, default=None, help="Number of workers.")
api_parser.add_argument("--disable-colors", action="store_true", help="Don't use colors.")
api_parser.add_argument("--ignore-cookie-files", action="store_true", help="Don't read .har and cookie files.")
+ api_parser.add_argument("--g4f-api-key", type=str, default=None, help="Sets an authentication key for your API.")
api_parser.add_argument("--ignored-providers", nargs="+", choices=[provider for provider in Provider.__map__],
default=[], help="List of providers to ignore when processing request.")
subparsers.add_parser("gui", parents=[gui_parser()], add_help=False)
@@ -42,6 +43,7 @@ def run_api_args(args):
bind=args.bind,
debug=args.debug,
workers=args.workers,
+ g4f_api_key=args.g4f_api_key,
use_colors=not args.disable_colors
)