Skip to content

Commit 12e91f4

Browse files
committed
Merge branch 'dev'
2 parents 3ee4010 + fd396fb commit 12e91f4

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

locale/de/LC_MESSAGES/base.mo

1.02 KB
Binary file not shown.

locale/de/LC_MESSAGES/base.po

+11-8
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@ msgid ""
2020
"\n## Welcome to Ask.UOS!\n###"
2121
" Ask.UOS is a chatbot powered by OpenAI's GPT-4. \n### We are excited to assist you with this first experimental release!"
2222
" \n\nWe take precautions to ensure a low rate of inaccurate answers. However, for your safety and to ensure the reliability of any information you receive, we recommend using human oversight in your decision-making processes, as this helps confirm that the information is safe, accurate, and appropriate for your needs."
23-
"\nIf you're ever unsure about an answer, please check the provided sources."
23+
"\nIf you're ever unsure about an answer, please check the provided sources. You can also refer directly to the [university's website]({})."
24+
"\n\nIf you need personal assistance regarding studying at the university, you can visit the [StudiOS]({}) (Studierenden-Information Osnabrück) or [ZSB]({}) (Zentrale Studienberatung Osnabrück) website."
2425
"\n\nPlease note that the University of Osnabrück cannot be held liable for any actions, losses, or damages that may arise from the use of the chatbot."
25-
" \n\nIf you're interested, please follow the links to find more information about our [data protection policies]({}) and [imprint]({}).\n"
26+
" \n\nWhile interacting with the Chatbot, avoid sharing personal information. If you're interested, please follow the links to find more information about our [data protection policies]({}) and [imprint]({}).\n"
2627

2728

2829
msgstr ""
2930
"\n## Willkommen bei Ask.UOS!\n### "
30-
"Ask.UOS ist ein Chatbot, der von OpenAIs GPT-4 angetrieben wird. \n### Wir freuen uns darauf, Sie mit dieser ersten experimentellen Version zu unterstützen!"
31-
"\n\nWir treffen Vorkehrungen, um eine geringe Rate an ungenauen Antworten zu gewährleisten. Zu Ihrer Sicherheit und um die Verlässlichkeit der erhaltenen Informationen zu gewährleisten, empfehlen wir Ihnen jedoch, Ihre Entscheidungsprozesse von Menschen überwachen zu lassen, da dies dazu beiträgt, sicherzustellen, dass die Informationen sicher, korrekt und für Ihre Bedürfnisse geeignet sind."
32-
" Wenn Sie sich bei einer Antwort unsicher sind, überprüfen Sie bitte die angegebenen Quellen."
31+
"Ask.UOS ist ein Chatbot, der auf OpenAIs GPT-4 basiert. \n### Wir freuen uns, Ihnen mit dieser ersten experimentellen Version zur Seite zu stehen!"
32+
"\n\nWir arbeiten daran, die Anzahl ungenauer Antworten so gering wie möglich zu halten. Um jedoch sicherzustellen, dass die Informationen verlässlich und auf Ihre Bedürfnisse abgestimmt sind, empfehlen wir, sich zu wichtigen Entscheidungen menschliche Unterstützung holen."
33+
" Wenn Sie sich bei einer Antwort unsicher sind, überprüfen Sie bitte die angegebenen Quellen. Sie können auch direkt die Website der [Universität Osnabrück]({}) besuchen"
34+
"\n\nWenn Sie persönliche Unterstützung zum Studium an der Universität benötigen, können Sie die Website des [StudiOS]({}) (Studierenden-Information Osnabrück) oder der [ZSB]({}) (Zentrale Studienberatung Osnabrück) besuchen."
3335
"\n\nBitte beachten Sie, dass die Universität Osnabrück nicht für Handlungen, Verluste oder Schäden haftbar gemacht werden kann, die durch die Nutzung des Chatbots entstehen."
34-
"\n\nBei Interesse folgen Sie bitte den Links, um weitere Informationen über unsere [Datenschutzrichtlinien]({}) und [Impressum]({}) zu erhalten.\n"
36+
"\n\nVermeiden Sie bei der Interaktion mit dem Chatbot die Weitergabe persönlicher Informationen. Bei Interesse folgen Sie bitte den Links, um weitere Informationen über unsere [Datenschutzrichtlinien]({}) und [Impressum]({}) zu erhalten.\n"
3537

3638

3739
msgid "Sources"
@@ -43,8 +45,9 @@ msgstr "Chatten beginnen"
4345
msgid "Continue Chatting"
4446
msgstr "Weiter chatten"
4547

46-
msgid "How can I help you?"
47-
msgstr "Wie kann ich Ihnen helfen?"
48+
msgid "Hello! I am happy to assist you with questions about the University of Osnabrück, including information about study programs, application processes, admission requirements and other university-related topics. \n How can I help you today?"
49+
msgstr "Hallo! Ich unterstütze Sie gerne bei Fragen zur Universität Osnabrück, einschließlich Informationen zu Studiengängen, Bewerbungsprozessen, Zulassungsvoraussetzungen und anderen universitätsbezogenen Themen.\n Wie kann ich Ihnen heute helfen?"
50+
4851

4952
msgid "The responses from the chat assistant may be incorrect - therefore, please verify the answers for their correctness."
5053
msgstr "Die Ausgaben des Chat-Assistenten können fehlerhaft sein - überprüfen Sie die Antworten daher unbedingt auf ihre Korrektheit."

pages/ask_uos_chat.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def show_warning(self):
5151
def initialize_chat(self):
5252
"""Initialize the chat messages in session state if not present."""
5353
if "messages" not in st.session_state:
54-
greeting_message = session_state["_"]("How can I help you?")
54+
greeting_message = session_state["_"](
55+
"Hello! I am happy to assist you with questions about the University of Osnabrück, including information about study programs, application processes, admission requirements and other university-related topics. \n How can I help you today?"
56+
)
5557
st.session_state["messages"] = [
5658
{
5759
"role": "assistant",
@@ -115,9 +117,19 @@ def generate_response(self, prompt):
115117

116118
def display_visited_links(self):
117119
"""Display the links visited for the current user query."""
120+
118121
with st.expander(session_state["_"]("Sources")):
119122
for link in visited_links():
120-
st.write("- " + link)
123+
st.markdown(
124+
f"""
125+
126+
<div class="truncate">
127+
<span>&#8226;</span> <a href="{link}" target="_blank" rel="noopener noreferrer">{link}</a>
128+
</div>
129+
130+
""",
131+
unsafe_allow_html=True,
132+
)
121133
visited_links.clear()
122134

123135
def store_response(self, output, prompt):

pages/static/style.css

+12
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,15 @@ background-image: url('app/static/Icon-Daumen-u-2.png'); /* Path to your png fil
8080
span[data-testid="stHeaderActionElements"] a {
8181
display: none !important;
8282
}
83+
84+
85+
/* Prevents that urls displayed in the st.expander overflow the container */
86+
.truncate {
87+
width: 100%; /* Allow full width of the container */
88+
max-width: 100%; /* Prevent exceeding the container */
89+
white-space: nowrap;
90+
overflow: hidden;
91+
text-overflow: ellipsis;
92+
display: inline-block; /* Use inline-block to allow the bullet and link in one line */
93+
margin-bottom: 10px; /* Space between items (line break) */
94+
}

start.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,23 @@ def display_welcome_message():
2626
### We are excited to assist you with this first experimental release!
2727
2828
We take precautions to ensure a low rate of inaccurate answers. However, for your safety and to ensure the reliability of any information you receive, we recommend using human oversight in your decision-making processes, as this helps confirm that the information is safe, accurate, and appropriate for your needs.
29-
If you're ever unsure about an answer, please check the provided sources.
29+
If you're ever unsure about an answer, please check the provided sources. You can also refer directly to the [university's website]({}).
30+
31+
If you need personal assistance regarding studying at the university, you can visit the [StudiOS]({}) (Studierenden-Information Osnabrück) or [ZSB]({}) (Zentrale Studienberatung Osnabrück) website.
3032
3133
Please note that the University of Osnabrück cannot be held liable for any actions, losses, or damages that may arise from the use of the chatbot.
3234
33-
If you're interested, please follow the links to find more information about our [data protection policies]({}) and [imprint]({}).
35+
While interacting with the Chatbot, avoid sharing personal information. If you're interested, please follow the links to find more information about our [data protection policies]({}) and [imprint]({}).
3436
"""
3537

3638
translated_start_message = session_state["_"](start_message)
3739
st.markdown(
3840
translated_start_message.format(
39-
settings.legal.data_protection, settings.legal.imprint
41+
"https://www.uni-osnabrueck.de/startseite/",
42+
"https://www.uni-osnabrueck.de/universitaet/organisation/studierenden-information-osnabrueck-studios/",
43+
"https://www.zsb-os.de/",
44+
settings.legal.data_protection,
45+
settings.legal.imprint,
4046
)
4147
)
4248

0 commit comments

Comments
 (0)