Feat: Refactoring LLM Plugin, update docs. (#165)

Refactoring LLM Plugin, update docs.
This commit is contained in:
Mario Candela
2025-02-16 22:48:59 +01:00
committed by GitHub
parent 8703d1afda
commit 38297faed2
8 changed files with 82 additions and 58 deletions

View File

@ -37,10 +37,10 @@ func (httpStrategy HTTPStrategy) Init(beelzebubServiceConfiguration parser.Beelz
if command.Plugin == plugins.LLMPluginName {
llmModel, err := plugins.FromStringToLLMModel(beelzebubServiceConfiguration.Plugin.LLMModel)
llmProvider, err := plugins.FromStringToLLMProvider(beelzebubServiceConfiguration.Plugin.LLMProvider)
if err != nil {
log.Errorf("Error fromString: %s", err.Error())
log.Errorf("Error: %s", err.Error())
responseHTTPBody = "404 Not Found!"
}
@ -49,7 +49,8 @@ func (httpStrategy HTTPStrategy) Init(beelzebubServiceConfiguration parser.Beelz
OpenAIKey: beelzebubServiceConfiguration.Plugin.OpenAISecretKey,
Protocol: tracer.HTTP,
Host: beelzebubServiceConfiguration.Plugin.Host,
Model: llmModel,
Model: beelzebubServiceConfiguration.Plugin.LLMModel,
Provider: llmProvider,
CustomPrompt: beelzebubServiceConfiguration.Plugin.Prompt,
}