fix(ai): wire configured max_tokens and temperature onto requests#207
Open
ramnnn2006 wants to merge 1 commit into
Open
fix(ai): wire configured max_tokens and temperature onto requests#207ramnnn2006 wants to merge 1 commit into
ramnnn2006 wants to merge 1 commit into
Conversation
|
🚀 First PR — welcome aboard! A few things to expect:
If you get stuck, reply here or jump to Discussions. We want this PR to land. |
DefaultAnalyzer.Analyze built the CompletionRequest without MaxTokens or Temperature, so the documented request-level fields never carried through the only real caller. It happened to work because each provider falls back to its own default, but anyone relying on the per-request values had them silently dropped. Thread the configured values through AnalyzerConfig onto the request so the request-level fields are honored, with consistent precedence: configured values ride the request, and a zero value leaves the provider default intact. Fixes optiqor#120 Signed-off-by: ramnnn2006 <phrkvvp@gmail.com>
4fea552 to
532e8ce
Compare
Contributor
Author
|
my badd, just looked into it and fixed the gofmt formatting issue as it wasn't pushed to the fork repo while creating this pr. |
Contributor
Author
|
@btwshivam hi , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DefaultAnalyzer.Analyzebuilt theCompletionRequestwithoutMaxTokensorTemperature, so the documented request-level fields never carried through the only real caller. anyone relying on per-request values had them silently dropped.Why
Fixes #120
How
added
MaxTokensandTemperaturetoAnalyzerConfigandDefaultAnalyzer, set them on the request inAnalyze, andbuildAnalyzerindoctor.gopasses the configured values through. zero stays zero so providers keep their own fallback intact.Testing
go build ./...passesgo test ./...passesgo vet ./...passesgolangci-lint run ./...passesTested locally with:
N/A - pure docs/refactor
Checklist
feat(scope): subject)git commit -s)