YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
LLM_nwc_yarp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#include <yarp/os/Network.h>
9#include <yarp/dev/ILLM.h>
12
21 public yarp::dev::ILLM,
23{
24protected:
25 // thrift interface
27
28 // rpc port
30
31public:
32
33 //From DeviceDriver
34 bool open(yarp::os::Searchable& config) override;
35 bool close() override;
36
37 //From ILLM
38 bool setPrompt(const std::string& prompt) override;
39 bool readPrompt(std::string& oPrompt) override;
40 bool ask(const std::string& question, yarp::dev::LLM_Message& oAnswer) override;
41 bool getConversation(std::vector<yarp::dev::LLM_Message>& oConversation) override;
42 bool deleteConversation() override;
43 bool refreshConversation() override;
44};
This class is the parameters parser for class LLM_nwc_yarp.
LLM_nwc_yarp: The client side of any ILLM capable device.
bool ask(const std::string &question, yarp::dev::LLM_Message &oAnswer) override
Performs a question.
bool setPrompt(const std::string &prompt) override
Performs a question.
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getConversation(std::vector< yarp::dev::LLM_Message > &oConversation) override
Retrieves the whole conversation.
bool readPrompt(std::string &oPrompt) override
Retrieves the provided prompt.
yarp::os::Port m_rpc_port_to_LLM_server
bool deleteConversation() override
Delete the conversation and clear the system context from any internally stored context.
yarp::dev::llm::ILLMMsgs m_LLM_RPC
bool refreshConversation() override
Refresh the conversation.
Interface implemented by all device drivers.
ILLM interface.
Definition ILLM.h:25
A mini-server for network communication.
Definition Port.h:46
A base class for nested structures that can be searched.
Definition Searchable.h:31