返回提交历史
Modified
interference/app.py
+6
-1
Modified
requirements.txt
+2
-1
Modified
setup.py
+13
-5
XFEstudio/gpt4free
Add console script
eee553bd
代码差异
3 个文件
+21
-7
@@ -12,6 +12,7 @@ from g4f import ChatCompletion
12
12
app = Flask(__name__)
13
13
CORS(app)
14
14
15
15
16
@app.route("/chat/completions", methods=["POST"])
16
17
def chat_completions():
17
18
model = request.get_json().get("model", "gpt-3.5-turbo")
@@ -87,5 +88,9 @@ def chat_completions():
87
88
return app.response_class(streaming(), mimetype="text/event-stream")
88
89
89
90
91
def main():
92
app.run(host="0.0.0.0", port=1337, debug=True)
93
94
90
95
if __name__ == "__main__":
91
app.run(host="0.0.0.0", port=1337, debug=True)
96
main()
@@ -8,4 +8,5 @@ websockets
8
8
js2py
9
9
quickjs
10
10
flask
11
flask-cors
11
flask-cors
12
httpx
@@ -11,7 +11,10 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
11
11
with open("requirements.txt") as f:
12
12
required = f.read().splitlines()
13
13
14
VERSION = '0.0.2.6'
14
with open("interference/requirements.txt") as f:
15
api_required = f.read().splitlines()
16
17
VERSION = "0.0.2.6"
15
18
DESCRIPTION = (
16
19
"The official gpt4free repository | various collection of powerful language models"
17
20
)
@@ -26,11 +29,16 @@ setup(
26
29
long_description_content_type="text/markdown",
27
30
long_description=long_description,
28
31
packages=find_packages(),
32
data_files=["interference/app.py"],
29
33
install_requires=required,
30
url='https://github.com/xtekky/gpt4free', # Link to your GitHub repository
34
extras_require={"api": api_required},
35
entry_points={
36
"console_scripts": ["g4f=interference.app:main"],
37
},
38
url="https://github.com/xtekky/gpt4free", # Link to your GitHub repository
31
39
project_urls={
32
'Source Code': 'https://github.com/xtekky/gpt4free', # GitHub link
33
'Bug Tracker': 'https://github.com/xtekky/gpt4free/issues', # Link to issue tracker
40
"Source Code": "https://github.com/xtekky/gpt4free", # GitHub link
41
"Bug Tracker": "https://github.com/xtekky/gpt4free/issues", # Link to issue tracker
34
42
},
35
43
keywords=[
36
44
"python",
@@ -65,4 +73,4 @@ setup(
65
73
"Operating System :: MacOS :: MacOS X",
66
74
"Operating System :: Microsoft :: Windows",
67
75
],
68
)
76
)