Mitar
Mitar
> I now only process grammars if OLLAMA_GRAMMAR set to "true". That way custom grammar is opt-in for people okay with it's trade offs. I do not get why would...
Personally, I think only thing which should be done is https://gitlab.com/peerdb/ollama/-/commit/f1f7b7ea0cc1c582fdb122b69646fc1b5661c9c8 (+ documentation update). This adds little code to maintain to ollama and its simplicity I think is better than...
> I assume are objections that were concerns. But those objections you assume were never stated.
> Is [FileContentFlag](https://github.com/alecthomas/kong/blob/30e84613fe34bbc57e9421303b14af459d845f74/mapper.go#L897) what you want? No. I would want something like: ``` Secret string `env:"SECRET" file:"secret.txt" help:"Secret to use." required:""` ``` And then if `SECRET` environment variable is present,...
I tend to agree. :-) I realized that supporting secrets in env variables is common but not really a good practice (especially because they can be inherited by child processes)....
I made some benchmarks here: https://jsbench.me/mrkgvc8amp/1
And with binary data: https://jsbench.me/pokgvl6gsb/1
Shameless plug: you can also switch it to drop-in replacement [`gitlab.com/tozd/go/errors`](https://gitlab.com/tozd/go/errors). It fixes [many issues](https://gitlab.com/tozd/go/errors#why-a-new-go-errors-package), is maintained, and supports modern Go's error patterns (sentinel errors, `%w` formating, joined errors, etc.).
That is hard to do if you want stack traces with errors, for example. But otherwise yes, standard errors package now is pretty useful on its own as well.
The library should probably export sentinel errors so that callers can use `errors.Is` or `errors.As` to determine where the error is coming from.