MCPcopy
hub / github.com/mudler/LocalAGI / Run

Function Run

example/custom_actions/hello.go:11–22  ·  view source on GitHub ↗
(config map[string]interface{})

Source from the content-addressed store, hash-verified

9}
10
11func Run(config map[string]interface{}) (string, map[string]interface{}, error) {
12 p := Params{}
13 b, err := json.Marshal(config)
14 if err != nil {
15 return "", map[string]interface{}{}, err
16 }
17 if err := json.Unmarshal(b, &p); err != nil {
18 return "", map[string]interface{}{}, err
19 }
20
21 return "Hello, " + p.Message + "!", map[string]interface{}{}, nil
22}
23
24func Description() string {
25 return "Send a message to the user"

Callers

nothing calls this directly

Calls 1

UnmarshalMethod · 0.80

Tested by

no test coverage detected