Compare commits

...

4 Commits

Author SHA1 Message Date
ec1cfaadba pip 2023-07-28 12:28:04 +08:00
2747c23868 Merge branch 'master' of github.com:binary-husky/chatgpt_academic 2023-07-28 10:35:50 +08:00
f446dbb62d Update README.md 2023-07-28 09:54:03 +08:00
8d37d94e2c Update README.md 2023-07-28 09:53:17 +08:00
2 changed files with 55 additions and 2 deletions

View File

@ -116,7 +116,7 @@ python -m pip install -r requirements.txt # 这个步骤和pip安装一样的步
```
<details><summary>如果需要支持清华ChatGLM2/复旦MOSS作为后端请点击展开此处</summary>
<details><summary>如果需要支持清华ChatGLM2/复旦MOSS/RWKV作为后端,请点击展开此处</summary>
<p>
【可选步骤】如果需要支持清华ChatGLM2/复旦MOSS作为后端需要额外安装更多依赖前提条件熟悉Python + 用过Pytorch + 电脑配置够强):
@ -128,7 +128,10 @@ python -m pip install -r request_llm/requirements_chatglm.txt
python -m pip install -r request_llm/requirements_moss.txt
git clone --depth=1 https://github.com/OpenLMLab/MOSS.git request_llm/moss # 注意执行此行代码时,必须处于项目根路径
# 【可选步骤III】确保config.py配置文件的AVAIL_LLM_MODELS包含了期望的模型目前支持的全部模型如下(jittorllms系列目前仅支持docker方案)
# 【可选步骤III】支持RWKV Runner
参考wikihttps://github.com/binary-husky/gpt_academic/wiki/%E9%80%82%E9%85%8DRWKV-Runner
# 【可选步骤IV】确保config.py配置文件的AVAIL_LLM_MODELS包含了期望的模型目前支持的全部模型如下(jittorllms系列目前仅支持docker方案)
AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "chatglm", "newbing", "moss"] # + ["jittorllms_rwkv", "jittorllms_pangualpha", "jittorllms_llama"]
```

50
setup.py Normal file
View File

@ -0,0 +1,50 @@
import setuptools, glob, os, fnmatch
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def _process_requirements():
packages = open('requirements.txt').read().strip().split('\n')
requires = []
for pkg in packages:
if pkg.startswith('git+ssh'):
return_code = os.system('pip install {}'.format(pkg))
assert return_code == 0, 'error, status_code is: {}, exit!'.format(return_code)
if pkg.startswith('./docs'):
continue
else:
requires.append(pkg)
return requires
def package_files(directory):
import subprocess
list_of_files = subprocess.check_output("git ls-files", shell=True).splitlines()
return [str(k) for k in list_of_files]
extra_files = package_files('./')
setuptools.setup(
name="void-terminal",
version="0.0.0",
author="Qingxu",
author_email="505030475@qq.com",
description="LLM based APIs",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/binary-husky/gpt-academic",
project_urls={
"Bug Tracker": "https://github.com/binary-husky/gpt-academic/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"": "."},
package_data={"": extra_files},
include_package_data=True,
packages=setuptools.find_packages(where="."),
python_requires=">=3.9",
install_requires=_process_requirements(),
)