From 6b3be02d63b4c3592654a0059474c37465015e11 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 23 Feb 2024 19:30:53 +0100 Subject: Set default values for generation config Set a list of providers --- g4f/api/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'g4f/api') 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, -- cgit v1.2.3