Skip to content

Commit 88b267b

Browse files
authored
fix(download): Fix download url by reverting change (#197)
Co-authored-by: James Chua <[email protected]>
1 parent bf51385 commit 88b267b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

openai/api_resources/file.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,9 @@ def __prepare_file_download(
138138

139139
if typed_api_type in (ApiType.AZURE, ApiType.AZURE_AD):
140140
base = cls.class_url()
141-
url = "/%s%s/%s?api-version=%s" % (
142-
cls.azure_api_prefix,
143-
base,
144-
id,
145-
api_version,
146-
)
141+
url = f"/{cls.azure_api_prefix}{base}/{id}/content?api-version={api_version}"
147142
elif typed_api_type == ApiType.OPEN_AI:
148-
url = "%s/%s" % (cls.class_url(), id)
143+
url = f"{cls.class_url()}/{id}/content"
149144
else:
150145
raise error.InvalidAPIType("Unsupported API type %s" % api_type)
151146

0 commit comments

Comments
 (0)