Invoking OpenAI's ChatGPT from 6 different programming languages

Thomas Hansen - Jul 13 '23 - - Dev Community

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.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player