Feat: beelzebub cloud integrations (#117)

* improve beelzebub cloud integration

* refactoring cloud integration, fix unit test

* add unit test get honeypots

* improve code coverage
This commit is contained in:
Mario Candela
2024-08-01 20:05:05 +02:00
committed by GitHub
parent cd284877cf
commit a1e96738fb
12 changed files with 276 additions and 50 deletions

View File

@ -3,6 +3,7 @@ package plugins
import (
"encoding/json"
"errors"
"fmt"
"github.com/go-resty/resty/v2"
"github.com/mariocandela/beelzebub/v3/tracer"
@ -76,6 +77,17 @@ const (
GPT4O
)
func FromStringToLLMModel(llmModel string) (LLMModel, error) {
switch llmModel {
case "llama3":
return LLAMA3, nil
case "gpt4-o":
return GPT4O, nil
default:
return -1, fmt.Errorf("model %s not found", llmModel)
}
}
func InitLLMHoneypot(config LLMHoneypot) *LLMHoneypot {
// Inject the dependencies
config.client = resty.New()