Add LLM interface

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-11 22:33:12 +01:00
parent 307ca48394
commit 158c36d9ab
22 changed files with 2822 additions and 91 deletions

View File

@@ -15,27 +15,17 @@
package agents
import (
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/llm"
)
type (
Agent struct {
l *log.Logger
cfg Config
client *openai.Client
}
Config struct {
OpenAIAPIKey string
Temperature float64
ModelName string
}
)
func NewAgent(l *log.Logger, cfg Config) *Agent {
client := openai.NewClient(option.WithAPIKey(cfg.OpenAIAPIKey))
return &Agent{l: l, cfg: cfg, client: &client}
type Agent struct {
l *log.Logger
client *llm.Client
model string
temp float64
}
func NewAgent(l *log.Logger, client *llm.Client, model string, temp float64) *Agent {
return &Agent{l: l, client: client, model: model, temp: temp}
}