Skip to content

Getting:OpenAI curl_easy_perform() failed: SSL peer certificate or SSH remote key was not OK #11

@sasmaster

Description

@sasmaster

I am testing this:

openai::start("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); // Or you can handle it yourself

    auto completion = openai::completion().create(R"(
    {
        "model": "text-davinci-003",
        "prompt": "Say this is a test",
        "max_tokens": 7,
        "temperature": 0
    }
    )"_json); // Using user-defined (raw) string literals
    std::cout << "Response is:\n" << completion.dump(2) << '\n';

    auto image = openai::image().create({
        { "prompt", "A logo with a cello in a heart"},
        { "n", 1 },
        { "size", "512x512" }
        }); // Using initializer lists
    std::cout << "Image URL is: " << image["data"][0]["url"] << '\n';
    std::cout << "Hello World!\n";

Getting this error from CURL:
Type: CURLE_PEER_FAILED_VERIFICATION

OpenAI curl_easy_perform() failed: SSL peer certificate or SSH remote key was not OK

Any idea why it happens?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions