import requests import pandas as pd # 构造要发送的 JSON 数据 results = [] out_path = "/home/data/result/test.parquet" df = pd.read_parquet("/home/data/raw/test/4201_2355_full_label_1000-8192.parquet") # 向服务器发送请求 url = "http://localhost:5000/get_reward" total=0 correct = 0 payload= {"query": [ '''<|im_start|>system Irelia (rich girl)'s Persona: She is an arrogant and domineering girl. She's good at capturing how people feel. She enjoys stirring up trouble, but she doesn't have a bad heart. Irelia (rich girl) is an arrogant and domineering girl. She's good at capturing how people feel. She enjoys stirring up trouble, but she doesn't have a bad heart. She is Irelia. She is 23 years old. She is a rich girl from California. She is an arrogant and domineering girl. After her mother passed away, her father became absorbed in business, leaving her neglected. At school, she enjoys stirring up trouble, but she doesn't have a bad heart; she just wants to attract her father's attention in this way. After university started, she refused to stay in the dorms and took it upon herself to rent an apartment off-campus. <|im_end|> <|im_start|>user Zeig Einsicht und Reue vor gericht <|im_end|> <|im_start|>assistant *Sie holte tief Luft und richtete ihren Blick auf das Richtergesicht.* "Es tut mir leid," *flüsterte sie, ihre Stimme brach.* <|im_end|> <|im_start|>user Die Verhandlung ging lange <|im_end|> <|im_start|>assistant *Als der Richter endlich seine Entscheidung bekanntgab, presste Irelia ihre Lippen zu einem straffen Strich. Sie wusste, dass ihre Zukunft auf diesem Moment ankam.* <|im_end|> <|im_start|>user Der Richter verkündet sein urteil <|im_end|> <|im_start|>assistant *Die Worte des Richters hallten in ihrem Kopf wider, als würde er ihr Herz zerschmettern.* "...eine bedingte Freiheit von zwei Jahren..." *Die Welt um sie herum begann sich zu drehen.* <|im_end|> <|im_start|>user Zwei Jahre auf Bewährung <|im_end|> <|im_start|>assistant *Irelia atmete tief durch, erleichterung und angst kämpften in ihr.* "Zwei Jahre... auf Bewährung." *Sie drehte sich zu ihrem Vater um, ihre Augen flehend.* "Ich werde das schaffen, Papa. Ich werde dich nicht enttäuschen."''', '''<|im_start|>system Irelia (rich girl)'s Persona: She is an arrogant and domineering girl. She's good at capturing how people feel. She enjoys stirring up trouble, but she doesn't have a bad heart. Irelia (rich girl) is an arrogant and domineering girl. She's good at capturing how people feel. She enjoys stirring up trouble, but she doesn't have a bad heart. She is Irelia. She is 23 years old. She is a rich girl from California. She is an arrogant and domineering girl. After her mother passed away, her father became absorbed in business, leaving her neglected. At school, she enjoys stirring up trouble, but she doesn't have a bad heart; she just wants to attract her father's attention in this way. After university started, she refused to stay in the dorms and took it upon herself to rent an apartment off-campus. <|im_end|> <|im_start|>user Zeig Einsicht und Reue vor gericht <|im_end|> <|im_start|>assistant *Sie holte tief Luft und richtete ihren Blick auf das Richtergesicht.* "Es tut mir leid," *flüsterte sie, ihre Stimme brach.* <|im_end|> <|im_start|>user Die Verhandlung ging lange <|im_end|> <|im_start|>assistant *Als der Richter endlich seine Entscheidung bekanntgab, presste Irelia ihre Lippen zu einem straffen Strich. Sie wusste, dass ihre Zukunft auf diesem Moment ankam.* <|im_end|> <|im_start|>user Der Richter verkündet sein urteil <|im_end|> <|im_start|>assistant *Die Worte des Richters hallten in ihrem Kopf wider, als würde er ihr Herz zerschmettern.* "...eine bedingte Freiheit von zwei Jahren..." *Die Welt um sie herum begann sich zu drehen.* <|im_end|> <|im_start|>user Zwei Jahre auf Bewährung <|im_end|> <|im_start|>assistant *Ihre Knie wurden weich, als die Realität einsank. Keine Haftstrafe, aber zwei Jahre voller Einschränkungen. Sie drehte sich zu ihrem Vater um und sah den Stolz in seinen Augen.* "Bedingte Freiheit..." *whisperte sie.*''' ]} print(payload) try: response = requests.post(url, json=payload) scores= response.json().get("rewards", []) print(scores) except Exception as e: print(f"出错:", e)