Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: docs(dotnet): supply maxTokens to avoid response truncation #2249

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

sgoings
Copy link
Contributor

@sgoings sgoings commented Jul 31, 2023

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, which is far too low for these examples and led to truncated output and failing prompt chaining examples.

  1. What problem does it solve?

This makes the README.md examples work again.

  1. What scenario does it contribute to?

Onboarding/experimentation.

  1. If it fixes an open issue, please link to the issue here.

@sgoings sgoings requested a review from a team as a code owner July 31, 2023 22:14
@shawncal shawncal added docs and tests Improvements or additions to documentation .NET Issue or Pull requests regarding .NET code labels Jul 31, 2023
@shawncal shawncal changed the title docs(dotnet): supply maxTokens to avoid response truncation .Net: docs(dotnet): supply maxTokens to avoid response truncation Jul 31, 2023
@shawncal shawncal added this pull request to the merge queue Aug 21, 2023
Merged via the queue into microsoft:main with commit 781b75d Aug 21, 2023
15 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs and tests Improvements or additions to documentation .NET Issue or Pull requests regarding .NET code
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants