Open AI C++, a new open source library

Available on Github: https://github.com/olrea/openai-cpp

Koala 1

You have probably have heard about Open AI the creator of ChatGPT, an artificial intelligence tool which allows you to ask questions in natural language and DALL-E, deep learning models to generate digital images from natural language description.

To illustrate, this image has been generated with OpenAI, with this simple text: A cute koala playing the violin.

We are proud to announce OpenAI-C++ a new open source community-maintained library which provides convenient access to the OpenAI API from applications written in the C++ language.

The library should be fully functionnal and should cover all API reference in the examples. Installation and usage should be straightforward since it is a header only library.

Here a code showcase where we generate 4 images thanks to OpenAI DALL·E models:

#include "openai.hpp"#include <iostream>int main() {    openai::start(); // Will use the api key provided by `OPENAI_API_KEY` environment variable    auto images = openai::image().create({        { "prompt", "A cute koala playing the violin"},        { "n", 4 },        { "size", "200x200" }    }); // Using initializer lists    std::cout << images << '\n'; }

Feel free to contribute on our Github repository!

Koala 1Koala 2Koala 3Koala 4