// Conversation.h #pragma once #include #include #include #include #include #include #include //NEED THIS IN MAKE FILE TO USE PRIVATE HEADERS //CXXFLAGS = -std=c++17 -Wall -I/boot/system/develop/headers/private //Build works but Genio doesn't see class definitions unless I use full path ? #include "/boot/system/develop/headers/private/netservices2/NetServicesDefs.h" #include "/boot/system/develop/headers/private/netservices2/HttpSession.h" #include "/boot/system/develop/headers/private/netservices2/HttpRequest.h" #include "/boot/system/develop/headers/private/netservices2/HttpResult.h" #include "/boot/system/develop/headers/private/netservices2/HttpFields.h" #include "/boot/system/develop/headers/private/netservices2/ErrorsExt.h" //From private headers ! //#include //#include //#include //#include //#include //#include static const uint32 kSendReply = 'krpl'; #include "include/json.hpp" using json = nlohmann::json; using namespace BPrivate::Network; using namespace BPrivate::Network; class Conversation : public BHandler { public: Conversation(BHandler* replyTo); virtual ~Conversation() ; virtual void ask(const std::string& prompt); virtual void MessageReceived(BMessage *msg); private: void sendReply(BMessage message); BHandler* replyTarget; BString ReadOpenAIKey(); BString _apiKey; BHttpSession _sharedSession = BHttpSession (); std::optional _lastResult; };