mirror of
https://github.com/hwchase17/langchain
synced 2024-11-02 09:40:22 +00:00
b2fd41331e
Addded missed docstrings. Fixed inconsistency in docstrings. **Note** CC @efriis There were PR errors on `langchain_experimental/prompt_injection_identifier/hugging_face_identifier.py` But, I didn't touch this file in this PR! Can it be some cache problems? I fixed this error.
12 lines
264 B
Python
12 lines
264 B
Python
from __future__ import annotations
|
|
|
|
from importlib.metadata import version
|
|
|
|
from packaging.version import parse
|
|
|
|
|
|
def is_openai_v1() -> bool:
|
|
"""Return whether OpenAI API is v1 or more."""
|
|
_version = parse(version("openai"))
|
|
return _version.major >= 1
|