Python 3.9 compatibility.
This commit is contained in:
parent
e8343fde01
commit
380b7c1b67
@ -1,5 +1,5 @@
|
||||
import pathlib
|
||||
from typing import TypedDict, Any
|
||||
from typing import TypedDict, Any, Union
|
||||
|
||||
|
||||
class OpenAIConfig(TypedDict):
|
||||
@ -15,7 +15,7 @@ class OpenAIConfig(TypedDict):
|
||||
presence_penalty: float
|
||||
|
||||
|
||||
def openai_config_valid(conf: dict[str, str | float | int]) -> bool:
|
||||
def openai_config_valid(conf: dict[str, Union[str, float, int]]) -> bool:
|
||||
"""
|
||||
Checks if the given Open AI configuration dict is complete
|
||||
and contains valid types and values.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user