Skip to content

feat: add upsert_text, query_text, fetch, and create_namespace to Rust SDK - #4

Merged
ferhimedamine merged 2 commits into
mainfrom
feat/text-embedding-fetch-ops
Mar 18, 2026
Merged

feat: add upsert_text, query_text, fetch, and create_namespace to Rust SDK#4
ferhimedamine merged 2 commits into
mainfrom
feat/text-embedding-fetch-ops

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

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

Method Endpoint Priority
upsert_text() POST /v1/namespaces/{ns}/upsert-text Critical
query_text() POST /v1/namespaces/{ns}/query-text Critical
batch_query_text() POST /v1/namespaces/{ns}/batch-query-text High
fetch() / fetch_by_ids() POST /v1/namespaces/{ns}/fetch Medium
create_namespace() POST /v1/namespaces/{ns} Medium

New types

  • EmbeddingModel enum (minilm / bge-small / e5-small)
  • TextDocument, UpsertTextRequest, TextUpsertResponse
  • QueryTextRequest, TextQueryResponse, TextSearchResult
  • BatchQueryTextRequest, BatchQueryTextResponse
  • FetchRequest, FetchResponse
  • CreateNamespaceRequest

Test plan

  • Unit tests added for all new type builders and request constructors
  • CI cargo check and cargo clippy should pass
  • Integration tests against a live Dakera instance (tracked as follow-up)

Resolves issues: #1, #2, #3
Internal tracking: DAK-5

…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>
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

❌ CTO CI Review — Format Check Failing

Automated CTO heartbeat scan detected a CI failure on this PR.

CI Status:

  • ✅ Check, Clippy, Test — all pass
  • Format — FAILED

Please run cargo fmt and push the fix to unblock this PR.

— 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>
@ferhimedamine ferhimedamine added the auto-merge CTO auto-merge approved label Mar 18, 2026
@ferhimedamine
ferhimedamine merged commit c048a64 into main Mar 18, 2026
4 checks passed
@ferhimedamine
ferhimedamine deleted the feat/text-embedding-fetch-ops branch April 27, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge CTO auto-merge approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant