weitere txts
This commit is contained in:
parent
2227df784b
commit
d5f9c9de38
2 changed files with 55 additions and 9 deletions
|
|
@ -100,22 +100,55 @@ def WelcomePilot():
|
|||
prompt_org = passw['Prompt']['CptPrompt']
|
||||
info = {"Zielflughafen: " + dest.get("icao_code") + dest_name, "Reisedauer:" + block,
|
||||
"Entfernung: " + distance + "nm",
|
||||
"Menge Sprit: " + fuel + "kg",
|
||||
#"Menge Sprit: " + fuel + "kg",
|
||||
"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']['CptName'],
|
||||
"Startflughafen: " + origin.get("icao_code") + origin_name,
|
||||
"Du bist von deiner Art her:" + str(stimmung()),
|
||||
"Du bist von deiner Art her:" + Stimmung,
|
||||
"Wetter am Ziel" + metar_dest,
|
||||
"Verwende nie die ICAO Abkürzungen, übersetze diese.",
|
||||
"Erwähne 2 bis 3 Sehenswürdigkeiten, die auf dem Flug von Start zum Ziel überflogen werden. Die Route lautet:" + route,
|
||||
#"Erwähne 2 bis 3 Sehenswürdigkeiten, die auf dem Flug von Start zum Ziel überflogen werden. Die Route lautet:" + route,
|
||||
"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 CruiseElapsed10Percent():
|
||||
prompt_org = passw['Prompt']['Cruise10']
|
||||
info = {"Zielflughafen: " + dest.get("icao_code") + dest_name, "Reisedauer:" + block,
|
||||
"Menge Sprit: " + fuel + "kg",
|
||||
"Reiseflughöhe: ",
|
||||
"Erwähne die typische Reiseflughöhe für diesen Flug",
|
||||
"Dein Name:" + passw['Prompt']['CptName'],
|
||||
"Startflughafen: " + origin.get("icao_code") + origin_name,
|
||||
"Du bist von deiner Art her:" + Stimmung,
|
||||
"Erwähne 2 bis 3 Sehenswürdigkeiten, die auf dem Flug von Start zum Ziel überflogen werden. Die Route lautet:" + route}
|
||||
|
||||
|
||||
for i in info:
|
||||
prompt_org = prompt_org + i
|
||||
antwort_AI = ai(prompt_org)
|
||||
|
||||
return antwort_AI
|
||||
def CruiseElapsed50Percent():
|
||||
prompt_org = passw['Prompt']['Cruise50']
|
||||
info = {"Zielflughafen: " + dest.get("icao_code") + dest_name, "Gesamtreisedauer:" + block,
|
||||
|
||||
#"Dein Name:" + passw['Prompt']['CptName'],
|
||||
|
||||
"Du bist von deiner Art her:" + Stimmung,
|
||||
"Informiere über die bevorstehenden, typischen Landevorbereitungen"}
|
||||
|
||||
|
||||
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']
|
||||
|
|
@ -222,6 +255,7 @@ client = OpenAI(
|
|||
|
||||
# dict
|
||||
|
||||
Stimmung = str(stimmung())
|
||||
|
||||
|
||||
(zfw, tow, payload, pax, metar_dest, metar_origin, fuel, distance, fl, flightlevel, flightnumber, airline,
|
||||
|
|
@ -259,20 +293,30 @@ print(replaceFiles())
|
|||
ordnerneu.mkdir(exist_ok=True)
|
||||
|
||||
metarCabin = METAR()
|
||||
print(metarCabin.choices[0].message.content)
|
||||
metar = metarCabin.choices[0].message.content
|
||||
metar = "\n".join(filter(None, map(str.strip, metar.splitlines())))
|
||||
|
||||
welcomePilot = WelcomePilot()
|
||||
|
||||
Inhalt = welcomePilot.choices[0].message.content
|
||||
Inhalt = "\n".join(filter(None, map(str.strip, Inhalt.splitlines())))
|
||||
print(Inhalt)
|
||||
print(os.getcwd())
|
||||
|
||||
|
||||
InhaltCruise10 = CruiseElapsed10Percent().choices[0].message.content
|
||||
InhaltCruise10 = "\n".join(filter(None, map(str.strip, InhaltCruise10.splitlines())))
|
||||
|
||||
|
||||
InhaltCruise50 = CruiseElapsed50Percent().choices[0].message.content
|
||||
InhaltCruise50 = "\n".join(filter(None, map(str.strip, InhaltCruise50.splitlines())))
|
||||
|
||||
|
||||
Pfad = Pfad_wd + 'BoardingWelcomePilot.txt'
|
||||
txtSave(Pfad, Inhalt)
|
||||
print(Pfad)
|
||||
|
||||
Pfad = Pfad_wd + 'FastenSeatbelt.txt'
|
||||
txtSave(Pfad, metar)
|
||||
|
||||
Pfad = Pfad_wd + 'CruiseElapsed10Percent.txt'
|
||||
txtSave(Pfad, InhaltCruise10)
|
||||
|
||||
Pfad = Pfad_wd + 'CruiseElapsed50Percent.txt'
|
||||
txtSave(Pfad, InhaltCruise50)
|
||||
Loading…
Add table
Add a link
Reference in a new issue