I am seeking guidance for whether the assistants api is the proper OpenAI method for extracting a set of specific structured fields from already-transcribed voicemails.
I have a prototype of this working as a custom ChatGPT. It is my understanding, however, that these cannot be invoked programmatically via API.
Is my best bet to provide an assistant with a json file as input and ask it for json out? Below is a bit of background:
Assume I start with the following json of voicemails:
[
{
"id": "dfe511de-3dd7-45f0-9c90-5bc5b75cb37e",
"transcription": "Good afternooon. This is Jules Winnfield from Los Angeles, California. I'm calling about a good friend of mine, Marsellus Wallace. His customer number is 14221 dash 084. We placed the order back on February 22 2024. The problem is that we never received the order and were looking for an explanation. You can call me back at this number or 310-554-2211. The email on the order is badmf@gmail.com or it could be bad m f at yahoo.com, I'm not sure.",
"from": "+12015556161"
},
{
"id": "15434d7b-0920-4151-b2e8-f97a444c894e",
"transcription": "Hey man, my name is Winston Wolf. I'm looking for a colleague of mine, Jimmie Dimmick. I have a request here, the number is 17228010. That's 17228010. Submitted to us back on January 22, 2024. It says you got a corpse in the a car, minus a head, in a garage. Problem is I can't find your address, so I need you to call me back, pronto. Get me at this number or on my car phone at 310-221-1212. Or you can send a page to me at thewolf, that's t-h-e-w-o-l-f at aol.com. And do me a favor, put a put of coffee on for me. Thanks.",
"from": "+12015552211"
},
{
"id": "266d8d02-b388-4f91-b578-4017c2e498d4",
"transcription": "Vincent Vega calling on behalf of Mia Wallace, that's Mia W-A-L-L-A-C-E. Her ID number is 18812 554. Again, it's 18812 554. I'm supposed to be taking her out tomorrow night, March 15, and want to know what she wants to eat or whatever. Holla back at me or shoot me a note at uncomfortable dot silences at yahoo.com. Or you can text me at this number.",
"from": "+19085552211"
},
{
"id": "71e8c91a-0e18-4610-b23e-5fe208be87ae",
"transcription": "Listen closely. This is Marsellus Wallace, spelled M-A-R-S-E-L-L-U-S Wallace. Calling about my wife Mia. The ID number I have for her is 77612 dash 331. 77612 dash 331. It's dated December 21, 2023 and I'm calling for an update because I haven't heard anything from you guys. I need to hear from you, so call me here or send me an email at ezekiel at wallace company dot net. Or my private number 310 211 9900.",
"from": "+19085552250"
}
]
I would be looking any mentioned phone numbers and email addresses to be extracted from the transcribed dialogue, as well as the subject_id field (always an 8 byte number, sometimes split into two separate sections by a dash when spoken, e.g. “77612 dash 331”) and order_date (any date mentioned in the dialogue).
[
{
"id": "dfe511de-3dd7-45f0-9c90-5bc5b75cb37e",
"phone_numbers": ["+12015556161", "+13105542211"],
"email_addresses": ["badmf@gmail.com", "badmf@yahoo.com"],
"subject_id": "14221084",
"order_date": "2024-02-22"
},
{
"id": "15434d7b-0920-4151-b2e8-f97a444c894e",
"phone_numbers": ["+12015552211", "+13102211212"],
"email_addresses": ["thewolf@aol.com"],
"subject_id": "17228010",
"order_date": "2024-02-22",
},
{
"id": "266d8d02-b388-4f91-b578-4017c2e498d4",
"phone_numbers": ["+19085552211"],
"email_addresses": ["uncomfortable.silences@yahoo.com"],
"subject_id": "18812554",
"order_date": "2024-03-15"
},
{
"id": "71e8c91a-0e18-4610-b23e-5fe208be87ae",
"phone_numbers": ["+19085552250","+13102119900"],
"email_addresses": ["ezekiel@wallacecompany.net"],
"subject_id": "77612331",
"order_date": "2023-12-21"
},
]