mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -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
28 lines
No EOL
800 B
Python
28 lines
No EOL
800 B
Python
from .gui_parser import gui_parser
|
|
from ..cookies import read_cookie_files
|
|
from ..gui import run_gui
|
|
from ..Provider import ProviderUtils
|
|
|
|
import g4f.cookies
|
|
import g4f.debug
|
|
|
|
def run_gui_args(args):
|
|
if args.debug:
|
|
g4f.debug.logging = True
|
|
if not args.ignore_cookie_files:
|
|
read_cookie_files()
|
|
host = args.host
|
|
port = args.port
|
|
debug = args.debug
|
|
g4f.cookies.BROWSERS = [g4f.cookies[browser] for browser in args.cookie_browsers]
|
|
if args.ignored_providers:
|
|
for provider in args.ignored_providers:
|
|
if provider in ProviderUtils.convert:
|
|
ProviderUtils.convert[provider].working = False
|
|
|
|
run_gui(host, port, debug)
|
|
|
|
if __name__ == "__main__":
|
|
parser = gui_parser()
|
|
args = parser.parse_args()
|
|
run_gui_args(args) |