GenkitG
Genkit•8mo ago
full-green

Hi, I want do simple chat in go-genkit,

Hi, I want do simple chat in go-genkit, simplified code
scanner := bufio.NewScanner(os.Stdin)

    for scanner.Scan() {
        input := scanner.Text()
        if input == "exit" {
            return nil
        }
        slog.Info("input", "input", input)
    }

Of couse this works.
But when I'm running it through genkit genkit start -- go run . it's blocking on scanner.Scan(). Is it possible to redirect stdin to my process? Or at least I think that's the issue
Was this page helpful?