46 std::string api_key_name =
"")
76 Poco::JSON::Object body_json =
toJson(req);
rclcpp::Node::SharedPtr node_
Node shared pointer.
Definition base_class.hpp:105
std::string plugin_name_
Plugin name.
Definition base_class.hpp:112
EmbedBaseClass.
Definition embed_base_class.hpp:17
virtual Poco::JSON::Object toJson(prompt::EmbedRequest &input)=0
Convert a embed request to a JSON object.
virtual void initialize_embed_base(rclcpp::Node::SharedPtr node, std::string plugin_name="EmbedBaseClass", std::string api_key_name="")
Initialize the REST base class.
Definition embed_base_class.hpp:45
virtual ~EmbedBaseClass()=default
Destructor.
EmbedBaseClass()
Constructor.
Definition embed_base_class.hpp:24
virtual prompt::EmbedResponse fromJson(const Poco::JSON::Object::Ptr object)=0
Convert a JSON object to a embed response.
virtual prompt::EmbedResponse get_embeddings(prompt::EmbedRequest &req) override
get_embeddings sends a text to an embedding provider using REST
Definition embed_base_class.hpp:70
std::string embed_uri_
URI for embedding requests.
Definition embed_base_class.hpp:113
RestBaseClass.
Definition rest_base_class.hpp:31
Poco::JSON::Object::Ptr process(Poco::JSON::Object &body_json, std::string &uri)
Process the HTTP request and return the response as a JSON object.
Definition rest_base_class.hpp:170
std::vector< prompt::PromptOption > required_options_
Model options.
Definition rest_base_class.hpp:371
virtual void initialize_rest_base(rclcpp::Node::SharedPtr node, std::string plugin_name="RestBaseClass", std::string api_key_name="")
Initialize the REST base class.
Definition rest_base_class.hpp:59
Definition base_class.hpp:8
void ensure_model_options(rclcpp::Node::SharedPtr node, std::vector< prompt::PromptOption > &options, std::vector< prompt::PromptOption > &required_options)
Check and add required model options to the prompt options.
Definition prompt_options.hpp:149
Definition structs.hpp:46
std::vector< PromptOption > options
Definition structs.hpp:49
Definition structs.hpp:61