.Net: docs(dotnet): supply maxTokens to avoid response truncation#2249
Merged
shawncal merged 2 commits intomicrosoft:mainfrom Aug 21, 2023
Merged
.Net: docs(dotnet): supply maxTokens to avoid response truncation#2249shawncal merged 2 commits intomicrosoft:mainfrom
shawncal merged 2 commits intomicrosoft:mainfrom
Conversation
shawncal
approved these changes
Aug 21, 2023
SOE-YoungS
pushed a commit
to SOE-YoungS/semantic-kernel
that referenced
this pull request
Nov 1, 2023
…crosoft#2249) ### Motivation and Context 1. Why is this change required? When working through the examples in the dotnet/README.md file, I noticed that [OpenAI sets the max_tokens to 16](https://platform.openai.com/docs/api-reference/completions/create), which is far too low for these examples and led to truncated output and failing prompt chaining examples. 3. What problem does it solve? This makes the README.md examples work again. 5. What scenario does it contribute to? Onboarding/experimentation. 8. If it fixes an open issue, please link to the issue here. - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
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.
Motivation and Context
When working through the examples in the dotnet/README.md file, I noticed that OpenAI sets the max_tokens to 16, which is far too low for these examples and led to truncated output and failing prompt chaining examples.
This makes the README.md examples work again.
Onboarding/experimentation.