diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-09-05 16:04:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 16:04:00 +0200 |
commit | 8fe76cc4c9f6896576a07fde883638c6494a2ea1 (patch) | |
tree | 7bb838d27a87a2d92d6ed92e00d0ad150a8ffbc6 /interference | |
parent | ~ | Merge pull request #876 from Lin-jun-xiang/join_messages (diff) | |
parent | Merge branch 'main' into add-console-script (diff) | |
download | gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar.gz gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar.bz2 gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar.lz gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar.xz gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.tar.zst gpt4free-8fe76cc4c9f6896576a07fde883638c6494a2ea1.zip |
Diffstat (limited to 'interference')
-rw-r--r-- | interference/app.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/interference/app.py b/interference/app.py index 8018356f..836a751d 100644 --- a/interference/app.py +++ b/interference/app.py @@ -12,6 +12,7 @@ from g4f import ChatCompletion app = Flask(__name__) CORS(app) + @app.route("/chat/completions", methods=["POST"]) def chat_completions(): model = request.get_json().get("model", "gpt-3.5-turbo") @@ -87,5 +88,9 @@ def chat_completions(): return app.response_class(streaming(), mimetype="text/event-stream") +def main(): + app.run(host="0.0.0.0", port=1337, debug=True) + + if __name__ == "__main__": - app.run(host="0.0.0.0", port=1337, debug=True)
\ No newline at end of file + main() |