|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
#include "OllamaClient.hpp"#include "Config.hpp"#include "PluginLoggerC.h"#include <fmt/format.h>#include <sstream>#include <iomanip>#include <stdexcept>#include <curl/curl.h>
Namespaces | |
| namespace | ai |
| namespace | ai::anonymous_namespace{OllamaClient.cpp} |
Macros | |
| #define | PLUGIN_LOG(level, ...) do { std::string _pl_msg = fmt::format(__VA_ARGS__); PluginLogger_Log(level, _pl_msg.c_str()); } while(0) |
Functions | |
| size_t | ai::anonymous_namespace{OllamaClient.cpp}::WriteCallback (void *contents, size_t size, size_t nmemb, std::string *userp) |
| std::string | ai::anonymous_namespace{OllamaClient.cpp}::EscapeJson (const std::string &input) |
| ai::if (contentEnd >=response.length()) | |
| ai::while ((pos=result.find("\\n", pos)) !=std::string::npos) | |
| ai::while ((pos=result.find("\\\"", pos)) !=std::string::npos) | |
| ai::if (callback) callback(result) | |
| ai::PLUGIN_LOG (PLUGIN_LOG_DEBUG, "Received response from Ollama (length: {})", result.length()) | |
| catch (const std::exception &e) | |
Variables | |
| std::string | ai::result = response.substr(contentStart, contentEnd - contentStart) |
| size_t | ai::pos = 0 |
| #define PLUGIN_LOG | ( | level, | |
| ... | |||
| ) | do { std::string _pl_msg = fmt::format(__VA_ARGS__); PluginLogger_Log(level, _pl_msg.c_str()); } while(0) |
| catch | ( | const std::exception & | e | ) |