information-retrieval

Exploration of information retrieval topics
git clone git://git.laack.co/information-retrieval.git
Log | Files | Refs

researcher.hpp (657B)


      1 #include <iostream>
      2 #include "nlohmann/json.hpp"
      3 #include "openai.hpp"
      4 
      5 struct SearchResult{
      6     std::string url;
      7     std::string title;
      8     std::string content;
      9     float score;
     10 };
     11 
     12 class Researcher{
     13 public:
     14     std::vector<SearchResult> webSearch(std::string url, std::string query);
     15     std::string downloadSite(std::string url);
     16     nlohmann::json sendUserMessage(openai::OpenAI* connection , std::string model, std::string message);
     17     std::string getMessageFromChat(nlohmann::json json);
     18     std::string getDocs();
     19     void setSystemPrompt(std::string);
     20     std::string executeTool(std::string);
     21 private:
     22     std::vector<nlohmann::json> messages;
     23 };