configuration is now a TypedDict in its own module

This commit is contained in:
2023-08-16 08:14:41 +02:00
parent 4303fb414f
commit dc13213c4d
5 changed files with 43 additions and 26 deletions
+23
View File
@@ -0,0 +1,23 @@
from typing import TypedDict
class OpenAIConfig(TypedDict):
"""
The OpenAI section of the configuration file.
"""
api_key: str
model: str
temperature: float
max_tokens: int
top_p: float
frequency_penalty: float
presence_penalty: float
class Config(TypedDict):
"""
The configuration file structure.
"""
system: str
db: str
openai: OpenAIConfig