Archive

Posts Tagged ‘PyStata’

Stata commands to run ChatGPT, Claude, Gemini, and Grok

I wrote a blog post in 2023 titled A Stata command to run ChatGPT, and it remains popular. Unfortunately, OpenAI has changed the API code, and the chatgpt command in that post no longer runs. In this post, I will show you how to update the API code and how to write similar Stata commands that use Claude, Gemini, and Grok like this: Read more…

A Stata command to run ChatGPT

Artificial intelligence (AI) is a popular topic in the media these days, and ChatGPT is, perhaps, the most well-known AI tool. I recently tweeted that I had written a Stata command called chatgpt for myself that runs ChatGPT. I promised to explain how I did it, so here is the explanation. Read more…