Repository navigation
.Net: Added an example to show how to limit token usage with filters - #9451
Merged
Dmytro Struk (dmytrostruk) merged 9 commits intoNov 1, 2024
Merged
Dmytro Struk (dmytrostruk) merged 9 commits into
Dmytro Struk (dmytrostruk) merged 9 commits into
Conversation
Dmytro Struk (dmytrostruk)
had a problem deploying
to
integration
October 28, 2024 23:48 — with
GitHub Actions
Error
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
October 28, 2024 23:51 — with
GitHub Actions
Inactive
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
October 29, 2024 15:04 — with
GitHub Actions
Inactive
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
October 29, 2024 21:20 — with
GitHub Actions
Inactive
westey (westey-m)
approved these changes
Oct 31, 2024
Dmytro Struk (dmytrostruk)
had a problem deploying
to
integration
October 31, 2024 16:38 — with
GitHub Actions
Error
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
October 31, 2024 16:46 — with
GitHub Actions
Inactive
This reverts commit 17cb497.
Dmytro Struk (dmytrostruk)
had a problem deploying
to
integration
October 31, 2024 18:00 — with
GitHub Actions
Error
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
October 31, 2024 18:01 — with
GitHub Actions
Inactive
Dmytro Struk (dmytrostruk)
temporarily deployed
to
integration
November 1, 2024 18:51 — with
GitHub Actions
Inactive
Mark Wallace (markwallace-microsoft)
approved these changes
Nov 1, 2024
This branch was previously deployed
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
Resolves: #5145
Property
OpenAIPromptExecutionSettings.MaxTokensallows specifying maximum number of tokens to generate in one response. In Semantic Kernel, auto function calling may perform multiple requests to AI model, but with the same max tokens value. For example, in case whenmax tokens = 50, and 3 functions are expected to be called with 3 separate requests to AI model, each request will havemax tokens = 50, which in total will result in more tokens used. This example shows how to limit token usage withOpenAIPromptExecutionSettings.MaxTokensproperty and filter for all requests in the same auto function calling process.Contribution Checklist