Merged
Conversation
thinking_forced_open (bool) replaced with generation_prompt (string) upstream in llama.cpp#20424 — carries actual prefill text instead of a narrow flag. Updated N-API bindings, examples, and integration tests.
There was a problem hiding this comment.
Pull request overview
This PR fixes issue b8589 by updating the API for chat output parsing to replace the thinkingForcedOpen parameter (boolean) with a generationPrompt parameter (string). This is a breaking API change that affects how the parseChatOutput method is called and how the formatChat result structure is defined.
Changes:
- Replace the
thinkingForcedOpenboolean parameter withgenerationPromptstring parameter inparseChatOutputoptions across test cases and example code - Update the C++ binding in
SessionContext.cppto parse and pass the newgenerationPromptstring parameter instead of the booleanthinkingForcedOpen - Update the
marshalFormatResultfunction to exposegenerationPromptas a string field from the underlying FormatResult object - Update type assertions and usage in test integration tests to expect the new parameter type
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/integration.ts | Updated test assertions and parseChatOutput calls to use generationPrompt: '' instead of thinkingForcedOpen: false, and updated the assertion to verify generationPrompt is a string |
| src/SessionContext.cpp | Updated C++ binding code to parse generationPrompt as a string parameter and pass it to the underlying lloyal::chat_out::parse function; updated the marshal function to expose generationPrompt from the FormatResult |
| examples/chat/chat.ts | Updated the example code to pass generationPrompt from the format result instead of thinkingForcedOpen |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.