Compare commits

..

2 Commits

Author SHA1 Message Date
43608c736a configuration: added tests 2023-09-08 10:42:15 +02:00
3b01c84ad7 configuration et al: implemented new Config format 2023-09-08 10:42:15 +02:00

View File

@ -31,6 +31,8 @@ class OpenAIConfig(AIConfig):
"""
The OpenAI section of the configuration file.
"""
# the name must not be changed
name: Final[str] = 'openai'
# all members have default values, so we can easily create
# a default configuration
ID: str = 'default'
@ -42,8 +44,6 @@ class OpenAIConfig(AIConfig):
top_p: float = 1.0
frequency_penalty: float = 0.0
presence_penalty: float = 0.0
# the name should not be changed
name: Final[str] = 'openai'
@classmethod
def from_dict(cls: Type[OpenAIConfigInst], source: dict[str, Any]) -> OpenAIConfigInst: