SafetyBriefing hinzugefügt

This commit is contained in:
hubobel 2025-12-26 17:27:03 +01:00
parent 6663e38ad4
commit 4a197b73ed
6 changed files with 55 additions and 21 deletions

View file

@ -137,6 +137,7 @@ def CruiseElapsed50Percent():
prompt_org = passw['Prompt']['Cruise50']
info = {"Zielflughafen: " + dest.get("icao_code") + dest_name, "Gesamtreisedauer:" + block,
"Du bist von deiner Art her:" + Stimmung,
"Erwähne 3 bis 6 Städte, welche entlang der Route liegen. Nenne nicht die Wegpunkte. Route: " + route,
"Informiere über die bevorstehenden, typischen Landevorbereitungen"}
for i in info:
prompt_org = prompt_org + i
@ -151,6 +152,25 @@ def CruiseElapsed80Percent():
prompt_org = prompt_org + i
antwort_AI = ai(prompt_org)
return antwort_AI
def SafetyBriefing():
prompt_org = passw['Prompt']['SafetyBriefing']
info = {"Zielflughafen: " + dest.get("icao_code") + dest_name, "Reisedauer:" + block,
"Passagieranzahl" + pax,
"Flugzeugtyp:" + aircraft_name,
"Du freust dich auf den Flug und bedankst dich, das man sich für " + airline + " entschieden hat.",
"Dein Name:" + passw['Prompt']['PurserName'],
"Startflughafen: " + origin.get("icao_code") + origin_name,
"Du bist von deiner Art her:" + str(stimmung()),
"Flugnummer" + general.get("flight_number"),
"Wetter am Start" + metar_origin}
for i in info:
prompt_org = prompt_org + i
antwort_AI = ai(prompt_org)
return antwort_AI
def METAR():
prompt_org = passw['Prompt']['PurserPrompt_METAR']
@ -290,7 +310,7 @@ Pfad_wd = Pfad + airline_icao + '/'
ordnerneu = Path(Pfad_wd + '/neu/')
print(Pfad_wd)
BACKUP(Pfad_wd)
print(replaceFiles())
#print(replaceFiles())
ordnerneu.mkdir(exist_ok=True)
@ -314,6 +334,10 @@ InhaltCruise80 = CruiseElapsed80Percent().choices[0].message.content
InhaltCruise80 = "\n".join(filter(None, map(str.strip, InhaltCruise80.splitlines())))
print(InhaltCruise80)
Safety = SafetyBriefing().choices[0].message.content
Safety = "\n".join(filter(None, map(str.strip, Safety.splitlines())))
print(Safety)
Pfad = Pfad_wd + 'BoardingWelcomePilot.txt'
txtSave(Pfad, Inhalt)
@ -327,4 +351,10 @@ Pfad = Pfad_wd + 'CruiseElapsed50Percent.txt'
txtSave(Pfad, InhaltCruise50)
Pfad = Pfad_wd + 'CruiseElapsed80Percent.txt'
txtSave(Pfad, InhaltCruise80)
txtSave(Pfad, InhaltCruise80)
Pfad = Pfad_wd + 'CruiseElapsed80Percent.txt'
txtSave(Pfad, InhaltCruise80)
Pfad = Pfad_wd + 'SafetyBriefing.txt'
txtSave(Pfad, Safety)