configuration is now a TypedDict in its own module
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user