RDBC-1068 Hotfix: C# parity fixes for AI config & spatial RQL#299
Merged
Conversation
Overlap tokens are only consumed by the two paragraph chunking methods (PlainTextSplitParagraphs, MarkDownSplitParagraphs) on the server. The Python set wrongly allowed PlainTextSplit/PlainTextSplitLines (silently ignored by the server) and omitted MarkDownSplitParagraphs (spurious client-side rejection of a valid config). Also makes the validation message derive from the set so it can't drift again.
- ChunkingOptions.from_json: default MaxTokensPerChunk/OverlapTokens to 512/0 (matching C#'s non-nullable int initializers) instead of None, which crashed validate() with a TypeError on missing keys. - EmbeddingsGenerationConfiguration.validate: drop the spurious 'cannot specify both paths and transformation' rejection (C# allows both), and add the per-path ChunkingOptions validation loop C# performs. - OrderByToken.create_distance_ascending_wkt: emit spatial.distance(field, spatial.wkt(...)) instead of the malformed spatial.distance(field), spatial.wkt(...) (stray paren). Each fix has a regression test that fails on the pre-fix code.
_order_by_distance_wkt / _order_by_distance_descending_wkt passed the raw WKT string straight in as the parameter *name*, producing spatial.wkt($POINT(...)) which the server rejects at parse time. Register it via add_query_parameter first, matching C# (AbstractDocumentQuery.Spatial). This is the calling-side half of the WKT distance bug (the token-side stray paren was fixed in the previous commit). Adds DB-facing regression tests (embedded server): - spatial: order_by_distance_wkt ascending + descending (fail pre-fix: server 500 parse error). - embeddings: a config with BOTH paths and a transformation is accepted by the server, confirming the dropped client-side mutual-exclusivity rule.
2 tasks
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.
Issue
https://issues.hibernatingrhinos.com/issue/RDBC-1068
What changed
Small client/server parity hotfixes found auditing the 7.2.3 sync: ChunkingOptions overlap-method set & deserialization defaults, embeddings-config validation, and WKT
order_by_distanceRQL. Regression tests included.Checklist