-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(llms): support OpenAI API v1 (#753)
* feat(llms): support OpenAI API v1 * fmt * temporarily skip azure openai tests * 'Refactored by Sourcery' --------- Co-authored-by: Sourcery AI <>
- Loading branch information
1 parent
6de6b39
commit 68163d5
Showing
9 changed files
with
518 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
from importlib.metadata import version | ||
|
||
from packaging.version import parse | ||
|
||
|
||
def is_openai_v1() -> bool: | ||
_version = parse(version("openai")) | ||
return _version.major >= 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.