diff --git a/openai/datalib/__init__.py b/openai/datalib/__init__.py new file mode 100644 index 0000000000..d02b49cfff --- /dev/null +++ b/openai/datalib/__init__.py @@ -0,0 +1,14 @@ +""" +This module helps make data libraries like `numpy` and `pandas` optional dependencies. + +The libraries add up to 130MB+, which makes it challenging to deploy applications +using this library in environments with code size constraints, like AWS Lambda. + +This module serves as an import proxy and provides a few utilities for dealing with the optionality. + +Since the primary use case of this library (talking to the OpenAI API) doesn't generally require data libraries, +it's safe to make them optional. The rare case when data libraries are needed in the client is handled through +assertions with instructive error messages. + +See also `setup.py`. +""" diff --git a/openai/datalib/common.py b/openai/datalib/common.py index 678b3395fd..96f9908a18 100644 --- a/openai/datalib/common.py +++ b/openai/datalib/common.py @@ -1,23 +1,8 @@ -""" -This module helps make data libraries like `numpy` and `pandas` optional dependencies. - -The libraries add up to 130MB+, which makes it challenging to deploy applications -using this library in environments with code size constraints, like AWS Lambda. - -This module serves as an import proxy and provides a few utilities for dealing with the optionality. - -Since the primary use case of this library (talking to the OpenAI API) doesn’t generally require data libraries, -it’s safe to make them optional. The rare case when data libraries are needed in the client is handled through -assertions with instructive error messages. - -See also `setup.py`. - -""" INSTRUCTIONS = """ -OpenAI error: +OpenAI error: - missing `{library}` + missing `{library}` This feature requires additional dependencies: