Skip to content

Commit c5efbe2

Browse files
feat(api): api update
1 parent 8ac3ea2 commit c5efbe2

9 files changed

Lines changed: 48 additions & 26 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 51
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-5ad16eef3948ad48d494f6c0bf0b7da1063e177df5b8deaeedb53502101026d7.yml
3-
openapi_spec_hash: 631634e0b03b231050e790e28377e51f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-1ca6a76a119213a04eb2ad5df39b49ca21d3fd46f826b140f313116e8140d7f1.yml
3+
openapi_spec_hash: c90e39ae364dd4075c49a7675ab8a389
44
config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b

src/mixedbread/types/scored_audio_url_input_chunk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __getattr__(self, attr: str) -> object: ...
186186

187187

188188
class AudioURL(BaseModel):
189-
"""The audio input specification."""
189+
"""Model for audio URL validation."""
190190

191191
url: str
192192
"""The audio URL. Can be either a URL or a Data URI."""
@@ -229,8 +229,8 @@ class ScoredAudioURLInputChunk(BaseModel):
229229
summary: Optional[str] = None
230230
"""summary of the audio"""
231231

232-
audio_url: AudioURL
233-
"""The audio input specification."""
232+
audio_url: Optional[AudioURL] = None
233+
"""Model for audio URL validation."""
234234

235235
sampling_rate: int
236236
"""The sampling rate of the audio."""

src/mixedbread/types/scored_image_url_input_chunk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __getattr__(self, attr: str) -> object: ...
186186

187187

188188
class ImageURL(BaseModel):
189-
"""The image input specification."""
189+
"""Model for image URL validation."""
190190

191191
url: str
192192
"""The image URL. Can be either a URL or a Data URI."""
@@ -232,5 +232,5 @@ class ScoredImageURLInputChunk(BaseModel):
232232
summary: Optional[str] = None
233233
"""summary of the image"""
234234

235-
image_url: ImageURL
236-
"""The image input specification."""
235+
image_url: Optional[ImageURL] = None
236+
"""Model for image URL validation."""

src/mixedbread/types/scored_text_input_chunk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,5 +218,5 @@ class ScoredTextInputChunk(BaseModel):
218218
offset: Optional[int] = None
219219
"""The offset of the text in the file relative to the start of the file."""
220220

221-
text: str
222-
"""Text content to process"""
221+
text: Optional[str] = None
222+
"""Text content"""

src/mixedbread/types/scored_video_url_input_chunk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __getattr__(self, attr: str) -> object: ...
186186

187187

188188
class VideoURL(BaseModel):
189-
"""The video input specification."""
189+
"""Model for video URL validation."""
190190

191191
url: str
192192
"""The video URL. Can be either a URL or a Data URI."""
@@ -229,5 +229,5 @@ class ScoredVideoURLInputChunk(BaseModel):
229229
summary: Optional[str] = None
230230
"""summary of the video"""
231231

232-
video_url: VideoURL
233-
"""The video input specification."""
232+
video_url: Optional[VideoURL] = None
233+
"""Model for video URL validation."""

src/mixedbread/types/store.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ class Config(BaseModel):
2929
contextualization: Optional[ConfigContextualization] = None
3030
"""Contextualize files with metadata"""
3131

32+
save_content: Optional[bool] = None
33+
"""Whether to save original content in the store.
34+
35+
When False, only vectors are indexed without the original content (index-only
36+
mode). This is useful for data privacy. Note: Reranking is not supported when
37+
content is not saved.
38+
"""
39+
3240

3341
class FileCounts(BaseModel):
3442
"""Counts of files in different states"""

src/mixedbread/types/store_create_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,11 @@ class Config(TypedDict, total=False):
5555

5656
contextualization: ConfigContextualization
5757
"""Contextualize files with metadata"""
58+
59+
save_content: bool
60+
"""Whether to save original content in the store.
61+
62+
When False, only vectors are indexed without the original content (index-only
63+
mode). This is useful for data privacy. Note: Reranking is not supported when
64+
content is not saved.
65+
"""

src/mixedbread/types/stores/store_file.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ class ChunkTextInputChunk(BaseModel):
249249
offset: Optional[int] = None
250250
"""The offset of the text in the file relative to the start of the file."""
251251

252-
text: str
253-
"""Text content to process"""
252+
text: Optional[str] = None
253+
"""Text content"""
254254

255255

256256
class ChunkImageURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadataChunkHeading(BaseModel):
@@ -421,7 +421,7 @@ def __getattr__(self, attr: str) -> object: ...
421421

422422

423423
class ChunkImageURLInputChunkImageURL(BaseModel):
424-
"""The image input specification."""
424+
"""Model for image URL validation."""
425425

426426
url: str
427427
"""The image URL. Can be either a URL or a Data URI."""
@@ -452,8 +452,8 @@ class ChunkImageURLInputChunk(BaseModel):
452452
summary: Optional[str] = None
453453
"""summary of the image"""
454454

455-
image_url: ChunkImageURLInputChunkImageURL
456-
"""The image input specification."""
455+
image_url: Optional[ChunkImageURLInputChunkImageURL] = None
456+
"""Model for image URL validation."""
457457

458458

459459
class ChunkAudioURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadataChunkHeading(BaseModel):
@@ -624,7 +624,7 @@ def __getattr__(self, attr: str) -> object: ...
624624

625625

626626
class ChunkAudioURLInputChunkAudioURL(BaseModel):
627-
"""The audio input specification."""
627+
"""Model for audio URL validation."""
628628

629629
url: str
630630
"""The audio URL. Can be either a URL or a Data URI."""
@@ -652,8 +652,8 @@ class ChunkAudioURLInputChunk(BaseModel):
652652
summary: Optional[str] = None
653653
"""summary of the audio"""
654654

655-
audio_url: ChunkAudioURLInputChunkAudioURL
656-
"""The audio input specification."""
655+
audio_url: Optional[ChunkAudioURLInputChunkAudioURL] = None
656+
"""Model for audio URL validation."""
657657

658658
sampling_rate: int
659659
"""The sampling rate of the audio."""
@@ -827,7 +827,7 @@ def __getattr__(self, attr: str) -> object: ...
827827

828828

829829
class ChunkVideoURLInputChunkVideoURL(BaseModel):
830-
"""The video input specification."""
830+
"""Model for video URL validation."""
831831

832832
url: str
833833
"""The video URL. Can be either a URL or a Data URI."""
@@ -855,8 +855,8 @@ class ChunkVideoURLInputChunk(BaseModel):
855855
summary: Optional[str] = None
856856
"""summary of the video"""
857857

858-
video_url: ChunkVideoURLInputChunkVideoURL
859-
"""The video input specification."""
858+
video_url: Optional[ChunkVideoURLInputChunkVideoURL] = None
859+
"""Model for video URL validation."""
860860

861861

862862
Chunk: TypeAlias = Annotated[

tests/api_resources/test_stores.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
4040
"days": 0,
4141
},
4242
metadata={},
43-
config={"contextualization": True},
43+
config={
44+
"contextualization": True,
45+
"save_content": True,
46+
},
4447
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
4548
)
4649
assert_matches_type(Store, store, path=["response"])
@@ -423,7 +426,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
423426
"days": 0,
424427
},
425428
metadata={},
426-
config={"contextualization": True},
429+
config={
430+
"contextualization": True,
431+
"save_content": True,
432+
},
427433
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
428434
)
429435
assert_matches_type(Store, store, path=["response"])

0 commit comments

Comments
 (0)