""" Constants for Gradio app """ GREETING_MESSAGES = { "en": [ "Hello and welcome. I am your Executive Education Advisor for the HSG Executive MBA programmes (**IEMBA**, **emba X**, and **EMBA**). How may I support your MBA planning today?", "Hello and welcome. I am your Executive Education Advisor for the University of St.Gallen Executive MBA programmes (**IEMBA**, **emba X**, and **EMBA**). How may I assist you with your programme search?", "Hello and welcome. I am here to help you explore the University of St.Gallen Executive MBA programmes (**EMBA**, **IEMBA**, and **emba X**). What would you like to discuss today?", "Hello and welcome. I am your Executive Education Advisor for the University of St.Gallen’s Executive MBA programmes, and I am here to help you assess fit across **EMBA**, **IEMBA**, and **emba X**.", "Hello and welcome. I am here to support you with questions about the University of St.Gallen Executive MBA programmes and to help you evaluate the **EMBA**, **IEMBA**, and **emba X** options.", ], "de": [ "Guten Tag. Ich bin Ihr Executive-Education-Berater für die HSG Executive MBA Programme und unterstütze Sie gerne bei Fragen zu **EMBA**, **IEMBA** und **emba X**.", "Guten Tag. Ich bin Ihr Executive-Education-Berater für die HSG Executive MBA Programme (**EMBA**, **IEMBA**, **emba X**). Ich unterstütze Sie bei Programmwahl, Ablauf und Zulassungsfragen.", "Guten Tag und herzlich willkommen. Ich bin Ihr Executive-Education-Berater für die HSG Executive MBA Programme und unterstütze Sie gerne bei Fragen zu **EMBA**, **IEMBA** und **emba X**.", "Guten Tag. Ich bin Ihr Executive-Education-Berater für die HSG Executive MBA Programme (**EMBA**, **IEMBA**, **emba X**) und unterstütze Sie gerne bei der Einschätzung der passenden Option.", "Guten Tag. Ich unterstütze Sie gerne bei Fragen zu den HSG Executive MBA Programmen und helfe Ihnen, die Optionen **EMBA**, **IEMBA** und **emba X** einzuordnen.", ] } QUERY_EXCEPTION_MESSAGE = { "en": "I'm sorry, I cannot provide a helpful response right now. Please contact tech support or try again later.", "de": "Es tut mir leid, ich kann im Moment keine hilfreiche Antwort geben. Bitte wenden Sie sich an den technischen Support oder versuchen Sie es später erneut.", } NOT_VALID_QUERY_MESSAGE = { "en": "I didn't quite understand that. Could you please rephrase your question?", "de": "Das habe ich nicht ganz verstanden. Könnten Sie Ihre Frage bitte anders formulieren?", } CONFIDENCE_FALLBACK_MESSAGE = { "en": ( "I am sorry, but I could not find sufficiently reliable information in my records to answer that question with confidence. " "Could you please rephrase your question?\n\n" "If you would like a personal consultation, I can also help you with appointment booking." ), "de": ( "Es tut mir leid, aber ich konnte in meinen Unterlagen keine Informationen finden, " "die zu Ihrer Anfrage passen, sodass ich sie nicht mit ausreichender Sicherheit beantworten kann. " "Könnten Sie Ihre Frage bitte umformulieren?\n\n" "Wenn Sie ein persönliches Beratungsgespräch wünschen, kann ich Ihnen auch bei der Terminbuchung helfen." ), } LANGUAGE_FALLBACK_MESSAGE = { "en": ( "I am sorry, I can only reply in English or German. " "Would you like to continue our conversation in English?" ), "de": ( "Es tut mir leid, ich kann nur auf Englisch oder Deutsch antworten. " "Möchten Sie unser Gespräch auf Deutsch fortführen?" ), } CONVERSATION_END_MESSAGE = { "en": ( "This conversation has reached its maximum length. " "To make sure you receive the best possible support, " "please continue with a personal consultation.\n\n" "If you would like to see appointment options with an admissions advisor, please ask me to show them. " "Thank you for your understanding." ), "de": ( "Dieses Gespräch hat die maximale Länge erreicht. " "Damit Sie bestmöglich unterstützt werden, bitten wir Sie, " "das Anliegen in einem persönlichen Beratungsgespräch fortzusetzen.\n\n" "Wenn Sie Terminoptionen mit der Studienberatung sehen möchten, sagen Sie mir bitte kurz Bescheid. " "Vielen Dank für Ihr Verständnis." ), } ADMISSIONS_TEAM_CONTACT = { "en": { "email": "emba@unisg.ch", "phone": "+41 71 224 27 02", }, "de": { "email": "emba@unisg.ch", "phone": "+41 71 224 27 02", }, } ADVISOR_CONTACTS = [ { "name": "Cyra von Müller (EMBA)", "program": "emba", "email": "cyra.vonmueller@unisg.ch", "phone": "+41 71 224 27 12", "url": "https://calendly.com/cyra-vonmueller/beratungsgespraech-emba-hsg", }, { "name": "Kristin Fuchs (IEMBA)", "program": "iemba", "email": "kristin.fuchs@unisg.ch", "phone": "+41 71 224 75 46", "url": "https://calendly.com/kristin-fuchs-unisg/iemba-online-personal-consultation", }, { "name": "Teyuna Giger (emba X)", "program": "emba_x", "email": "teyuna.giger@unisg.ch", "phone": "+41 71 224 77 65", "url": "https://calendly.com/teyuna-giger-unisg", }, ] def get_admissions_contact_text(language: str = "en") -> str: labels = { "en": "You can reach the Executive MBA admissions team at {email} or {phone}.", "de": "Sie erreichen das Executive-MBA-Zulassungsteam unter {email} oder {phone}.", } contact = ADMISSIONS_TEAM_CONTACT.get(language, ADMISSIONS_TEAM_CONTACT["en"]) template = labels.get(language, labels["en"]) return template.format(email=contact["email"], phone=contact["phone"]) def get_booking_widget(language: str="en", programs: list[str]=None): """ Returns an HTML string representing a Booking Widget. """ if programs is None or programs == []: programs = ["emba", "iemba", "emba_x"] labels = { "en": { "header": "Book a Consultation", "sub": "Select an advisor to view available appointment slots and contact details:", "email": "Email", "phone": "Phone", }, "de": { "header": "Termin vereinbaren", "sub": "Wählen Sie einen Berater, um verfügbare Termine und Kontaktdaten zu sehen:", "email": "E-Mail", "phone": "Telefon", } } txt = labels.get(language, labels["en"]) base_params = "?hide_gdpr_banner=1&embed_type=Inline&embed_domain=1" html_content = f"""

{txt['header']}

{txt['sub']}

""" for advisor in ADVISOR_CONTACTS: if advisor["program"] in programs: html_content += f"""
{advisor['name']}

{txt['email']}: {advisor['email']}

{txt['phone']}: {advisor['phone']}

""" html_content += "
" return html_content def get_disclaimer_widget(language: str = "en"): """ Returns an HTML string representing a warning disclaimer. """ disclaimers = { "en": { "title": "Disclaimer", "body": "Assessments provided by this advisor are non-binding and based on limited information. Please consult our program directors for final admission or credit evaluations." }, "de": { "title": "Haftungsausschluss", "body": "Die Einschätzungen dieses Beraters sind unverbindlich und basieren auf begrenzten Informationen. Bitte wenden Sie sich für endgültige Zulassungs- oder Anrechnungsfragen an die Programmleitung." } } content = disclaimers.get(language, disclaimers["en"]) # Yellow styling constants bg_color = "#fffbeb" # Light yellow border_color = "#f59e0b" # Amber/Yellow border icon_color = "#d97706" # Darker amber for the icon text_color = "#92400e" # Dark brown/yellow for readability html_content = f"""
{content['title']}

{content['body']}

""" return html_content