mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 10:40:43 -08:00
- In `g4f/Provider/needs_auth/LMArenaBeta.py`, import `has_nodriver` from `...requests` in the same line as other imports - Change `working` attribute to be set based on `has_nodriver` instead of `True` - Add new class attribute `active_by_default = True` to `LMArenaBeta` - In `g4f/cli/__init__.py`, change `--cookie-browsers` argument choices to use `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers` - In `g4f/cli/__init__.py`, update `run_api_args` to assign to `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers` - In `g4f/gui/gui_parser.py`, change import from `browsers` to `BROWSERS` - In `g4f/gui/gui_parser.py`, update `--cookie-browsers` argument choices to use `BROWSERS` instead of `browsers` - In `g4f/gui/run.py`, update `run_gui_args` to assign to `g4f.cookies.BROWSERS` instead of `g4f.cookies.browsers
16 lines
No EOL
1 KiB
Python
16 lines
No EOL
1 KiB
Python
from argparse import ArgumentParser
|
|
|
|
from ..cookies import BROWSERS
|
|
from .. import Provider
|
|
|
|
def gui_parser():
|
|
parser = ArgumentParser(description="Run the GUI")
|
|
parser.add_argument("--host", type=str, default="0.0.0.0", help="hostname")
|
|
parser.add_argument("--port", "-p", type=int, default=8080, help="port")
|
|
parser.add_argument("--debug", "-d", "-debug", action="store_true", help="debug mode")
|
|
parser.add_argument("--ignore-cookie-files", action="store_true", help="Don't read .har and cookie files.")
|
|
parser.add_argument("--ignored-providers", nargs="+", choices=[provider.__name__ for provider in Provider.__providers__ if provider.working],
|
|
default=[], help="List of providers to ignore when processing request. (incompatible with --reload and --workers)")
|
|
parser.add_argument("--cookie-browsers", nargs="+", choices=[browser.__name__ for browser in BROWSERS],
|
|
default=[], help="List of browsers to access or retrieve cookies from.")
|
|
return parser |