Conversation
A new `dedup` field on `MergedVec<T>` removes duplicate items after
merging, using order-preserving dedup.
The flag accepts `true`, `false`, or `"inherit"`. Omitting the field (or
using `"inherit"`) means "no opinion" — the flag propagates from the
previous merge in the chain. Once any config in the chain enables it,
all subsequent merges deduplicate unless a later config explicitly sets
it to `false`.
`conversation.attachments` now defaults to `dedup = true`, preventing
the same attachment from appearing more than once when multiple config
layers are merged. To opt out:
[conversation.attachments]
dedup = false
Several related fixes are also included: `FillDefaults` now propagates
correctly for `system_prompt_sections`, `instructions`, `attachments`,
and `PartialReasoningConfig`; `is_empty()` on `MergeableVec` and
`MergeableMap` now accounts for metadata so a `Merged` with no items but
active flags is no longer treated as empty; and `vec_dedup` is now
order-preserving instead of sorting before deduplicating.
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
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.
A new
dedupfield onMergedVec<T>removes duplicate items after merging, using order-preserving dedup.The flag accepts
true,false, or"inherit". Omitting the field (or using"inherit") means "no opinion" — the flag propagates from the previous merge in the chain. Once any config in the chain enables it, all subsequent merges deduplicate unless a later config explicitly sets it tofalse.conversation.attachmentsnow defaults todedup = true, preventing the same attachment from appearing more than once when multiple config layers are merged. To opt out:Several related fixes are also included:
FillDefaultsnow propagates correctly forsystem_prompt_sections,instructions,attachments, andPartialReasoningConfig;is_empty()onMergeableVecandMergeableMapnow accounts for metadata so aMergedwith no items but active flags is no longer treated as empty; andvec_dedupis now order-preserving instead of sorting before deduplicating.