Spaces:
Runtime error
Runtime error
Commit
·
d7933bc
1
Parent(s):
6765a9d
Update main.py
Browse files
main.py
CHANGED
|
@@ -49,8 +49,8 @@ llm_chain = LLMChain(llm=llm, prompt=PromptTemplate.from_template(prompt_templat
|
|
| 49 |
app = Flask(__name__)
|
| 50 |
#@app.route('/', methods=['POST'])
|
| 51 |
@app.route('/api/chat', methods=['POST'])
|
| 52 |
-
|
| 53 |
-
async def chat():
|
| 54 |
data = request.get_json()
|
| 55 |
#user_query = data['query']
|
| 56 |
#此处的['query']中的query可以自定义名称,例如修改为user_question,那么调用API的代码中,需要相应的使用data = {'user_question': user_query},user_question需一致
|
|
|
|
| 49 |
app = Flask(__name__)
|
| 50 |
#@app.route('/', methods=['POST'])
|
| 51 |
@app.route('/api/chat', methods=['POST'])
|
| 52 |
+
def chat():
|
| 53 |
+
#async def chat():
|
| 54 |
data = request.get_json()
|
| 55 |
#user_query = data['query']
|
| 56 |
#此处的['query']中的query可以自定义名称,例如修改为user_question,那么调用API的代码中,需要相应的使用data = {'user_question': user_query},user_question需一致
|