24 yCError(LLM_NWC_YARP,
"Cannot open rpc port, check network");
33 yCError(LLM_NWC_YARP,
"open() error could not connect to %s",
m_remote.c_str());
39 yCError(LLM_NWC_YARP,
"Cannot attach the m_rpc_port_to_LLM_server port as client");
42 yCDebug(LLM_NWC_YARP) <<
"Opening of nwc successful";
76 for (
const auto &message :
ret.conversation)
78 oConversation.push_back(message);
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
yarp::dev::ReturnValue ask(const std::string &question, yarp::dev::LLM_Message &oAnswer) override
Performs a question.
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue refreshConversation() override
Refresh the conversation.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::os::Port m_rpc_port_to_LLM_server
yarp::dev::ReturnValue readPrompt(std::string &oPrompt) override
Retrieves the provided prompt.
yarp::dev::ReturnValue getConversation(std::vector< yarp::dev::LLM_Message > &oConversation) override
Retrieves the whole conversation.
yarp::dev::llm::ILLMMsgs m_LLM_RPC
yarp::dev::ReturnValue deleteConversation() override
Delete the conversation and clear the system context from any internally stored context.
yarp::dev::ReturnValue setPrompt(const std::string &prompt) override
Performs a question.
virtual yarp::dev::ReturnValue refreshConversation()
virtual yarp::dev::ReturnValue deleteConversation()
virtual return_ask ask(const std::string &question)
virtual yarp::dev::ReturnValue setPrompt(const std::string &prompt)
virtual return_readPrompt readPrompt()
virtual return_getConversation getConversation()
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.