Skip to content

Conversation

@Retribution98
Copy link
Contributor

Details:

  • Use applyChatTemplate to convert messages
  • Update LLMPipeline.generate to use DecodedResults and avoid a warning
  • Fix row lengths

Tickets:

CVS-172173

@Retribution98 Retribution98 requested a review from a team as a code owner August 21, 2025 13:19
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 updates the OpenVINO-LangChain integration to use the applyChatTemplate method for converting messages in the ChatOpenVINO class, improving compatibility with the underlying tokenizer. The changes also address warnings and fix formatting issues.

  • Replaces manual message conversion with applyChatTemplate API call
  • Adds return_decoded_results flag to avoid type warnings in generation options
  • Fixes line length formatting in error message

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
chat_models.ts Implements applyChatTemplate for message conversion and adds decoded results flag
llms.ts Adds return_decoded_results flag to generation options
embeddings.ts Splits long error message across multiple lines for better formatting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

role: m.getType(),
content: m.text,
})),
false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the add_generation_prompt false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I fixed it.

Copy link
Contributor

@almilosz almilosz left a comment

Choose a reason for hiding this comment

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

Awsome

@Retribution98 Retribution98 merged commit 1d8c321 into openvinotoolkit:master Sep 4, 2025
10 of 12 checks passed
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.

3 participants