I want to see a picture of a character named IronMan

@nik202 don’t load from .csv, i load directly from mySql

Connect to Database (MySQL)

mydb = mysql.connector.connect( host=“localhost”, user=“", password="***”, database=“chatbot”, auth_plugin=‘mysql_native_password’) mycursor = mydb.cursor()

class ActionSearchDocument(Action):

def name(self) -> Text:
    return "action_search_document"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
    name_document = tracker.get_slot("name_document")
    print(name_document)

    query_begin = "SELECT name FROM document"
    mycursor.execute(query_begin)
    result_query_begin = mycursor.fetchall()

    result_match = match_entites(name_document,result_query_begin)
    print(result_match)

    #write query
    query_end = "SELECT name, link, date FROM document WHERE name = '" + result_match + "'"


    mycursor.execute(query_end)
    myresult = mycursor.fetchall()
    dispatcher.utter_message(text=f"Đây là link tài liệu {result_match} mà bạn đang cần: ", json_message = myresult)
    return []