Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llama-cpp-bindings-sys/wrapper_chat_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ extern "C" auto llama_rs_chat_session_read(
reading->generation_prompt_length = generation_prompt_length;
reading->context.input = std::move(parse_input.text);
reading->context.tokens = std::move(parse_input.tokens);
reading->context.flags = is_partial ? COMMON_PEG_PARSE_FLAG_LENIENT : COMMON_PEG_PARSE_FLAG_COMPLETE;
reading->context.flags = is_partial ? COMMON_PEG_PARSE_FLAG_LENIENT
: COMMON_PEG_PARSE_FLAG_LENIENT | COMMON_PEG_PARSE_FLAG_COMPLETE;

reading->result = session->session->parser().parse(reading->context);
reading->matches_format = is_partial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn visible_text_in(outcomes: &[IngestOutcome], section: SampledTokenSection) ->
n_batch = 128,
n_ubatch = 64,
)]
fn an_answer_stopped_inside_unclosed_reasoning_releases_its_unsettled_tail_as_content(
fn an_answer_stopped_inside_unclosed_reasoning_releases_its_unsettled_tail_as_reasoning(
fixture: &LlamaFixture<'_>,
) -> Result<()> {
const SETTLED_REASONING: &str = "Let me think";
Expand All @@ -90,8 +90,8 @@ fn an_answer_stopped_inside_unclosed_reasoning_releases_its_unsettled_tail_as_co
visible_text_in(&outcomes, SampledTokenSection::Pending),
],
[
SETTLED_REASONING.to_owned(),
UNSETTLED_TAIL.to_owned(),
format!("{SETTLED_REASONING}{UNSETTLED_TAIL}"),
String::new(),
String::new(),
String::new()
]
Expand Down
Loading