Skip to content

Commit

Permalink
Add api_version and organization field in Audio API requests (#514)
Browse files Browse the repository at this point in the history
* Add api_version and organization field in Audio API requests

* update version
  • Loading branch information
yutian-openai authored Jul 6, 2023
1 parent 041bf5a commit d1c3658
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions openai/api_resources/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def transcribe(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("transcriptions")
Expand Down Expand Up @@ -86,6 +88,8 @@ def translate(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("translations")
Expand Down Expand Up @@ -114,6 +118,8 @@ def transcribe_raw(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("transcriptions")
Expand Down Expand Up @@ -142,6 +148,8 @@ def translate_raw(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("translations")
Expand Down Expand Up @@ -169,6 +177,8 @@ async def atranscribe(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("transcriptions")
Expand Down Expand Up @@ -198,6 +208,8 @@ async def atranslate(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("translations")
Expand Down Expand Up @@ -228,6 +240,8 @@ async def atranscribe_raw(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("transcriptions")
Expand Down Expand Up @@ -258,6 +272,8 @@ async def atranslate_raw(
api_key=api_key,
api_base=api_base,
api_type=api_type,
api_version=api_version,
organization=organization,
**params,
)
url = cls._get_url("translations")
Expand Down
2 changes: 1 addition & 1 deletion openai/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.27.8"
VERSION = "0.27.9"

0 comments on commit d1c3658

Please sign in to comment.