In the Vertex AI docs it is stated "...request within 10 seconds with status code 200 OK
. The contents of the response body do not matter;".
I have never used Flask before (I have used Django) but a lot of exampels on how to make a custom container is with flask. I struggle to figure out how I can return 200 OK
as status code (I find that phrasing odd, since I have never seen status-codes being anything else than a number)
I have tried this
from flask import Flask,Response,make_response
.
.
@app.route('/health',methods=["GET","POST"])
def health():
return Response("OK",status=200)
@app.route('/health',methods=["GET","POST"])
def health():
return Response(status="200 OK")
@app.route('/health',methods=["GET","POST"])
def health():
return make_response("200 OK")
but neither seem to work.