-
Notifications
You must be signed in to change notification settings - Fork 168
[openvino-langchain] Use applyChatTemplate in ChatOpenVINO #990
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
[openvino-langchain] Use applyChatTemplate in ChatOpenVINO #990
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 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
applyChatTemplateAPI call - Adds
return_decoded_resultsflag 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.
Co-authored-by: Copilot <[email protected]>
| role: m.getType(), | ||
| content: m.text, | ||
| })), | ||
| false, |
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.
Why is the add_generation_prompt false?
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.
Thanks, I fixed it.
almilosz
left a comment
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.
Awsome
Details:
Tickets:
CVS-172173