From 743fbc2a6c5b4edc15fe64b095380aae6c59966d Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Mon, 6 May 2024 08:16:49 +0200 Subject: Update __init__.py --- g4f/api/__init__.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'g4f/api') diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index 20cc42db..f1374dc9 100644 --- a/g4f/api/__init__.py +++ b/g4f/api/__init__.py @@ -53,16 +53,9 @@ class AppConfig(): ignore_cookie_files: bool = False @classmethod - def set_list_ignored_providers(cls, ignored: list[str]): - cls.list_ignored_providers = ignored - - @classmethod - def set_g4f_api_key(cls, key: str = None): - cls.g4f_api_key = key - - @classmethod - def set_ignore_cookie_files(cls, value: bool): - cls.ignore_cookie_files = value + def set_config(cls, **data): + for key, value in data.items(): + setattr(cls, key, value) class Api: def __init__(self, app: FastAPI) -> None: -- cgit v1.2.3