-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The REST API supports sending file attachments alongside queries via two methods:
- URL-based attachments through the JSON query endpoint
- Direct file uploads through the multipart query endpoint
The SDK has no support for either method. Users must fall back to raw HTTP requests to use attachments.
Expected Behaviour
The SDK should expose a single unified interface for attachments that abstracts the two underlying endpoints. Users should not need to think about which HTTP method or endpoint to use.
- When the user provides URL-based attachments, the SDK sends a JSON request to the standard query endpoint
- When the user provides local files, the SDK sends a multipart request to the multipart endpoint
- When both are provided, the SDK handles the routing internally
This keeps the DX clean with one method instead of two.
Scope
- Extend the existing query method or add a single new method that handles both attachment types
- Client-side validation for file count (max 5) and size (max 10MB per file)
- Return the same QueryResponse type as the regular query
- Filters and model selection should work the same as regular queries
- Full type hints for attachment inputs
- Existing query behaviour without attachments must not change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels