enhance sth
This commit is contained in:
@@ -9,46 +9,6 @@ from api_keys import OPENAI_API_KEY
|
|||||||
|
|
||||||
client = OpenAI(api_key=OPENAI_API_KEY)
|
client = OpenAI(api_key=OPENAI_API_KEY)
|
||||||
|
|
||||||
preliminary_angebot_schema = {
|
|
||||||
"name": "create_preliminary_angebot",
|
|
||||||
"description": "Erstellt ein strukturiertes PreliminaryAngebot",
|
|
||||||
"parameters": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"name": {"type": "string"},
|
|
||||||
"beschreibung": {"type": "string"},
|
|
||||||
"strasse": {"type": "string"},
|
|
||||||
"hausNr": {"type": "string"},
|
|
||||||
"plz": {"type": "string"},
|
|
||||||
"ort": {"type": "string"},
|
|
||||||
"adresseZusatz": {"type": "string"},
|
|
||||||
|
|
||||||
"web": {"type": "string"},
|
|
||||||
"mail": {"type": "string"},
|
|
||||||
"telefon": {"type": "string"},
|
|
||||||
"fax": {"type": "string"},
|
|
||||||
|
|
||||||
"kategorie": {"type": "string"},
|
|
||||||
"unterkategorie": {"type": "string"},
|
|
||||||
"themen": {"type": "string"},
|
|
||||||
|
|
||||||
"traeger": {"type": "string"},
|
|
||||||
"zielgruppe": {"type": "string"},
|
|
||||||
"angebote": {"type": "string"},
|
|
||||||
"oeffnungsZeiten": {"type": "string"},
|
|
||||||
"kostenuebernahme": {"type": "string"},
|
|
||||||
"sprache": {"type": "string"},
|
|
||||||
"barrierefreiheit": {"type": "string"},
|
|
||||||
"konstellation": {"type": "string"},
|
|
||||||
|
|
||||||
"restInput": {"type": "string"},
|
|
||||||
"completeInput": {"type": "string"},
|
|
||||||
},
|
|
||||||
"required": ["name", "beschreibung", "plz", "ort", "adresseZusatz", "web", "restInput", "completeInput"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class PreliminaryAngebot(BaseModel):
|
class PreliminaryAngebot(BaseModel):
|
||||||
name: str = ""
|
name: str = ""
|
||||||
beschreibung: str = ""
|
beschreibung: str = ""
|
||||||
@@ -77,16 +37,20 @@ class PreliminaryAngebot(BaseModel):
|
|||||||
konstellation: Optional[str] = ""
|
konstellation: Optional[str] = ""
|
||||||
|
|
||||||
restInput: str = ""
|
restInput: str = ""
|
||||||
completeInput: str = ""
|
changedInputFields: str = ""
|
||||||
|
|
||||||
|
|
||||||
inputText = '''
|
inputText = '''
|
||||||
Hier sind Daten einer psychologischen Anlaufstation.
|
Hier sind Daten eines psychologischen Angebots. Bitte fehlende Daten ergänzen und fehlerhafte ggf. ersetzen.
|
||||||
Kannst du fehlende Daten ergänzen und fehlerhafte ggf. ersetzen? Wichtig wäre die Angabe der korrekten Webseite.
|
Priorität hat die Angabe der korrekten Webseite zu dem Angebot, falls nicht schon vorhanden. Die Webseite muss spezifisch zu dem Angebot sein - sonst ignorieren. Ist schon eine angegeben, ersetze sie nur, wenn die alte Webseite ungültig ist.
|
||||||
|
|
||||||
Kinder- u. Jugendlichenpsychotherapeutin Stephanie Eckmann, Lünen
|
Nutze das Feld 'restInput' für Infos zu dem Angebot, falls diese thematisch nicht in die restlichen Felder passen.
|
||||||
Birkenweg 9
|
Hast du Felder inhaltlich verändert, liste ihre Namen in 'changedInputFields' auf.
|
||||||
44532 Lünen
|
|
||||||
|
Kinder- und Jugendpsychiatrische Praxis
|
||||||
|
Dr. med. Joachim Schreck
|
||||||
|
Theodor-Heuss-Ring 1, 50668 Köln
|
||||||
|
0221 / 733773
|
||||||
'''
|
'''
|
||||||
|
|
||||||
response = client.responses.parse(
|
response = client.responses.parse(
|
||||||
@@ -96,6 +60,6 @@ response = client.responses.parse(
|
|||||||
text_format=PreliminaryAngebot,
|
text_format=PreliminaryAngebot,
|
||||||
)
|
)
|
||||||
print('### Input ###\n', inputText.replace('\r', '').replace('\n', ' '))
|
print('### Input ###\n', inputText.replace('\r', '').replace('\n', ' '))
|
||||||
print('\n\n### Response ###\n', response.output_text)
|
print('\n### Response ###\n', response.output_text)
|
||||||
|
|
||||||
print("\n\nOk ciao")
|
print("\nOk ciao")
|
||||||
|
Reference in New Issue
Block a user