Я создал файл runtime.txt для указания Python 3.10, но, похоже, его игнорируют, и я также запустил проверку pip в своей виртуальной среде, что указывает на отсутствие нарушенных требований.
Когда я запускаю команду развертывания (vercel - -prod), я получаю неприятное сообщение об ошибке:
(.venv) PS C:\Users\morad\PycharmProjects\SmartBot\MyBot> vercel --prod
Vercel CLI 37.6.1
Error: Command failed: pip3.12 install --disable-pip-version-check --target . --upgrade -r /vercel/path1/requirements.txt
Traceback (most recent call last):
File "/python312/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/python312/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
Ниже приведен код в моем файле app.py:
from flask import Flask, render_template, request, jsonify
import requests
RASA_API_URL = 'http://localhost:5005/webhooks/rest/webhook'
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/webhook', methods=['POST'])
def webhook():
user_message = request.json['message']
print("User Message:", user_message)
#Send user message to Rasa and get bot's response.
rasa_response = requests.post(RASA_API_URL, json={'message': user_message})
rasa_response_json = rasa_response.json()
print("Rasa Response:", rasa_response_json)
bot_response = rasa_response_json[0]['text'] if rasa_response_json else "Sorry, I didn\'t understand that."
return jsonify({'response': bot_response})
if __name__ == "__main__":
app.run()
Подробнее здесь: https://stackoverflow.com/questions/790 ... patibility