diff options
author | razrab <razrab@PimoLin> | 2023-10-23 10:01:08 +0200 |
---|---|---|
committer | razrab <razrab@PimoLin> | 2023-10-23 10:01:40 +0200 |
commit | 36fe869a81ad44480b2aa72bdc3fae2952c69816 (patch) | |
tree | 9eb201ed704f06e3524fe006db0016a7b4215837 /g4f_api/__main__.py | |
parent | Merge remote-tracking branch 'upstream/main' into api-ignore-providers (diff) | |
download | gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar.gz gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar.bz2 gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar.lz gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar.xz gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.tar.zst gpt4free-36fe869a81ad44480b2aa72bdc3fae2952c69816.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f_api/__main__.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/g4f_api/__main__.py b/g4f_api/__main__.py deleted file mode 100644 index 58267686..00000000 --- a/g4f_api/__main__.py +++ /dev/null @@ -1,23 +0,0 @@ -import typing -from enum import Enum -from g4f import Provider -from g4f_api import ApiInterface -import typer - -IgnoredProviders = Enum("ignore_providers", {key:key for key in Provider.__all__}) - -app = typer.Typer(help="Run the G4F API") - -@app.command() -def main( - bind_str: str = typer.Argument(..., envvar="G4F_API_BIND_STR", help="The bind string."), - i_num_threads: int = typer.Option(1, envvar="G4F_API_NUM_THREADS", help="The number of threads."), - list_ignored_providers: typing.List[IgnoredProviders] = typer.Option([], envvar="G4F_API_LIST_IGNORED_PROVIDERS", help="List of providers to ignore when processing request."), -): - list_ignored_providers=[provider.name for provider in list_ignored_providers] - ApiInterface.list_ignored_providers=list_ignored_providers - ApiInterface.api.run(bind_str, i_num_threads) - - -if __name__ == "__main__": - app()
\ No newline at end of file |