summaryrefslogtreecommitdiffstats
path: root/g4f/api
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-02-23 20:57:22 +0100
committerGitHub <noreply@github.com>2024-02-23 20:57:22 +0100
commitf1ba06e062c35ddf2f86ee09e1b162cf178ebb47 (patch)
treef19fcd829039435d1aae9ace02873770ca756dca /g4f/api
parentMerge pull request #1616 from hlohaus/gem (diff)
parentSet default values for generation config (diff)
downloadgpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar.gz
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar.bz2
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar.lz
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar.xz
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.tar.zst
gpt4free-f1ba06e062c35ddf2f86ee09e1b162cf178ebb47.zip
Diffstat (limited to 'g4f/api')
-rw-r--r--g4f/api/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py
index 18268eec..abfe3b04 100644
--- a/g4f/api/__init__.py
+++ b/g4f/api/__init__.py
@@ -16,12 +16,12 @@ from g4f.typing import Messages
class ChatCompletionsConfig(BaseModel):
messages: Messages
model: str
- provider: Union[str, None]
+ provider: Union[str, None] = None
stream: bool = False
- temperature: Union[float, None]
- max_tokens: int = None
- stop: Union[list[str], str, None]
- api_key: Union[str, None]
+ temperature: Union[float, None] = None
+ max_tokens: Union[int, None] = None
+ stop: Union[list[str], str, None] = None
+ api_key: Union[str, None] = None
class Api:
def __init__(self, engine: g4f, debug: bool = True, sentry: bool = False,