Skip to content

Conversation

@Retribution98
Copy link
Contributor

@Retribution98 Retribution98 commented Dec 3, 2025

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:

  • Tests have been updated or added to cover the new code.
  • This patch fully addresses the ticket.
  • I have made corresponding changes to the documentation.

Copilot AI review requested due to automatic review settings December 3, 2025 17:13
@github-actions github-actions bot added the category: JS API GenAI JS API label Dec 3, 2025
Copy link
Contributor

Copilot AI left a 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_results configuration option and related deprecation warnings
  • Updated all test cases to expect DecodedResults objects 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.

Copilot AI review requested due to automatic review settings December 4, 2025 09:16
Copy link
Contributor

Copilot AI left a 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.

@almilosz
Copy link
Contributor

almilosz commented Dec 5, 2025

Are any changes necessary for openvino-langchain?

@Retribution98
Copy link
Contributor Author

Are any changes necessary for openvino-langchain?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: JS API GenAI JS API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants