mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
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:
@ -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()
|
||||
|
Reference in New Issue
Block a user