diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-16 03:59:57 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-16 03:59:57 +0200 |
| commit | c40056f2102893c4c04aa2fa2380a4146d370e81 (patch) | |
| tree | b09795dcce9e172bfb24d38ac480b27e5eedbe98 /internal/llm | |
| parent | c578f367d81ce035c1f7b9c55e38101753e99de5 (diff) | |
Add doc comments to exported types and functions
Document ~30 exported types in lsp/types.go and exported functions in
llm/provider.go, lsp/server.go, and hexailsp/run.go.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/llm')
| -rw-r--r-- | internal/llm/provider.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/llm/provider.go b/internal/llm/provider.go index 847ea60..f3170ef 100644 --- a/internal/llm/provider.go +++ b/internal/llm/provider.go @@ -56,9 +56,16 @@ type Options struct { // RequestOption mutates Options. type RequestOption func(*Options) -func WithModel(model string) RequestOption { return func(o *Options) { o.Model = model } } +// WithModel sets the model name for a request. +func WithModel(model string) RequestOption { return func(o *Options) { o.Model = model } } + +// WithTemperature sets the sampling temperature for a request. func WithTemperature(t float64) RequestOption { return func(o *Options) { o.Temperature = t } } -func WithMaxTokens(n int) RequestOption { return func(o *Options) { o.MaxTokens = n } } + +// WithMaxTokens sets the maximum number of tokens to generate. +func WithMaxTokens(n int) RequestOption { return func(o *Options) { o.MaxTokens = n } } + +// WithStop sets custom stop sequences for a request. func WithStop(stop ...string) RequestOption { return func(o *Options) { o.Stop = append([]string{}, stop...) } } |
