setup.py 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. import codecs
  2. import os
  3. from setuptools import find_packages, setup
  4. here = os.path.abspath(os.path.dirname(__file__))
  5. with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as fh:
  6. long_description = '\n' + fh.read()
  7. INSTALL_REQUIRE = [
  8. "requests",
  9. "aiohttp",
  10. "brotli",
  11. "pycryptodome",
  12. "nest_asyncio",
  13. ]
  14. EXTRA_REQUIRE = {
  15. 'all': [
  16. "curl_cffi>=0.6.2",
  17. "certifi",
  18. "browser_cookie3", # get_cookies
  19. "duckduckgo-search>=5.0" ,# internet.search
  20. "beautifulsoup4", # internet.search and bing.create_images
  21. "platformdirs",
  22. "aiohttp_socks", # proxy
  23. "pillow", # image
  24. "cairosvg", # svg image
  25. "werkzeug", "flask", # gui
  26. "fastapi", # api
  27. "uvicorn", # api
  28. "nodriver",
  29. "python-multipart",
  30. ],
  31. 'slim': [
  32. "curl_cffi>=0.6.2",
  33. "certifi",
  34. "duckduckgo-search>=5.0" ,# internet.search
  35. "beautifulsoup4", # internet.search and bing.create_images
  36. "aiohttp_socks", # proxy
  37. "pillow", # image
  38. "cairosvg", # svg image
  39. "werkzeug", "flask", # gui
  40. "fastapi", # api
  41. "uvicorn", # api
  42. "python-multipart",
  43. ],
  44. "image": [
  45. "pillow",
  46. "cairosvg",
  47. "beautifulsoup4"
  48. ],
  49. "webdriver": [
  50. "platformdirs",
  51. "undetected-chromedriver>=3.5.5",
  52. "setuptools",
  53. "selenium-wire"
  54. ],
  55. "webview": [
  56. "webview",
  57. "platformdirs",
  58. "plyer",
  59. "cryptography"
  60. ],
  61. "api": [
  62. "loguru", "fastapi",
  63. "uvicorn",
  64. "python-multipart",
  65. ],
  66. "gui": [
  67. "werkzeug", "flask",
  68. "beautifulsoup4", "pillow",
  69. "duckduckgo-search>=5.0",
  70. "browser_cookie3",
  71. ],
  72. "search": [
  73. "beautifulsoup4", "pillow",
  74. "duckduckgo-search>=5.0",
  75. ],
  76. "local": [
  77. "gpt4all"
  78. ]
  79. }
  80. DESCRIPTION = (
  81. 'The official gpt4free repository | various collection of powerful language models'
  82. )
  83. # Setting up
  84. setup(
  85. name='g4f',
  86. version=os.environ.get("G4F_VERSION"),
  87. author='Tekky',
  88. author_email='<support@g4f.ai>',
  89. description=DESCRIPTION,
  90. long_description_content_type='text/markdown',
  91. long_description=long_description,
  92. packages=find_packages(),
  93. package_data={
  94. 'g4f': ['g4f/interference/*', 'g4f/gui/client/*', 'g4f/gui/server/*', 'g4f/Provider/npm/*', 'g4f/local/models/*']
  95. },
  96. include_package_data=True,
  97. install_requires=INSTALL_REQUIRE,
  98. extras_require=EXTRA_REQUIRE,
  99. entry_points={
  100. 'console_scripts': ['g4f=g4f.cli:main'],
  101. },
  102. url='https://github.com/xtekky/gpt4free', # Link to your GitHub repository
  103. project_urls={
  104. 'Source Code': 'https://github.com/xtekky/gpt4free', # GitHub link
  105. 'Bug Tracker': 'https://github.com/xtekky/gpt4free/issues', # Link to issue tracker
  106. },
  107. keywords=[
  108. 'python',
  109. 'chatbot',
  110. 'reverse-engineering',
  111. 'openai',
  112. 'chatbots',
  113. 'gpt',
  114. 'language-model',
  115. 'gpt-3',
  116. 'gpt3',
  117. 'openai-api',
  118. 'gpt-4',
  119. 'gpt4',
  120. 'chatgpt',
  121. 'chatgpt-api',
  122. 'openai-chatgpt',
  123. 'chatgpt-free',
  124. 'chatgpt-4',
  125. 'chatgpt4',
  126. 'chatgpt4-api',
  127. 'free',
  128. 'free-gpt',
  129. 'gpt4free',
  130. 'g4f',
  131. ],
  132. classifiers=[
  133. 'Development Status :: 2 - Pre-Alpha',
  134. 'Intended Audience :: Developers',
  135. 'Programming Language :: Python :: 3',
  136. 'Operating System :: Unix',
  137. 'Operating System :: MacOS :: MacOS X',
  138. 'Operating System :: Microsoft :: Windows',
  139. ],
  140. )