Skip to content

Commit

Permalink
fix(download): Fix download url by reverting change (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: James Chua <[email protected]>
  • Loading branch information
thejaminator and thejaminator authored Jan 25, 2023
1 parent bf51385 commit 88b267b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions openai/api_resources/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,9 @@ def __prepare_file_download(

if typed_api_type in (ApiType.AZURE, ApiType.AZURE_AD):
base = cls.class_url()
url = "/%s%s/%s?api-version=%s" % (
cls.azure_api_prefix,
base,
id,
api_version,
)
url = f"/{cls.azure_api_prefix}{base}/{id}/content?api-version={api_version}"
elif typed_api_type == ApiType.OPEN_AI:
url = "%s/%s" % (cls.class_url(), id)
url = f"{cls.class_url()}/{id}/content"
else:
raise error.InvalidAPIType("Unsupported API type %s" % api_type)

Expand Down

0 comments on commit 88b267b

Please sign in to comment.