• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kshard / thinker / 15083532464

17 May 2025 08:42AM UTC coverage: 33.807% (-24.4%) from 58.222%
15083532464

Pull #20

github

fogfish
update license
Pull Request #20: establish agent taxonomy - prompter, manifold, automata

241 of 612 new or added lines in 28 files covered. (39.38%)

144 existing lines in 5 files now uncovered.

381 of 1127 relevant lines covered (33.81%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/command/return.go
1
//
2
// Copyright (C) 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/kshard/thinker
7
//
8

9
package command
10

11
import (
12
        "encoding/json"
13

14
        "github.com/kshard/thinker"
15
)
16

17
// A unique name for return command
18
const RETURN = "return"
19

20
// Creates new return command, instructing LLM return results
NEW
21
func Return() thinker.Cmd {
×
NEW
22
        return thinker.Cmd{
×
NEW
23
                Cmd:   RETURN,
×
NEW
24
                About: "indicate that workflow is completed and returns the expected result.",
×
NEW
25
                Args: []thinker.Arg{
×
NEW
26
                        {
×
NEW
27
                                Name:  "value",
×
NEW
28
                                Type:  "string",
×
NEW
29
                                About: `value to return as the workflow completion`,
×
NEW
30
                        },
×
NEW
31
                },
×
NEW
32
                Run: func(in json.RawMessage) ([]byte, error) {
×
NEW
33
                        var reply replyReturn
×
NEW
34
                        if err := json.Unmarshal(in, &reply); err != nil {
×
NEW
35
                                return nil, err
×
NEW
36
                        }
×
37

NEW
38
                        return []byte(reply.Value), nil
×
39
                },
40
        }
41
}
42

43
type replyReturn struct {
44
        Value string `json:"value,omitempty"`
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc