YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1#ifndef UTILS_H
2#define UTILS_H
3
4#include <string>
5#include <iostream>
6#include "json.hpp"
7#include <curl/curl.h>
8#include <unistd.h>
9#include <sys/types.h>
10#include <sys/prctl.h>
11#include <signal.h>
12#include <cstdlib>
13#include <cstring>
14
15using json = nlohmann::json;
16
17void startLlama2Server(const std::string &model_path, int m_context, int m_gpulayers);
18std::string extractContent(const std::string& jsonResponse);
19size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp);
20std::string sendPostRequest(const std::string& jsonData);
21
22#endif // UTILS_H
std::string sendPostRequest(const std::string &jsonData)
Definition Utils.cpp:18
nlohmann::json json
Definition Utils.h:15
void startLlama2Server(const std::string &model_path, int m_context, int m_gpulayers)
Definition Utils.cpp:61
std::string extractContent(const std::string &jsonResponse)
Definition Utils.cpp:3
size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
Definition Utils.cpp:13