setup.py 4.1 KB

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