Enha: pw agent

This commit is contained in:
Grail Finder
2026-03-09 08:50:33 +03:00
parent 94769225cf
commit c2c90f6d2b
5 changed files with 536 additions and 10 deletions

View File

@@ -17,8 +17,8 @@ func NewWebAgentB(client *AgentClient, sysprompt string) *WebAgentB {
// Process applies the formatting function to raw output
func (a *WebAgentB) Process(args map[string]string, rawOutput []byte) []byte {
msg, err := a.FormMsg(a.sysprompt,
fmt.Sprintf("request:\n%+v\ntool response:\n%v", args, string(rawOutput)))
msg, err := a.FormMsg(
fmt.Sprintf("%s\n\nrequest:\n%+v\ntool response:\n%v", a.sysprompt, args, string(rawOutput)))
if err != nil {
a.Log().Error("failed to process the request", "error", err)
return []byte("failed to process the request; err: " + err.Error())