Skip to content

Fix token budgeting#824

Merged
glahaye merged 2 commits intomicrosoft:mainfrom
glahaye:token_budget
Mar 1, 2024
Merged

Fix token budgeting#824
glahaye merged 2 commits intomicrosoft:mainfrom
glahaye:token_budget

Conversation

@glahaye
Copy link
Contributor

@glahaye glahaye commented Feb 29, 2024

Motivation and Context

OpenAI inserts a message under the hood for which we don't account, and thus throwing off our token budgeting. This causes us to sometimes send too many tokens when we approach a model's token limit. This results in errors.

Description

Account for the OpenAI message inserted in our requests.

Contribution Checklist

@github-actions github-actions bot added the webapi Pull requests that update .net code label Feb 29, 2024
@glahaye glahaye requested a review from teresaqhoang February 29, 2024 23:42
@glahaye glahaye added this pull request to the merge queue Mar 1, 2024
Merged via the queue into microsoft:main with commit e018f90 Mar 1, 2024
@glahaye glahaye deleted the token_budget branch March 1, 2024 00:04
glahaye added a commit that referenced this pull request Mar 1, 2024
### Motivation and Context
OpenAI inserts a message under the hood for which we don't account, and
thus throwing off our token budgeting. This causes us to sometimes send
too many tokens when we approach a model's token limit. This results in
errors.

### Description
Account for the OpenAI message inserted in our requests.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
alliscode pushed a commit that referenced this pull request Oct 4, 2024
### Motivation and Context
OpenAI inserts a message under the hood for which we don't account, and
thus throwing off our token budgeting. This causes us to sometimes send
too many tokens when we approach a model's token limit. This results in
errors.

### Description
Account for the OpenAI message inserted in our requests.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### Motivation and Context
OpenAI inserts a message under the hood for which we don't account, and
thus throwing off our token budgeting. This causes us to sometimes send
too many tokens when we approach a model's token limit. This results in
errors.

### Description
Account for the OpenAI message inserted in our requests.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
kb0039 pushed a commit to aaronba/chat-copilot that referenced this pull request Jan 8, 2025
### Motivation and Context
OpenAI inserts a message under the hood for which we don't account, and
thus throwing off our token budgeting. This causes us to sometimes send
too many tokens when we approach a model's token limit. This results in
errors.

### Description
Account for the OpenAI message inserted in our requests.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

webapi Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants