openai/openai-python

Public

mirrored from https://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.26.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

setup.py

67lines · modeblame

3c6d4cd6Greg Brockman5 years ago1import os
2
3from setuptools import find_packages, setup
4
5version_contents = {}
40c32f9fRachel Lim5 years ago6version_path = os.path.join(
7os.path.abspath(os.path.dirname(__file__)), "openai/version.py"
8)
9with open(version_path, "rt") as f:
3c6d4cd6Greg Brockman5 years ago10exec(f.read(), version_contents)
bbea3dc0Michael Weiss3 years ago11
12with open("README.md", "r") as fh:
13long_description = fh.read()
3c6d4cd6Greg Brockman5 years ago14
ede08829Jakub Roztocil3 years ago15
16DATA_LIBRARIES = [
17# These libraries are optional because of their size. See `openai/datalib.py`.
18"numpy",
19"pandas>=1.2.3", # Needed for CLI fine-tuning data preparation tool
20"pandas-stubs>=1.1.0.11", # Needed for type hints for mypy
21"openpyxl>=3.0.7", # Needed for CLI fine-tuning data preparation tool xlsx format
22]
23
3c6d4cd6Greg Brockman5 years ago24setup(
25name="openai",
26description="Python client library for the OpenAI API",
bbea3dc0Michael Weiss3 years ago27long_description=long_description,
28long_description_content_type="text/markdown",
3c6d4cd6Greg Brockman5 years ago29version=version_contents["VERSION"],
30install_requires=[
40c32f9fRachel Lim5 years ago31"requests>=2.20", # to get the patch for CVE-2018-18074
cf9c04a2Rachel Lim5 years ago32"tqdm", # Needed for progress bars
528a5ba1Michal Vasilek3 years ago33'typing_extensions;python_version<"3.8"', # Needed for type hints for mypy
0abf6413Andrew Chen Wang3 years ago34"aiohttp", # Needed for async support
3c6d4cd6Greg Brockman5 years ago35],
8f8f791coscar-king4 years ago36extras_require={
0abf6413Andrew Chen Wang3 years ago37"dev": ["black~=21.6b0", "pytest==6.*", "pytest-asyncio", "pytest-mock"],
ede08829Jakub Roztocil3 years ago38"datalib": DATA_LIBRARIES,
39"wandb": [
40"wandb",
41*DATA_LIBRARIES,
42],
8f8f791coscar-king4 years ago43"embeddings": [
15b6354fMichelle Pokrass3 years ago44"scikit-learn>=1.0.2", # Needed for embedding utils, versions >= 1.1 require python 3.8
45"tenacity>=8.0.1",
46"matplotlib",
47"sklearn",
48"plotly",
ede08829Jakub Roztocil3 years ago49*DATA_LIBRARIES,
8f8f791coscar-king4 years ago50],
51},
62f8d40fMadeleine Thompson4 years ago52python_requires=">=3.7.1",
3dc4b91eBastian Zimmermann4 years ago53entry_points={
db4750c1Henrique Oliveira Pinto4 years ago54"console_scripts": [
55"openai=openai._openai_scripts:main",
3dc4b91eBastian Zimmermann4 years ago56],
57},
3c6d4cd6Greg Brockman5 years ago58packages=find_packages(exclude=["tests", "tests.*"]),
40c32f9fRachel Lim5 years ago59package_data={
60"openai": [
61"py.typed",
62]
63},
3c6d4cd6Greg Brockman5 years ago64author="OpenAI",
65author_email="support@openai.com",
66url="https://github.com/openai/openai-python",
67)