mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
Lower chunk transition point
This commit is contained in:
parent
fbedbb3eab
commit
6495c9b78d
2 changed files with 4 additions and 3 deletions
|
|
@ -858,7 +858,7 @@ Internally, the SDK detects document size and switches strategy:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class Library:
|
class Library:
|
||||||
CHUNKED_UPLOAD_THRESHOLD = 10 * 1024 * 1024 # 10MB
|
CHUNKED_UPLOAD_THRESHOLD = 2 * 1024 * 1024 # 2MB
|
||||||
|
|
||||||
def add_document(self, id, title, kind, content, tags=None, ...):
|
def add_document(self, id, title, kind, content, tags=None, ...):
|
||||||
if len(content) < self.CHUNKED_UPLOAD_THRESHOLD:
|
if len(content) < self.CHUNKED_UPLOAD_THRESHOLD:
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@ from . exceptions import *
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Threshold for switching to chunked upload (10MB)
|
# Threshold for switching to chunked upload (2MB)
|
||||||
CHUNKED_UPLOAD_THRESHOLD = 10 * 1024 * 1024
|
# Lower threshold provides progress feedback and resumability on slower connections
|
||||||
|
CHUNKED_UPLOAD_THRESHOLD = 2 * 1024 * 1024
|
||||||
|
|
||||||
# Default chunk size (5MB - S3 multipart minimum)
|
# Default chunk size (5MB - S3 multipart minimum)
|
||||||
DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024
|
DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue