setup.py 3.6 KB

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