olrea / openai-cpp

OpenAI C++ is a community-maintained library for the Open AI API
https://openai.com/api/
MIT License
183 stars 65 forks source link

OpenAI curl_easy_perform() failed: Unsupported protocol #22

Open audio-algorithms opened 1 year ago

audio-algorithms commented 1 year ago

When I run your example I get the following curl error: "OpenAI curl_easy_perform() failed: Unsupported protocol"

I downloaded curl source and built it using cmake. I placed the DLL and LIB files in the same directory as the test executable.

Are there certain options I should enable when building curl?

coin-au-carre commented 1 year ago

Hi I am not sure why you are getting these errors.

According to https://stackoverflow.com/questions/21612132/unsupported-protocol-using-curl-in-c and https://curl.se/mail/lib-2022-04/0019.html it seems that curl installation and linking are mostly the problem.

How do you link your library ? Can you precise what build steps you are doing ?