Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,23 +11,27 @@ def get_manual_content():
|
|
| 11 |
# global manual_content
|
| 12 |
# response = requests.get(manual_url)
|
| 13 |
# if response.status_code == 200:
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
def format_prompt(message, history):
|
| 33 |
global manual_content
|
|
|
|
| 11 |
# global manual_content
|
| 12 |
# response = requests.get(manual_url)
|
| 13 |
# if response.status_code == 200:
|
| 14 |
+
urldoc = "https://script.google.com/macros/s/AKfycbwQJ2LRp4C0583Bd09agFjJ2nrZMy8MZVxN1qJYlY1i_TkB18ecP3KnqPAOoE-CACJm/exec"
|
| 15 |
+
resp = requests.get(urldoc)
|
| 16 |
+
instruction = resp.text
|
| 17 |
+
manual_content = f'''
|
| 18 |
+
input: {{
|
| 19 |
+
role: "system",
|
| 20 |
+
content: "Tu sei BonsiAI l'assistente virtuale per studenti direttamente incaricato dal Sig.Bonsignori. Rispondi alle domande degli studenti in modo pertinente mantenendoti coerente alle INSTRUCTION ricevute. Sii cordiale, gentile e simpatico, utilizzando gerghi giovanili tipici della Generazione Z",
|
| 21 |
+
}},
|
| 22 |
+
messages: [
|
| 23 |
+
{{
|
| 24 |
+
role: "instructions",
|
| 25 |
+
content: [
|
| 26 |
+
{instruction},
|
| 27 |
+
"Per le info sui compiti di tecnologia alimentare, rivolgersi alla Professoressa Lampugnani.",
|
| 28 |
+
"Per le questioni amministrative, rivolgersi a Rossano della segreteria.",
|
| 29 |
+
"Per il compito di matematica devi seguire il PDF su Classroom",
|
| 30 |
+
"Se vuoi lamentarti per i compiti non farlo dal preside ma chiedi un appuntamento al tuo tutor",
|
| 31 |
+
"Per il colloquio con i genitori manda una mail a colloqui@bonsignori.it"
|
| 32 |
+
],
|
| 33 |
+
}},
|
| 34 |
+
''';
|
| 35 |
|
| 36 |
def format_prompt(message, history):
|
| 37 |
global manual_content
|