LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ai::IAIService Class Referenceabstract

Interface for AI service communication. More...

#include <IAIService.hpp>

Inheritance diagram for ai::IAIService:
Inheritance graph
Collaboration diagram for ai::IAIService:
Collaboration graph

Public Member Functions

virtual ~IAIService ()=default
 
std::string GetServiceType () const override
 Type of service ("ai", "analyzer", "exporter", etc.)
 
virtual std::string SendPrompt (const std::string &prompt, std::function< void(const std::string &)> callback=nullptr)=0
 Send a prompt to the AI and get a response.
 
virtual bool IsAvailable () const =0
 Check if the AI service is available.
 
virtual std::string GetModelName () const =0
 Get the name of the model being used.
 
virtual void SetModelName (const std::string &modelName)=0
 
virtual std::string GetProviderName () const =0
 Get the name of the AI provider.
 
virtual std::string GetServiceId () const =0
 Unique identifier for this service instance.
 

Detailed Description

Interface for AI service communication.

Constructor & Destructor Documentation

◆ ~IAIService()

virtual ai::IAIService::~IAIService ( )
virtualdefault

Member Function Documentation

◆ GetModelName()

virtual std::string ai::IAIService::GetModelName ( ) const
pure virtual

Get the name of the model being used.

Implemented in ai::AnthropicClient, ai::GeminiClient, ai::LLMClient, ai::OllamaClient, and ai::OpenAIClient.

◆ GetProviderName()

virtual std::string ai::IAIService::GetProviderName ( ) const
pure virtual

Get the name of the AI provider.

Implemented in ai::AnthropicClient, ai::GeminiClient, ai::LLMClient, ai::OllamaClient, and ai::OpenAIClient.

◆ GetServiceId()

virtual std::string services::IService::GetServiceId ( ) const
pure virtualinherited

Unique identifier for this service instance.

Implemented in ai::AnthropicClient, ai::GeminiClient, ai::LLMClient, ai::OllamaClient, and ai::OpenAIClient.

◆ GetServiceType()

std::string ai::IAIService::GetServiceType ( ) const
inlineoverridevirtual

Type of service ("ai", "analyzer", "exporter", etc.)

Implements services::IService.

◆ IsAvailable()

virtual bool ai::IAIService::IsAvailable ( ) const
pure virtual

Check if the AI service is available.

Returns
true if service can be reached

Implemented in ai::AnthropicClient, ai::GeminiClient, ai::LLMClient, ai::OllamaClient, and ai::OpenAIClient.

◆ SendPrompt()

virtual std::string ai::IAIService::SendPrompt ( const std::string &  prompt,
std::function< void(const std::string &)>  callback = nullptr 
)
pure virtual

Send a prompt to the AI and get a response.

Parameters
promptThe text prompt to send
callbackFunction called with response chunks as they arrive
Returns
Complete response text

Implemented in ai::AnthropicClient, ai::GeminiClient, ai::LLMClient, ai::OllamaClient, and ai::OpenAIClient.

◆ SetModelName()

virtual void ai::IAIService::SetModelName ( const std::string &  modelName)
pure virtual

The documentation for this class was generated from the following file: