Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03f848e

Browse files
allow api_version to be set by environment variable (#438)
1 parentf24d193 commit03f848e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎openai/__init__.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@
4848
organization=os.environ.get("OPENAI_ORGANIZATION")
4949
api_base=os.environ.get("OPENAI_API_BASE","https://api.openai.com/v1")
5050
api_type=os.environ.get("OPENAI_API_TYPE","open_ai")
51-
api_version= (
52-
"2023-03-15-preview"ifapi_typein ("azure","azure_ad","azuread")elseNone
51+
api_version=os.environ.get(
52+
"OPENAI_API_VERSION",
53+
("2023-03-15-preview"ifapi_typein ("azure","azure_ad","azuread")elseNone),
5354
)
5455
verify_ssl_certs=True# No effect. Certificates are always verified.
5556
proxy=None

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp