setup.py 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. "pypdf2", # files
  34. "docx",
  35. "odfpy",
  36. "ebooklib",
  37. "openpyxl",
  38. ],
  39. 'slim': [
  40. "curl_cffi>=0.6.2",
  41. "certifi",
  42. "duckduckgo-search>=5.0" ,# internet.search
  43. "beautifulsoup4", # internet.search and bing.create_images
  44. "aiohttp_socks", # proxy
  45. "pillow", # image
  46. "cairosvg", # svg image
  47. "werkzeug", "flask", # gui
  48. "fastapi", # api
  49. "uvicorn", # api
  50. "python-multipart",
  51. "pypdf2", # files
  52. "docx",
  53. ],
  54. "image": [
  55. "pillow",
  56. "cairosvg",
  57. "beautifulsoup4"
  58. ],
  59. "webview": [
  60. "pywebview",
  61. "platformdirs",
  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. "files": [
  83. "spacy",
  84. "beautifulsoup4",
  85. "pypdf2",
  86. "docx",
  87. "odfpy",
  88. "ebooklib",
  89. "openpyxl",
  90. ]
  91. }
  92. DESCRIPTION = (
  93. 'The official gpt4free repository | various collection of powerful language models'
  94. )
  95. # Setting up
  96. setup(
  97. name='g4f',
  98. version=os.environ.get("G4F_VERSION"),
  99. author='Tekky',
  100. author_email='<support@g4f.ai>',
  101. description=DESCRIPTION,
  102. long_description_content_type='text/markdown',
  103. long_description=long_description,
  104. packages=find_packages(),
  105. package_data={
  106. 'g4f': ['g4f/interference/*', 'g4f/gui/client/*', 'g4f/gui/server/*', 'g4f/Provider/npm/*', 'g4f/local/models/*']
  107. },
  108. include_package_data=True,
  109. install_requires=INSTALL_REQUIRE,
  110. extras_require=EXTRA_REQUIRE,
  111. entry_points={
  112. 'console_scripts': ['g4f=g4f.cli:main'],
  113. },
  114. url='https://github.com/xtekky/gpt4free', # Link to your GitHub repository
  115. project_urls={
  116. 'Source Code': 'https://github.com/xtekky/gpt4free', # GitHub link
  117. 'Bug Tracker': 'https://github.com/xtekky/gpt4free/issues', # Link to issue tracker
  118. },
  119. keywords=[
  120. 'python',
  121. 'chatbot',
  122. 'reverse-engineering',
  123. 'openai',
  124. 'chatbots',
  125. 'gpt',
  126. 'language-model',
  127. 'gpt-3',
  128. 'gpt3',
  129. 'openai-api',
  130. 'gpt-4',
  131. 'gpt4',
  132. 'chatgpt',
  133. 'chatgpt-api',
  134. 'openai-chatgpt',
  135. 'chatgpt-free',
  136. 'chatgpt-4',
  137. 'chatgpt4',
  138. 'chatgpt4-api',
  139. 'free',
  140. 'free-gpt',
  141. 'gpt4free',
  142. 'g4f',
  143. ],
  144. classifiers=[
  145. 'Development Status :: 2 - Pre-Alpha',
  146. 'Intended Audience :: Developers',
  147. 'Programming Language :: Python :: 3',
  148. 'Operating System :: Unix',
  149. 'Operating System :: MacOS :: MacOS X',
  150. 'Operating System :: Microsoft :: Windows',
  151. ],
  152. )