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

feat(sdks/ts): Add adaptive context options to the SDK #404

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Jun 27, 2024

Closes #402

Signed-off-by: Diwank Tomer diwank@julep.ai


🚀 This description was created by Ellipsis for commit 863dc52

Summary:

Added adaptive context options (tokenBudget and contextOverflow) to session management in the SDK and introduced validation using typia.

Key points:

  • Added tokenBudget and contextOverflow properties to CreateSessionPayload in sdks/ts/src/managers/session.ts.
  • Updated SessionsManager class in sdks/ts/src/managers/session.ts to handle new properties.
  • Introduced check.ts in sdks/ts/src for validation using typia.
  • Updated package.json to version 0.3.7 and added typia and ts-patch dependencies.
  • Removed extensive content from docs/js-sdk-docs/README.md.
  • Updated documentation links to reflect new commit hash.

Generated with ❤️ by ellipsis.dev

Diwank Tomer and others added 2 commits June 27, 2024 16:24
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 863dc52 in 1 minute and 38 seconds

More details
  • Looked at 2483 lines of code in 25 files
  • Skipped 2 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. sdks/ts/src/managers/session.ts:45
  • Draft comment:
    The implementation of the create method in SessionsManager correctly handles the new tokenBudget and contextOverflow properties. It includes validation for UUIDs and cleans up the request body by removing undefined properties before sending it to the API. This ensures efficient and error-free data handling.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR introduces new session management features, specifically handling token budgets and context overflow strategies ('truncate' or 'adaptive'). These are defined in the CreateSessionPayload interface and used in the create and update methods of SessionsManager. The implementation includes validation checks for UUIDs and removes undefined properties from the request body before sending it to the API, which is a good practice for clean and efficient data handling.
2. sdks/ts/src/managers/session.ts:106
  • Draft comment:
    The update method in SessionsManager is correctly implemented to handle the new tokenBudget and contextOverflow properties. It includes validation for UUIDs and cleans up the request body by removing undefined properties before sending it to the API. This ensures efficient and error-free data handling.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR introduces new session management features, specifically handling token budgets and context overflow strategies ('truncate' or 'adaptive'). These are defined in the CreateSessionPayload interface and used in the create and update methods of SessionsManager. The implementation includes validation checks for UUIDs and removes undefined properties from the request body before sending it to the API, which is a good practice for clean and efficient data handling.

Workflow ID: wflow_w8MQk7bF1Sq32J99


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@creatorrr creatorrr merged commit 14c08d9 into dev Jun 28, 2024
6 checks passed
@creatorrr creatorrr deleted the f/ts-sdk-adaptive-ctx branch June 28, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adaptive context flag is missing in the SDKs
1 participant