summaryrefslogtreecommitdiffstats
path: root/g4f/api
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-05-06 08:16:49 +0200
committerGitHub <noreply@github.com>2024-05-06 08:16:49 +0200
commit743fbc2a6c5b4edc15fe64b095380aae6c59966d (patch)
tree43da28e4ceb7289db93de1cfe947780dfaff30eb /g4f/api
parentMerge pull request #1925 from hlohaus/worker (diff)
downloadgpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar.gz
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar.bz2
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar.lz
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar.xz
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.tar.zst
gpt4free-743fbc2a6c5b4edc15fe64b095380aae6c59966d.zip
Diffstat (limited to 'g4f/api')
-rw-r--r--g4f/api/__init__.py13
1 files changed, 3 insertions, 10 deletions
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: