refactor (ai): remove obsolete handling of temperature when it is undefined#5769
Closed
refactor (ai): remove obsolete handling of temperature when it is undefined#5769
temperature when it is undefined#5769Conversation
lgrammel
reviewed
Apr 15, 2025
Collaborator
|
Please add a changeset. |
Collaborator
|
Is that all that is needed to remove the default temperature? |
Collaborator
Author
lgrammel
reviewed
Apr 16, 2025
Collaborator
|
The main setting that defaults temp to |
…middleware/default-settings-middleware.test.ts
gr2m
commented
Apr 16, 2025
Comment on lines
+44
to
+56
| it('should default temparature to undefined', async () => { | ||
| const middleware = defaultSettingsMiddleware({ | ||
| settings: {}, | ||
| }); | ||
|
|
||
| const result = await middleware.transformParams!({ | ||
| type: 'generate', | ||
| params: BASE_PARAMS, | ||
| }); | ||
|
|
||
| expect(result.temperature).toBeUndefined(); | ||
| }); | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
I think we can remove this test, I added another one to packages/ai/core/prompt/prepare-call-settings.test.ts
Suggested change
| it('should default temparature to undefined', async () => { | |
| const middleware = defaultSettingsMiddleware({ | |
| settings: {}, | |
| }); | |
| const result = await middleware.transformParams!({ | |
| type: 'generate', | |
| params: BASE_PARAMS, | |
| }); | |
| expect(result.temperature).toBeUndefined(); | |
| }); |
Collaborator
Author
Collaborator
|
Before merging, I want to think about it more. The alternative would have been to default to |
Collaborator
|
Preferring #5890 because |
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.
Background
towards #5765
Summary
temperaturenow defaults toundefined, so the special handling is no longer necessary - at least that's my assumption given that tests pass. Please verify before merging.Tasks
Docs have been added / updated (for bug fixes / features)pnpm prettier-fixto fix any formatting issues