Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbea3dc commit 528a5baCopy full SHA for 528a5ba
openai/api_requestor.py
@@ -7,7 +7,12 @@
7
from urllib.parse import urlencode, urlsplit, urlunsplit
8
9
import requests
10
-from typing_extensions import Literal
+
11
+# Literal is available from Python 3.8
12
+try:
13
+ from typing import Literal
14
+except ImportError:
15
+ from typing_extensions import Literal
16
17
import openai
18
from openai import error, util, version
setup.py
@@ -25,7 +25,7 @@
25
"pandas-stubs>=1.1.0.11", # Needed for type hints for mypy
26
"openpyxl>=3.0.7", # Needed for CLI fine-tuning data preparation tool xlsx format
27
"numpy",
28
- "typing_extensions", # Needed for type hints for mypy
+ 'typing_extensions;python_version<"3.8"', # Needed for type hints for mypy
29
],
30
extras_require={
31
"dev": ["black~=21.6b0", "pytest==6.*"],
0 commit comments