Wish for the day

there is a python code that asks the AI ​​to generate a wish for the day, wanted to receive it, transfer it to home assistant and insert lovelace to see this wish every day

here is the python code

from flask import Flask, jsonify
import requests

app = Flask(__name__)

API_TOKEN = 'MY_TOKEN'
API_URL = 'https://api-inference.huggingface.co/models/mistralai/Mistral-Nemo-Instruct-2407'

headers = {
    "Authorization": f"Bearer {API_TOKEN}"
}

@app.route('/generate_wish', methods=['GET'])
def generate_wish():
    prompt = "Write a creative and unusual wish for a good day in prose."
    payload = {
        "inputs": prompt,
        "parameters": {
            "temperature": 0.3
        }
    }

    response = requests.post(API_URL, headers=headers, json=payload)

    if response.status_code == 200:
        generated_text = response.json()[0]['generated_text']
        unwanted_text = "Write a creative and unusual wish for a good day in prose"
        wish = generated_text.replace(unwanted_text, "").strip()
        return jsonify({"wish": wish})
    else:
        return jsonify({"error": response.text}), response.status_code

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)

I receive data in the form of text (for example, let’s take a simple option - have a nice day)

I wanted to use node red to get this data and then insert it into my lovelace, but something doesn’t work, node red gets the data, but I don’t see this message in home assistant
please help

[{"id":"7afc7ba787cdd45f","type":"tab","label":"Поток 6","disabled":false,"info":"","env":[]},{"id":"0724c3a7da171eaa","type":"inject","z":"7afc7ba787cdd45f","name":"Запросить пожелание","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":140,"y":60,"wires":[["987c718704bba886"]]},{"id":"987c718704bba886","type":"http request","z":"7afc7ba787cdd45f","name":"Запрос к Flask API","method":"GET","ret":"txt","paytoqs":false,"url":"http://localhost:5000/generate_wish","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":170,"y":180,"wires":[["21399478bf30dee2"]]},{"id":"21399478bf30dee2","type":"function","z":"7afc7ba787cdd45f","name":"Обработать ответ","func":"const response = JSON.parse(msg.payload);\nif (response.wish) {\n    msg.payload = response.wish.replace(/\\n/g, \" \"); // Удаляем символы новой строки\n} else {\n    msg.payload = \"Ошибка получения пожелания\";\n}\nreturn msg;\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":40,"wires":[["75cbf1f62cb5c503"]]},{"id":"75cbf1f62cb5c503","type":"template","z":"7afc7ba787cdd45f","name":"Создать сообщение","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload}}","output":"str","x":460,"y":160,"wires":[["2ac88ce4e7b298f2"]]},{"id":"2ac88ce4e7b298f2","type":"api-current-state","z":"7afc7ba787cdd45f","name":"Получить текущее состояние","server":"10cea322.6322ad","version":3,"outputs":1,"entity_id":"input_text.wish_message","x":740,"y":60,"wires":[["8cb628e63ccb1ee4"]]},{"id":"8cb628e63ccb1ee4","type":"debug","z":"7afc7ba787cdd45f","name":"debug 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":160,"wires":[]},{"id":"10cea322.6322ad","type":"server","name":"Home Assistant","addon":true}]

The current state node retrieves the state of an entity, but if you’re looking to set the state, you’ll want to use the action node instead.

[{"id":"c1a8c8e3e51b485f","type":"api-call-service","z":"279f86371f3c162e","name":"Установить пожелание","server":"10cea322.6322ad","version":7,"debugenabled":false,"action":"input_text.set_value","floorId":[],"areaId":[],"deviceId":[],"entityId":["input_text.wish_message"],"labelId":[],"data":"{\"value\":\"{{payload}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"blockInputOverrides":false,"domain":"input_text","service":"set_value","output_location":"","output_location_type":"none","service_domain":"input_text","mergecontext":"","x":630,"y":280,"wires":[["db118de6a3dea9e0"]]},{"id":"10cea322.6322ad","type":"server","name":"Home Assistant","addon":true}]

configuration.yaml

input_text:
  wish_message:
    name: Wish
    initial: ""
    max: 500

State
input_text.wish_message
unknown

something is not working
I’m obviously doing something wrong