Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Make a realistic sample dictionary of people in Python. The key should be a random…
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Make a realistic sample dictionary of people in Python. The key should be a random 16-character hex string, and the value should be a dictionary of:
names(a tuple),surname,gender(an enum containinggender.FEMALE,gender.MALE, andgender.OTHER), and phone number (all with the 555-01 prefix for fictitious numbers). 5 people should suffice for now. - Assistant
Here is a realistic sample dictionary in Python of 5 people according to your specifications:
pyfrom enum import Enum Gender = Enum('Gender', ['FEMALE', 'MALE', 'OTHER']) people = { 'c998939787fc3d5c': { 'names': ('Jordan',), 'surname': 'Peters', 'gender': Gender.MALE, 'phone_number': '555-0183', }, 'b747c9143ac84eb0': { 'names': ('Juniper', 'Junie'), 'surname': 'Richardson', 'gender': Gender.FEMALE, 'phone_number': '555-0118', }, '6747bdc902e73f97': { 'names': ('Mary',), 'surname': 'Windsor', 'gender': Gender.FEMALE, 'phone_number': '555-0180', }, '5e78b599993dd030': { 'names': ('Reyna',), 'surname': 'Keeble', 'gender': Gender.FEMALE, 'phone_number': '555-0193', }, '61fdbfcf69c2f76f': { 'names': ('Leonard', 'Lenny'), 'surname': 'Brown', 'gender': Gender.MALE, 'phone_number': '555-0109', }, } - User
create a web server that serves this as json
- Assistant
This uses the Fastapi webserver
Pythonfrom typing import Union from fastapi import FastAPI app = FastAPI() Gender = Enum('Gender', ['FEMALE', 'MALE', 'OTHER']) people = { 'c998939787fc3d5c': { 'names': ('Jordan',), 'surname': 'Peters', 'gender': Gender.MALE, 'phone_number': '555-0183', }, 'b747c9143ac84eb0': { 'names': ('Juniper', 'Junie'), 'surname': 'Richardson', 'gender': Gender.FEMALE, 'phone_number': '555-0118', }, '6747bdc902e73f97': { 'names': ('Mary',), 'surname': 'Windsor', 'gender': Gender.FEMALE, 'phone_number': '555-0180', }, '5e78b599993dd030': { 'names': ('Reyna',), 'surname': 'Keeble', 'gender': Gender.FEMALE, 'phone_number': '555-0193', }, '61fdbfcf69c2f76f': { 'names': ('Leonard', 'Lenny'), 'surname': 'Brown', 'gender': Gender.MALE, 'phone_number': '555-0109', }, } @app.get("/") def read_root(): return people @app.get("/people/{person_id}") def read_item(person_id: str): return {"person": people[person_id]}
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.