2023-07-17 00:12:49 +00:00
|
|
|
import codecs
|
|
|
|
import os
|
|
|
|
|
2023-07-28 10:07:17 +00:00
|
|
|
from setuptools import find_packages, setup
|
|
|
|
|
2023-07-17 00:12:49 +00:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
2023-11-08 09:05:39 +00:00
|
|
|
with codecs.open(os.path.join(here, 'README.md'), encoding='utf-8') as fh:
|
|
|
|
long_description = '\n' + fh.read()
|
2023-07-28 10:07:17 +00:00
|
|
|
|
2024-01-26 06:54:13 +00:00
|
|
|
INSTALL_REQUIRE = [
|
2024-01-12 01:14:35 +00:00
|
|
|
"requests",
|
|
|
|
"aiohttp",
|
2024-03-25 20:19:13 +00:00
|
|
|
"brotli",
|
|
|
|
"pycryptodome"
|
2024-01-12 01:14:35 +00:00
|
|
|
]
|
2023-07-17 00:12:49 +00:00
|
|
|
|
2024-01-26 06:54:13 +00:00
|
|
|
EXTRA_REQUIRE = {
|
|
|
|
'all': [
|
2024-03-06 16:41:17 +00:00
|
|
|
"curl_cffi>=0.6.2",
|
2024-01-26 06:54:13 +00:00
|
|
|
"certifi",
|
|
|
|
"browser_cookie3", # get_cookies
|
2024-03-27 18:04:00 +00:00
|
|
|
"PyExecJS", # GptForLove, Vercel
|
2024-03-06 16:41:17 +00:00
|
|
|
"duckduckgo-search>=5.0" ,# internet.search
|
2024-01-26 06:54:13 +00:00
|
|
|
"beautifulsoup4", # internet.search and bing.create_images
|
2024-03-27 18:04:00 +00:00
|
|
|
"brotli", # openai, bing
|
|
|
|
# webdriver
|
|
|
|
#"undetected-chromedriver>=3.5.5",
|
|
|
|
#"setuptools",
|
|
|
|
#"selenium-wire"
|
|
|
|
# webview
|
2024-03-22 11:48:59 +00:00
|
|
|
"pywebview",
|
|
|
|
"platformdirs",
|
|
|
|
"plyer",
|
2024-03-27 18:04:00 +00:00
|
|
|
"cryptography",
|
|
|
|
####
|
2024-01-31 20:36:47 +00:00
|
|
|
"aiohttp_socks", # proxy
|
2024-01-26 06:54:13 +00:00
|
|
|
"pillow", # image
|
|
|
|
"cairosvg", # svg image
|
|
|
|
"werkzeug", "flask", # gui
|
2024-03-27 18:04:00 +00:00
|
|
|
"loguru", "fastapi", # api
|
2024-01-26 06:54:13 +00:00
|
|
|
"uvicorn", "nest_asyncio", # api
|
2024-03-27 18:04:00 +00:00
|
|
|
"pycryptodome" # openai
|
2024-01-26 06:54:13 +00:00
|
|
|
],
|
|
|
|
"image": [
|
|
|
|
"pillow",
|
|
|
|
"cairosvg",
|
|
|
|
"beautifulsoup4"
|
|
|
|
],
|
|
|
|
"webdriver": [
|
|
|
|
"platformdirs",
|
2024-03-25 20:19:13 +00:00
|
|
|
"undetected-chromedriver>=3.5.5",
|
2024-03-12 01:06:06 +00:00
|
|
|
"setuptools",
|
|
|
|
"selenium-wire"
|
2024-01-26 06:54:13 +00:00
|
|
|
],
|
2024-03-22 11:48:59 +00:00
|
|
|
"webview": [
|
|
|
|
"webview",
|
|
|
|
"platformdirs",
|
2024-03-27 18:04:00 +00:00
|
|
|
"plyer",
|
|
|
|
"cryptography"
|
|
|
|
],
|
|
|
|
"openai": [
|
|
|
|
"pycryptodome"
|
2024-03-22 11:48:59 +00:00
|
|
|
],
|
2024-01-26 06:54:13 +00:00
|
|
|
"api": [
|
|
|
|
"loguru", "fastapi",
|
|
|
|
"uvicorn", "nest_asyncio"
|
|
|
|
],
|
|
|
|
"gui": [
|
|
|
|
"werkzeug", "flask",
|
|
|
|
"beautifulsoup4", "pillow",
|
2024-03-06 16:41:17 +00:00
|
|
|
"duckduckgo-search>=5.0",
|
2024-01-26 06:54:13 +00:00
|
|
|
"browser_cookie3"
|
2024-03-11 12:20:25 +00:00
|
|
|
],
|
|
|
|
"local": [
|
|
|
|
"gpt4all"
|
2024-04-10 12:23:30 +00:00
|
|
|
],
|
|
|
|
"curl_cffi": [
|
|
|
|
"curl_cffi>=0.6.2",
|
2024-01-26 06:54:13 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-07-28 10:07:17 +00:00
|
|
|
DESCRIPTION = (
|
2023-11-08 09:05:39 +00:00
|
|
|
'The official gpt4free repository | various collection of powerful language models'
|
2023-07-28 10:07:17 +00:00
|
|
|
)
|
2023-07-17 00:12:49 +00:00
|
|
|
|
|
|
|
# Setting up
|
|
|
|
setup(
|
2023-11-08 09:05:39 +00:00
|
|
|
name='g4f',
|
2024-01-12 01:14:35 +00:00
|
|
|
version=os.environ.get("G4F_VERSION"),
|
2023-11-08 09:05:39 +00:00
|
|
|
author='Tekky',
|
|
|
|
author_email='<support@g4f.ai>',
|
2023-07-17 00:12:49 +00:00
|
|
|
description=DESCRIPTION,
|
2023-11-08 09:05:39 +00:00
|
|
|
long_description_content_type='text/markdown',
|
2023-07-17 00:12:49 +00:00
|
|
|
long_description=long_description,
|
|
|
|
packages=find_packages(),
|
2023-10-12 01:35:11 +00:00
|
|
|
package_data={
|
2024-03-19 12:41:30 +00:00
|
|
|
'g4f': ['g4f/interference/*', 'g4f/gui/client/*', 'g4f/gui/server/*', 'g4f/Provider/npm/*', 'g4f/local/models/*']
|
2023-10-12 01:35:11 +00:00
|
|
|
},
|
2023-10-06 19:39:43 +00:00
|
|
|
include_package_data=True,
|
2024-01-26 06:54:13 +00:00
|
|
|
install_requires=INSTALL_REQUIRE,
|
|
|
|
extras_require=EXTRA_REQUIRE,
|
2023-08-31 11:32:23 +00:00
|
|
|
entry_points={
|
2023-11-08 09:05:39 +00:00
|
|
|
'console_scripts': ['g4f=g4f.cli:main'],
|
2023-08-31 11:32:23 +00:00
|
|
|
},
|
2023-11-08 09:05:39 +00:00
|
|
|
url='https://github.com/xtekky/gpt4free', # Link to your GitHub repository
|
2023-08-22 14:33:18 +00:00
|
|
|
project_urls={
|
2023-11-08 09:05:39 +00:00
|
|
|
'Source Code': 'https://github.com/xtekky/gpt4free', # GitHub link
|
|
|
|
'Bug Tracker': 'https://github.com/xtekky/gpt4free/issues', # Link to issue tracker
|
2023-08-22 14:33:18 +00:00
|
|
|
},
|
2023-07-28 10:07:17 +00:00
|
|
|
keywords=[
|
2023-11-08 09:05:39 +00:00
|
|
|
'python',
|
|
|
|
'chatbot',
|
|
|
|
'reverse-engineering',
|
|
|
|
'openai',
|
|
|
|
'chatbots',
|
|
|
|
'gpt',
|
|
|
|
'language-model',
|
|
|
|
'gpt-3',
|
|
|
|
'gpt3',
|
|
|
|
'openai-api',
|
|
|
|
'gpt-4',
|
|
|
|
'gpt4',
|
|
|
|
'chatgpt',
|
|
|
|
'chatgpt-api',
|
|
|
|
'openai-chatgpt',
|
|
|
|
'chatgpt-free',
|
|
|
|
'chatgpt-4',
|
|
|
|
'chatgpt4',
|
|
|
|
'chatgpt4-api',
|
|
|
|
'free',
|
|
|
|
'free-gpt',
|
|
|
|
'gpt4free',
|
|
|
|
'g4f',
|
2023-07-28 10:07:17 +00:00
|
|
|
],
|
2023-07-17 00:12:49 +00:00
|
|
|
classifiers=[
|
2023-11-08 09:05:39 +00:00
|
|
|
'Development Status :: 2 - Pre-Alpha',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
'Operating System :: Unix',
|
|
|
|
'Operating System :: MacOS :: MacOS X',
|
|
|
|
'Operating System :: Microsoft :: Windows',
|
2023-07-28 10:07:17 +00:00
|
|
|
],
|
2023-10-12 01:35:11 +00:00
|
|
|
)
|