How does OpenAI compare versus a penguin in the role of a legal secretary? Let’s see…

import openai
import os
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file
openai.api_key = os.getenv('OPENAI_API_KEY')
def get_completion(prompt, model="gpt-3.5-turbo", temperature=0):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=temperature,
)
return response.choices[0].message["content"]
prompt = f"""
Translate the following letter from a legal firm to a delinquent client, Fred 'The Cincinnati Strangler' Johnson, from hostile slang to a friendly business letter:
'Attention criminal pervert: Where the hell is my dough, you twisted goon? Don't forget who got you sprung on that technicality. I want the money. Now. P.S. Have you strangled your wife yet, psycho-brain?'
"""
response = get_completion(prompt)
print(response)
Dear Mr. Johnson, We are writing to follow up on the outstanding balance on your account. As your legal representatives, we were able to assist you in your legal matters and we kindly request that you fulfill your financial obligations to us promptly. Please be advised that we require payment as soon as possible. We appreciate your attention to this matter and look forward to receiving your payment promptly. Thank you for your cooperation. Sincerely,
I still have to give it to Opus by a flipper, mainly for the P.S., but OpenAI got into the right general headspace! And it’s too hot here in Texas for me to keep a penguin around to translate what I want to say into more acceptable terms, and I sure get tired of doing it.
I miss my old Eudora email client that would put little hot peppers next to my email if it thought it was too spicy…
Filed under AI, General