-
Notifications
You must be signed in to change notification settings - Fork 303
[JS] Remove deprecated generate behavior. #3095
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
base: master
Are you sure you want to change the base?
[JS] Remove deprecated generate behavior. #3095
Conversation
Signed-off-by: Kirill Suvorov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes deprecated behavior from the JavaScript bindings where LLMPipeline.generate() could optionally return a string. Since version 2026.0.0, the method now consistently returns DecodedResults objects, requiring users to call toString() for string representations.
Key Changes:
- Removed the
return_decoded_resultsconfiguration option and related deprecation warnings - Updated all test cases to expect
DecodedResultsobjects instead of strings - Cleaned up type definitions to remove the deprecated config option
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/js/lib/pipelines/llmPipeline.ts | Removed conditional logic for return_decoded_results flag and deprecation warning |
| src/js/lib/utils.ts | Removed DecodedResultsConfig type definition and its usage in GenerationConfig |
| src/js/tests/module.test.js | Updated test assertions to expect DecodedResults objects and removed tests for deprecated string return behavior |
| src/js/tests/structuredOutput.test.js | Removed return_decoded_results: true from all test generation configs |
| src/js/eslint.config.cjs | Removed return_decoded_results from the allowed snake_case identifiers list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Are any changes necessary for |
Yes, changes will be needed after the release of the major version of OV and the update of the openvino-langchain to use it. Until then, it will work correctly. |
Description
Since version 2026.0.0, LLMPipeline.generate() returns DecodedResults by default.
To get a string representation, call the toString() method on DecodedResults.
CVS-176152
Checklist: