From 8e096ab99c12d44d9ccadb2aa8e324114e96010f Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Tue, 6 Feb 2024 22:30:04 +0100 Subject: [PATCH] feat: added back location field --- main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index e4ca1ac..b418d3f 100755 --- a/main.py +++ b/main.py @@ -17,7 +17,8 @@ EXAMPLES = [ "output": json.dumps({ "title": "Statistical and Computational Aspects of Dynamics", "url": "http://www.crm.sns.it/event/507/", - "description": "Organized by Buddhima Kasun Fernando Akurugodage (Centro di ricerca matematica Ennio De Giorgi – SNS), Paolo Giulietti, and Tanja Isabelle Schindler (Universität Wien, Austria).\n\nLocation: Centro De Giorgi – SNS, Pisa", + "description": "Organized by Buddhima Kasun Fernando Akurugodage (Centro di ricerca matematica Ennio De Giorgi – SNS), Paolo Giulietti, and Tanja Isabelle Schindler (Universität Wien, Austria).", + "location": "Centro De Giorgi – SNS, Pisa", "startDate": "2022-12-13", "endDate": "2022-12-16" }), @@ -27,7 +28,8 @@ EXAMPLES = [ "output": json.dumps({ "title": "Workshop on Variational problems, PDEs and applications", "url": "http://pagine.dm.unipi.it/berselli/meeting2020/", - "description": "Organized by Luigi Berselli, Giuseppe Buttazzo, Matteo Novaga, and Andrea Malchiodi (Scuola Normale Superiore, Pisa).\n\nLocation: Department of Mathematics, Pisa", + "description": "Organized by Luigi Berselli, Giuseppe Buttazzo, Matteo Novaga, and Andrea Malchiodi (Scuola Normale Superiore, Pisa).", + "location": "Department of Mathematics, Pisa", "startDate": "2020-01-17", "endDate": "2020-01-18", }), @@ -37,7 +39,8 @@ EXAMPLES = [ "output": json.dumps({ "title": "Geometric Representation Theory. ICM Satellite Conference", "url": None, - "description": "Organized by Tomoyuki Arakawa (RIMS, Kyoto, Japan), Joel Kamnitzer (University of Toronto, Japan), Hiraku Nakajima (Kavli IPMU, Japan), Markus Reineke (Ruhr-Universität Bochum), Francesco Sala, and Vera Serganova (University of California Berkeley, USA).\n\nLocation: Online", + "description": "Organized by Tomoyuki Arakawa (RIMS, Kyoto, Japan), Joel Kamnitzer (University of Toronto, Japan), Hiraku Nakajima (Kavli IPMU, Japan), Markus Reineke (Ruhr-Universität Bochum), Francesco Sala, and Vera Serganova (University of California Berkeley, USA).", + "location": "Online", "startDate": "2022-06-27", "endDate": "2022-07-02", }), @@ -47,7 +50,8 @@ EXAMPLES = [ "output": json.dumps({ "title": "Incontri di geometria algebrica ed aritmetica Milano – Pisa", "url": "https://events.dm.unipi.it/event/109/", - "description": "Location: Department of Mathematics, Pisa", + "description": "", + "location": "Department of Mathematics, Pisa", "startDate": "2022-11-16", "endDate": "2022-11-17" }) @@ -60,7 +64,7 @@ def translate_to_json(input_html: str) -> str: messages=[ { "role": "system", - "content": "You are an assistant helping a developer converting raw text data to JSON. Output only valid JSON following the given examples, without including any additional notes or comments", + "content": "You are an assistant helping a developer converting raw text data to JSON. Output only valid compact inline JSON following the given examples, without including any additional notes or comments", }, ] + list( map(lambda example: ({