wrapContextErr namespaces an adapter error under the subcommand.
(sub, out string, err error)
| 376 | |
| 377 | // wrapContextErr namespaces an adapter error under the subcommand. |
| 378 | func wrapContextErr(sub, out string, err error) (string, error) { |
| 379 | if err != nil { |
| 380 | return "", fmt.Errorf("@context %s: %w", sub, err) |
| 381 | } |
| 382 | return out, nil |
| 383 | } |
| 384 | |
| 385 | // contextRagTopK reads the rag flag, which the model may send as a bool |
| 386 | // (true → default top-K, encoded here as -1 meaning "mode default on") or an |
no test coverage detected