Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

set tokens based on model #99

Merged
merged 7 commits into from
Mar 29, 2023
Merged

set tokens based on model #99

merged 7 commits into from
Mar 29, 2023

Conversation

harjotgill
Copy link
Contributor

@harjotgill harjotgill commented Mar 29, 2023

Summary by OpenAI

Release Notes:

  • New Feature: Users can now set maximum token limits for models, requests, and responses using the Bot and Options classes.

"Tokens set with ease,
Limits to put your mind at peace.
With this new feature,
Your API usage will be a pleasure."

@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2023

🤖 OpenAI

Thank you for letting me participate in the code review.

The pull request titled "set tokens correctly" adds new options to the Bot class and new properties to the Options class. These changes allow users to set maximum token limits for models, requests, and responses. The values of these limits are calculated based on the openai_model property.

Here is a summary of the changes made in each file:

File Summary
src/bot.ts Adds two new options to the Bot class: maxModelTokens and maxResponseTokens.
src/options.ts Adds three new properties to the Options class: max_model_tokens, max_tokens_for_request, and max_tokens_for_response. Calculates these values based on the openai_model property.

Overall, this pull request adds useful functionality to the Bot and Options classes by allowing users to set token limits for various aspects of the API.


Chat with 🤖 OpenAI Bot (@openai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

Files ignored due to filter (1)

Ignored files

  • dist/index.js

@coderabbitai coderabbitai deleted a comment from github-actions bot Mar 29, 2023
@coderabbitai coderabbitai deleted a comment from github-actions bot Mar 29, 2023
@coderabbitai coderabbitai deleted a comment from github-actions bot Mar 29, 2023
@coderabbitai coderabbitai deleted a comment from github-actions bot Mar 29, 2023
@coderabbitai coderabbitai deleted a comment from github-actions bot Mar 29, 2023
@harjotgill harjotgill changed the title set tokens correctly set tokens based on model Mar 29, 2023
@harjotgill harjotgill merged commit 70069ea into main Mar 29, 2023
@harjotgill harjotgill deleted the tokens branch March 29, 2023 02:38
shoyuf pushed a commit to maybeLab/openai-mr-reviewer-gltlab that referenced this pull request Jun 25, 2023
<!-- This is an auto-generated comment: release notes by openai -->
### Summary by OpenAI

Release Notes:

- New Feature: Users can now set maximum token limits for models,
requests, and responses using the `Bot` and `Options` classes.

> "Tokens set with ease,
> Limits to put your mind at peace.
> With this new feature,
> Your API usage will be a pleasure."
<!-- end of auto-generated comment: release notes by openai -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant