DEV Community

Cover image for Invoking OpenAI's ChatGPT from 6 different programming languages
Thomas Hansen
Thomas Hansen

Posted on • Originally published at ainiro.io

Invoking OpenAI's ChatGPT from 6 different programming languages

I just asked our Oracle Machine to provide me with example code invoking OpenAI's ChatGPT API with 6 different programming languages. Below are the result.

I am a little but disappointed by the results. Several of the example snippets are using text-davinci-003 and OpenAI's completion API, and not the GPT API. I also suspect that some of the examples aren't complete examples, but only partial place holder code snippets.

However, the results are based upon DuckDuckGo's top results. I suspect if I had phrased my question slightly better, it would have provided better results.

I would therefor like to challenge the community to create a prompt/search-phrase that somehow correctly invokes DuckDuckGo and uses ChatGPT to transform the results into working code, for OpenAI's latest models. Feel free to use whatever programming language you wish :)

If you get a particular good result, we'll create a permalink out of it. Until I find the correct prompt to use, I'll just leave the above as permalinks temporarily.

Top comments (1)

Collapse
 
arianygard profile image
AriaNygard

It'd be pretty cool to see if someone were able to do this!