-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
27 lines (23 loc) · 725 Bytes
/
main.go
File metadata and controls
27 lines (23 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"log"
"github.com/alecthomas/kong"
kongyaml "github.com/alecthomas/kong-yaml"
"github.com/elek/rai/cmd"
"github.com/elek/rai/console"
)
type CLI struct {
Ask cmd.Ask `cmd:"" help:"Ask a question to a model."`
Do cmd.Do `cmd:"" help:"Run a command with custom prompts."`
Run console.Run `cmd:"" help:"Run an interactive conversation with a model."`
Models cmd.Models `cmd:"" help:"Models available models"`
Acp cmd.Acp `cmd:"" help:"Start ACP (Agent Client Protocol) server."`
}
func main() {
var cli CLI
ktx := kong.Parse(&cli, kong.Configuration(kongyaml.Loader, "~/.config/rai/config.yaml"))
err := ktx.Run()
if err != nil {
log.Fatalf("%++v", err)
}
}