INNER CODE UNIT · Go
temp
sozercan/kubectl-ai · cmd/cli/completion.go:52
temp := float32(*temperature)
var prompt strings.Builder
// read from stdin
stat, _ := os.Stdin.Stat()
if (stat.Mode() & os.ModeCharDevice) == 0 {
stdin, err := io.ReadAll(os.Stdin)
if err != nil {
return "", err
}
fmt.Fprintf(&prompt, "Depending on the input, either edit or append to the input YAML. Do not generate new YAML without including the input YAML either original or edited.\nUse the following YAML as the input: \n%s\n", string(stdin))
}
for _, p := range prompts {
fmt.Fprintf(&prompt, "%s", p)
}
var resp string