5#include "PluginEventsC.h"
6#include <nlohmann/json.hpp>
29 explicit LogAnalyzer(std::shared_ptr<AIServiceWrapper> aiService);
39 const std::vector<unsigned long>* filteredIndices =
nullptr);
49 const std::vector<unsigned long>* filteredIndices =
nullptr);
64 std::string
FormatEventsForAI(
size_t maxEvents,
const std::vector<unsigned long>* filteredIndices)
const;
65 void FormatSingleEvent(std::ostringstream& oss,
size_t index,
const nlohmann::json& eventJson)
const;
Analyzes logs using AI to provide insights.
Definition LogAnalyzer.hpp:18
std::string BuildPrompt(AnalysisType type, const std::string &logData) const
Definition LogAnalyzer.cpp:315
void FormatSingleEvent(std::ostringstream &oss, size_t index, const nlohmann::json &eventJson) const
Definition LogAnalyzer.cpp:293
bool IsReady() const
Check if AI service is ready.
Definition LogAnalyzer.cpp:174
std::shared_ptr< AIServiceWrapper > m_aiService
Definition LogAnalyzer.hpp:62
std::string FormatEventsForAI(size_t maxEvents, const std::vector< unsigned long > *filteredIndices) const
Definition LogAnalyzer.cpp:192
AnalysisType
Definition LogAnalyzer.hpp:21
static std::string GetAnalysisTypeName(AnalysisType type)
Get human-readable name for analysis type.
Definition LogAnalyzer.cpp:179
std::string Analyze(AnalysisType type, size_t maxEvents=100, const std::vector< unsigned long > *filteredIndices=nullptr)
Perform analysis on current log data.
Definition LogAnalyzer.cpp:20
std::string AnalyzeWithCustomPrompt(const std::string &customPrompt, size_t maxEvents=100, const std::vector< unsigned long > *filteredIndices=nullptr)
Perform analysis with custom user-defined prompt.
Definition LogAnalyzer.cpp:91
Definition GemmaInferenceEngine.cpp:18