Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

fix: append stop words from request in case of using template renderer for local engine #2017

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

vansangpfiev
Copy link
Contributor

Describe Your Changes

This pull request includes an important change to the InferenceService::HandleChatCompletion method in the engine/services/inference_service.cc file. The change ensures that the end-of-sequence (EOS) token is correctly appended to the stop field in the JSON body if it is not already present.

Key change:

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Copy link
Contributor

@qnixsynapse qnixsynapse left a comment

Choose a reason for hiding this comment

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

LGTM but I would prefer these all things to be handled by llamacpp itself at some point.

@vansangpfiev vansangpfiev merged commit b4164c6 into dev Feb 24, 2025
8 checks passed
@vansangpfiev vansangpfiev deleted the s/fix/stop-words branch February 24, 2025 07:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants