mirror of
https://github.com/Kakune55/PyGetGPT.git
synced 2025-06-29 00:08:04 +08:00
修复了api调用的跨域问题
This commit is contained in:
parent
2eef6db5be
commit
bf7ccee41f
@ -1,4 +1,5 @@
|
||||
import flask , requests , json , pymysql
|
||||
from flask_cors import CORS
|
||||
|
||||
# 设置请求的目标URL
|
||||
url = "https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation" # 替换为你的API端点URL
|
||||
@ -94,6 +95,7 @@ def reduce_value(userkey, value):
|
||||
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
CORS(app,origins="*")
|
||||
|
||||
@app.route('/api/user', methods=['POST'])
|
||||
def post_data():
|
||||
|
Loading…
x
Reference in New Issue
Block a user