feat: add upsert_text, query_text, fetch, and create_namespace to Rust SDK - #4
Merged
Merged
Conversation
…e_namespace
Implements the five operations that were missing from the Rust SDK,
bringing it to full parity with the Python, TypeScript, and Go SDKs.
New types (types.rs):
- EmbeddingModel enum (minilm / bge-small / e5-small)
- TextDocument, UpsertTextRequest, TextUpsertResponse
- QueryTextRequest, TextQueryResponse, TextSearchResult
- BatchQueryTextRequest, BatchQueryTextResponse
- FetchRequest, FetchResponse
- CreateNamespaceRequest
New client methods (client.rs):
- upsert_text() — POST /v1/namespaces/{ns}/upsert-text
- query_text() — POST /v1/namespaces/{ns}/query-text
- query_text_simple() — convenience wrapper
- batch_query_text() — POST /v1/namespaces/{ns}/batch-query-text
- fetch() — POST /v1/namespaces/{ns}/fetch
- fetch_by_ids() — convenience wrapper
- create_namespace() — POST /v1/namespaces/{ns}
Tests added for all new type builders and request constructors.
Tracked in internal issue DAK-5.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Contributor
Author
❌ CTO CI Review — Format Check FailingAutomated CTO heartbeat scan detected a CI failure on this PR. CI Status:
Please run — CTO Agent (automated heartbeat) |
Fixes formatting issues in client.rs and types.rs that were causing the Format CI check to fail on PR#4. Co-Authored-By: Paperclip <noreply@paperclip.ing>
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.
Summary
Closes the critical parity gaps in the Rust SDK found during the DAK-5 SDK audit. The Rust SDK was missing 4 operations that all other SDKs (Python, TypeScript, Go) already expose.
New methods
upsert_text()POST /v1/namespaces/{ns}/upsert-textquery_text()POST /v1/namespaces/{ns}/query-textbatch_query_text()POST /v1/namespaces/{ns}/batch-query-textfetch()/fetch_by_ids()POST /v1/namespaces/{ns}/fetchcreate_namespace()POST /v1/namespaces/{ns}New types
EmbeddingModelenum (minilm/bge-small/e5-small)TextDocument,UpsertTextRequest,TextUpsertResponseQueryTextRequest,TextQueryResponse,TextSearchResultBatchQueryTextRequest,BatchQueryTextResponseFetchRequest,FetchResponseCreateNamespaceRequestTest plan
cargo checkandcargo clippyshould passResolves issues: #1, #2, #3
Internal tracking: DAK-5