Skip to content

.Net Show how to limit total token usage using filters when using function calling #5145

Closed

Description

Describe the bug
A clear and concise description of what the bug is.

User specify MaxTokens in prompt execution settings, which is passed to IChatCompletionService.
OpenAI with enabled auto invoke function may do many request to api, but always is passed same MaxToken value.
So at the end service can use more tokens totally than user specified.

Expected behavior
A clear and concise description of what you expected to happen.

Decrease MaxTokens by used tokens value after each iteration in ChatCompletionService.

Platform

  • Language: C#

Activity

  1. changed the title [-].Net MaxTokens in OpenAI function calling[/-] [+].Net Show how to set max tokens in OpenAI function calling with filters[/+] on Jun 7, 2024
  2. changed the title [-].Net Show how to set max tokens in OpenAI function calling with filters[/-] [+].Net Show how to limit total token usage using filters when using function calling[/+] on Aug 30, 2024
  3. moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernelon Oct 28, 2024
  4. moved this from Sprint: In Review to Sprint: Done in Semantic Kernelon Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codeIgniteFeatures planned for next Ignite conference

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions