llm mail integration
This commit is contained in:
38
cmd/agenttest/main.go
Normal file
38
cmd/agenttest/main.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"my-brain-importer/internal/agents"
|
||||
"my-brain-importer/internal/agents/task"
|
||||
"my-brain-importer/internal/agents/tool/email"
|
||||
"my-brain-importer/internal/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
config.LoadConfig()
|
||||
|
||||
fmt.Println("=== Task-Agent Test ===")
|
||||
a := task.New()
|
||||
|
||||
r := a.Handle(agents.Request{Action: agents.ActionAdd, Args: []string{"Synology DSM Update durchfuehren"}})
|
||||
fmt.Println("ADD:", r.Text)
|
||||
|
||||
r = a.Handle(agents.Request{Action: agents.ActionAdd, Args: []string{"Zahnarzt Termin bestaetigen"}})
|
||||
fmt.Println("ADD:", r.Text)
|
||||
|
||||
r = a.Handle(agents.Request{Action: agents.ActionList})
|
||||
fmt.Println("\nLIST:\n" + r.Text)
|
||||
|
||||
fmt.Println("\n=== Email-Agent Test mit Testdaten ===")
|
||||
testMails := []email.Message{
|
||||
{Subject: "KRITISCH: Synology Update verfuegbar", From: "noreply@synology.com", Date: "2026-03-19 14:09"},
|
||||
{Subject: "Rechnung Maerz 2026", From: "buchhaltung@strom.de", Date: "2026-03-18 09:00"},
|
||||
{Subject: "Newsletter GoLang Weekly", From: "newsletter@golangweekly.com", Date: "2026-03-17 18:00"},
|
||||
}
|
||||
result, err := email.SummarizeMessages(testMails, "Fasse zusammen und priorisiere nach Dringlichkeit.")
|
||||
if err != nil {
|
||||
fmt.Println("LLM-Fehler:", err)
|
||||
} else {
|
||||
fmt.Println(result)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user