File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 7
7
from urllib .parse import urlencode , urlsplit , urlunsplit
8
8
9
9
import requests
10
- from typing_extensions import Literal
10
+
11
+ # Literal is available from Python 3.8
12
+ try :
13
+ from typing import Literal
14
+ except ImportError :
15
+ from typing_extensions import Literal
11
16
12
17
import openai
13
18
from openai import error , util , version
Original file line number Diff line number Diff line change 25
25
"pandas-stubs>=1.1.0.11" , # Needed for type hints for mypy
26
26
"openpyxl>=3.0.7" , # Needed for CLI fine-tuning data preparation tool xlsx format
27
27
"numpy" ,
28
- " typing_extensions" , # Needed for type hints for mypy
28
+ ' typing_extensions;python_version<"3.8"' , # Needed for type hints for mypy
29
29
],
30
30
extras_require = {
31
31
"dev" : ["black~=21.6b0" , "pytest==6.*" ],
You can’t perform that action at this time.
0 commit comments