From 1977f125d46011248652cc976f94e9c9585e9dfe Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 12:40:08 +0000
Subject: [PATCH 1/4] feat(api): update via SDK Studio
---
.stats.yml | 4 +-
api.md | 5 +-
src/mixedbread/types/__init__.py | 5 +-
src/mixedbread/types/extractions/__init__.py | 2 -
.../types/extractions/image_url_input.py | 21 --------
.../types/extractions/text_input.py | 16 ------
src/mixedbread/types/rerank_response.py | 3 +-
.../types/scored_audio_url_input_chunk.py | 51 +++++++++++++++++++
.../types/scored_image_url_input_chunk.py | 51 +++++++++++++++++++
.../types/scored_text_input_chunk.py | 40 +++++++++++++++
.../types/scored_vector_store_chunk.py | 38 --------------
.../types/scored_video_url_input_chunk.py | 51 +++++++++++++++++++
.../vector_store_question_answering_params.py | 3 ++
...ector_store_question_answering_response.py | 18 +++++--
.../types/vector_store_search_response.py | 19 +++++--
.../vector_stores/scored_vector_store_file.py | 19 +++++--
tests/api_resources/test_vector_stores.py | 14 +++--
17 files changed, 259 insertions(+), 101 deletions(-)
delete mode 100644 src/mixedbread/types/extractions/image_url_input.py
delete mode 100644 src/mixedbread/types/extractions/text_input.py
create mode 100644 src/mixedbread/types/scored_audio_url_input_chunk.py
create mode 100644 src/mixedbread/types/scored_image_url_input_chunk.py
create mode 100644 src/mixedbread/types/scored_text_input_chunk.py
delete mode 100644 src/mixedbread/types/scored_vector_store_chunk.py
create mode 100644 src/mixedbread/types/scored_video_url_input_chunk.py
diff --git a/.stats.yml b/.stats.yml
index 78883d24..217fbbbc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-82c2c1c322149cd73b2e8e45f475919b941752a89e74464ccecd1aee9352e9be.yml
-openapi_spec_hash: f6661e9fafda26e7e9f3fc06739a33ad
-config_hash: 0619498f633d6a0d92ae15b21fd06d89
+openapi_spec_hash: 07482ed86f5ccf7b480c514d6d5ebb15
+config_hash: c148e761adac63c2bc1f5f2acfedcb24
diff --git a/api.md b/api.md
index 52d628b1..a4b6ba19 100644
--- a/api.md
+++ b/api.md
@@ -32,7 +32,10 @@ Types:
from mixedbread.types import (
ExpiresAfter,
FileCounts,
- ScoredVectorStoreChunk,
+ ScoredAudioURLInputChunk,
+ ScoredImageURLInputChunk,
+ ScoredTextInputChunk,
+ ScoredVideoURLInputChunk,
VectorStore,
VectorStoreChunkSearchOptions,
VectorStoreFileSearchOptions,
diff --git a/src/mixedbread/types/__init__.py b/src/mixedbread/types/__init__.py
index e7310fd0..8fd7bc6b 100644
--- a/src/mixedbread/types/__init__.py
+++ b/src/mixedbread/types/__init__.py
@@ -29,17 +29,20 @@
from .api_key_delete_response import APIKeyDeleteResponse as APIKeyDeleteResponse
from .data_source_list_params import DataSourceListParams as DataSourceListParams
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
+from .scored_text_input_chunk import ScoredTextInputChunk as ScoredTextInputChunk
from .multi_encoding_embedding import MultiEncodingEmbedding as MultiEncodingEmbedding
from .vector_store_list_params import VectorStoreListParams as VectorStoreListParams
from .data_source_create_params import DataSourceCreateParams as DataSourceCreateParams
from .data_source_oauth2_params import DataSourceOauth2Params as DataSourceOauth2Params
from .data_source_update_params import DataSourceUpdateParams as DataSourceUpdateParams
from .embedding_create_response import EmbeddingCreateResponse as EmbeddingCreateResponse
-from .scored_vector_store_chunk import ScoredVectorStoreChunk as ScoredVectorStoreChunk
from .vector_store_create_params import VectorStoreCreateParams as VectorStoreCreateParams
from .vector_store_search_params import VectorStoreSearchParams as VectorStoreSearchParams
from .vector_store_update_params import VectorStoreUpdateParams as VectorStoreUpdateParams
from .data_source_delete_response import DataSourceDeleteResponse as DataSourceDeleteResponse
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk as ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk as ScoredImageURLInputChunk
+from .scored_video_url_input_chunk import ScoredVideoURLInputChunk as ScoredVideoURLInputChunk
from .vector_store_delete_response import VectorStoreDeleteResponse as VectorStoreDeleteResponse
from .vector_store_search_response import VectorStoreSearchResponse as VectorStoreSearchResponse
from .data_source_oauth2_params_param import DataSourceOauth2ParamsParam as DataSourceOauth2ParamsParam
diff --git a/src/mixedbread/types/extractions/__init__.py b/src/mixedbread/types/extractions/__init__.py
index 22892cfe..ca9fd1eb 100644
--- a/src/mixedbread/types/extractions/__init__.py
+++ b/src/mixedbread/types/extractions/__init__.py
@@ -2,9 +2,7 @@
from __future__ import annotations
-from .text_input import TextInput as TextInput
from .extraction_job import ExtractionJob as ExtractionJob
-from .image_url_input import ImageURLInput as ImageURLInput
from .text_input_param import TextInputParam as TextInputParam
from .extraction_result import ExtractionResult as ExtractionResult
from .job_create_params import JobCreateParams as JobCreateParams
diff --git a/src/mixedbread/types/extractions/image_url_input.py b/src/mixedbread/types/extractions/image_url_input.py
deleted file mode 100644
index 90392503..00000000
--- a/src/mixedbread/types/extractions/image_url_input.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["ImageURLInput", "ImageURL"]
-
-
-class ImageURL(BaseModel):
- url: str
- """The image URL. Can be either a URL or a Data URI."""
-
-
-class ImageURLInput(BaseModel):
- type: Optional[Literal["image_url"]] = None
- """Input type identifier"""
-
- image_url: ImageURL
- """The image input specification."""
diff --git a/src/mixedbread/types/extractions/text_input.py b/src/mixedbread/types/extractions/text_input.py
deleted file mode 100644
index dde3cee0..00000000
--- a/src/mixedbread/types/extractions/text_input.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["TextInput"]
-
-
-class TextInput(BaseModel):
- type: Optional[Literal["text"]] = None
- """Input type identifier"""
-
- text: str
- """Text content to process"""
diff --git a/src/mixedbread/types/rerank_response.py b/src/mixedbread/types/rerank_response.py
index af6d5ff2..73ebfaaa 100644
--- a/src/mixedbread/types/rerank_response.py
+++ b/src/mixedbread/types/rerank_response.py
@@ -4,7 +4,6 @@
from typing_extensions import Literal
from .._models import BaseModel
-from .object_type import ObjectType
from .shared.usage import Usage
__all__ = ["RerankResponse", "Data"]
@@ -34,7 +33,7 @@ class RerankResponse(BaseModel):
data: List[Data]
"""The ranked documents."""
- object: Optional[ObjectType] = None
+ object: Optional[Literal["list"]] = None
"""The object type of the response"""
top_k: int
diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py
new file mode 100644
index 00000000..b514f1bd
--- /dev/null
+++ b/src/mixedbread/types/scored_audio_url_input_chunk.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredAudioURLInputChunk", "AudioURL"]
+
+
+class AudioURL(BaseModel):
+ url: str
+ """The audio URL. Can be either a URL or a Data URI."""
+
+
+class ScoredAudioURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["audio_url"]] = None
+ """Input type identifier"""
+
+ audio_url: AudioURL
+ """The audio input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the audio"""
+
+ summary: Optional[str] = None
+ """summary of the audio"""
diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py
new file mode 100644
index 00000000..ec6ba9dd
--- /dev/null
+++ b/src/mixedbread/types/scored_image_url_input_chunk.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredImageURLInputChunk", "ImageURL"]
+
+
+class ImageURL(BaseModel):
+ url: str
+ """The image URL. Can be either a URL or a Data URI."""
+
+
+class ScoredImageURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["image_url"]] = None
+ """Input type identifier"""
+
+ image_url: ImageURL
+ """The image input specification."""
+
+ ocr_text: Optional[str] = None
+ """ocr text of the image"""
+
+ summary: Optional[str] = None
+ """summary of the image"""
diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py
new file mode 100644
index 00000000..42870062
--- /dev/null
+++ b/src/mixedbread/types/scored_text_input_chunk.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredTextInputChunk"]
+
+
+class ScoredTextInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["text"]] = None
+ """Input type identifier"""
+
+ text: str
+ """Text content to process"""
diff --git a/src/mixedbread/types/scored_vector_store_chunk.py b/src/mixedbread/types/scored_vector_store_chunk.py
deleted file mode 100644
index 98516a61..00000000
--- a/src/mixedbread/types/scored_vector_store_chunk.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, Union, Optional
-from typing_extensions import TypeAlias
-
-from .._models import BaseModel
-from .extractions.text_input import TextInput
-from .extractions.image_url_input import ImageURLInput
-
-__all__ = ["ScoredVectorStoreChunk", "Value"]
-
-Value: TypeAlias = Union[str, ImageURLInput, TextInput, Dict[str, object], None]
-
-
-class ScoredVectorStoreChunk(BaseModel):
- position: int
- """position of the chunk in a file"""
-
- value: Optional[Value] = None
- """value of the chunk"""
-
- content: Optional[str] = None
- """content of the chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
diff --git a/src/mixedbread/types/scored_video_url_input_chunk.py b/src/mixedbread/types/scored_video_url_input_chunk.py
new file mode 100644
index 00000000..14836909
--- /dev/null
+++ b/src/mixedbread/types/scored_video_url_input_chunk.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredVideoURLInputChunk", "VideoURL"]
+
+
+class VideoURL(BaseModel):
+ url: str
+ """The video URL. Can be either a URL or a Data URI."""
+
+
+class ScoredVideoURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["video_url"]] = None
+ """Input type identifier"""
+
+ video_url: VideoURL
+ """The video input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the video"""
+
+ summary: Optional[str] = None
+ """summary of the video"""
diff --git a/src/mixedbread/types/vector_store_question_answering_params.py b/src/mixedbread/types/vector_store_question_answering_params.py
index 7d388f89..abb7919b 100644
--- a/src/mixedbread/types/vector_store_question_answering_params.py
+++ b/src/mixedbread/types/vector_store_question_answering_params.py
@@ -46,5 +46,8 @@ class QaOptions(TypedDict, total=False):
cite: bool
"""Whether to use citations"""
+ multimodal: bool
+ """Whether to use multimodal context"""
+
from .shared_params.search_filter import SearchFilter
diff --git a/src/mixedbread/types/vector_store_question_answering_response.py b/src/mixedbread/types/vector_store_question_answering_response.py
index 311c2cf5..2a477a87 100644
--- a/src/mixedbread/types/vector_store_question_answering_response.py
+++ b/src/mixedbread/types/vector_store_question_answering_response.py
@@ -1,16 +1,26 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List, Union, Optional
+from typing_extensions import Annotated, TypeAlias
+from .._utils import PropertyInfo
from .._models import BaseModel
-from .scored_vector_store_chunk import ScoredVectorStoreChunk
+from .scored_text_input_chunk import ScoredTextInputChunk
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk
+from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["VectorStoreQuestionAnsweringResponse"]
+__all__ = ["VectorStoreQuestionAnsweringResponse", "Source"]
+
+Source: TypeAlias = Annotated[
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ PropertyInfo(discriminator="type"),
+]
class VectorStoreQuestionAnsweringResponse(BaseModel):
answer: str
"""The answer generated by the LLM"""
- sources: Optional[List[ScoredVectorStoreChunk]] = None
+ sources: Optional[List[Source]] = None
"""Source documents used to generate the answer"""
diff --git a/src/mixedbread/types/vector_store_search_response.py b/src/mixedbread/types/vector_store_search_response.py
index bc7b860a..50143c9f 100644
--- a/src/mixedbread/types/vector_store_search_response.py
+++ b/src/mixedbread/types/vector_store_search_response.py
@@ -1,17 +1,26 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from typing_extensions import Literal
+from typing import List, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+from .._utils import PropertyInfo
from .._models import BaseModel
-from .scored_vector_store_chunk import ScoredVectorStoreChunk
+from .scored_text_input_chunk import ScoredTextInputChunk
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk
+from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["VectorStoreSearchResponse"]
+__all__ = ["VectorStoreSearchResponse", "Data"]
+
+Data: TypeAlias = Annotated[
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ PropertyInfo(discriminator="type"),
+]
class VectorStoreSearchResponse(BaseModel):
object: Optional[Literal["list"]] = None
"""The object type of the response"""
- data: List[ScoredVectorStoreChunk]
+ data: List[Data]
"""The list of scored vector store file chunks"""
diff --git a/src/mixedbread/types/vector_stores/scored_vector_store_file.py b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
index 72d6b8bc..7c702c1c 100644
--- a/src/mixedbread/types/vector_stores/scored_vector_store_file.py
+++ b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
@@ -1,13 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List, Union, Optional
from datetime import datetime
-from typing_extensions import Literal
+from typing_extensions import Literal, Annotated, TypeAlias
+from ..._utils import PropertyInfo
from ..._models import BaseModel
-from ..scored_vector_store_chunk import ScoredVectorStoreChunk
+from ..scored_text_input_chunk import ScoredTextInputChunk
+from ..scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from ..scored_image_url_input_chunk import ScoredImageURLInputChunk
+from ..scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["ScoredVectorStoreFile"]
+__all__ = ["ScoredVectorStoreFile", "Chunk"]
+
+Chunk: TypeAlias = Annotated[
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ PropertyInfo(discriminator="type"),
+]
class ScoredVectorStoreFile(BaseModel):
@@ -44,5 +53,5 @@ class ScoredVectorStoreFile(BaseModel):
score: float
"""score of the file"""
- chunks: Optional[List[ScoredVectorStoreChunk]] = None
+ chunks: Optional[List[Chunk]] = None
"""chunks"""
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 4ecec3a0..4cbe5b96 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -112,7 +112,7 @@ def test_method_update_with_all_params(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="x",
- description="x",
+ description="description",
expires_after={
"anchor": "last_active_at",
"days": 0,
@@ -280,7 +280,10 @@ def test_method_question_answering_with_all_params(self, client: Mixedbread) ->
"return_metadata": True,
},
stream=True,
- qa_options={"cite": True},
+ qa_options={
+ "cite": True,
+ "multimodal": True,
+ },
)
assert_matches_type(VectorStoreQuestionAnsweringResponse, vector_store, path=["response"])
@@ -487,7 +490,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncMixedbread
vector_store = await async_client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="x",
- description="x",
+ description="description",
expires_after={
"anchor": "last_active_at",
"days": 0,
@@ -655,7 +658,10 @@ async def test_method_question_answering_with_all_params(self, async_client: Asy
"return_metadata": True,
},
stream=True,
- qa_options={"cite": True},
+ qa_options={
+ "cite": True,
+ "multimodal": True,
+ },
)
assert_matches_type(VectorStoreQuestionAnsweringResponse, vector_store, path=["response"])
From e0b1fc12231187039ca03302b3a7b3f320fac4aa Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 12:41:06 +0000
Subject: [PATCH 2/4] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
api.md | 20 +--
.../resources/vector_stores/files.py | 5 +-
.../resources/vector_stores/vector_stores.py | 59 ++++----
src/mixedbread/types/__init__.py | 17 +--
src/mixedbread/types/expires_after.py | 16 --
src/mixedbread/types/expires_after_param.py | 15 --
src/mixedbread/types/file_counts.py | 24 ---
.../types/scored_audio_url_input_chunk.py | 51 -------
.../types/scored_image_url_input_chunk.py | 51 -------
.../types/scored_text_input_chunk.py | 40 -----
...vector_store_chunk_search_options_param.py | 18 ---
.../types/vector_store_create_params.py | 16 +-
.../types/vector_store_create_response.py | 75 ++++++++++
.../vector_store_file_search_options_param.py | 24 ---
...store.py => vector_store_list_response.py} | 31 +++-
.../vector_store_question_answering_params.py | 16 +-
...ector_store_question_answering_response.py | 141 +++++++++++++++++-
.../types/vector_store_retrieve_response.py | 75 ++++++++++
.../types/vector_store_search_params.py | 17 ++-
.../types/vector_store_search_response.py | 136 ++++++++++++++++-
.../types/vector_store_update_params.py | 16 +-
.../types/vector_store_update_response.py | 75 ++++++++++
.../types/vector_stores/file_search_params.py | 23 ++-
.../vector_stores/scored_vector_store_file.py | 139 ++++++++++++++++-
tests/api_resources/test_vector_stores.py | 65 ++++----
26 files changed, 800 insertions(+), 367 deletions(-)
delete mode 100644 src/mixedbread/types/expires_after.py
delete mode 100644 src/mixedbread/types/expires_after_param.py
delete mode 100644 src/mixedbread/types/file_counts.py
delete mode 100644 src/mixedbread/types/scored_audio_url_input_chunk.py
delete mode 100644 src/mixedbread/types/scored_image_url_input_chunk.py
delete mode 100644 src/mixedbread/types/scored_text_input_chunk.py
delete mode 100644 src/mixedbread/types/vector_store_chunk_search_options_param.py
create mode 100644 src/mixedbread/types/vector_store_create_response.py
delete mode 100644 src/mixedbread/types/vector_store_file_search_options_param.py
rename src/mixedbread/types/{vector_store.py => vector_store_list_response.py} (64%)
create mode 100644 src/mixedbread/types/vector_store_retrieve_response.py
create mode 100644 src/mixedbread/types/vector_store_update_response.py
diff --git a/.stats.yml b/.stats.yml
index 217fbbbc..d7063b0f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-82c2c1c322149cd73b2e8e45f475919b941752a89e74464ccecd1aee9352e9be.yml
openapi_spec_hash: 07482ed86f5ccf7b480c514d6d5ebb15
-config_hash: c148e761adac63c2bc1f5f2acfedcb24
+config_hash: a3a88b6c5d74153fc5e19da6d8509bf7
diff --git a/api.md b/api.md
index a4b6ba19..23c225b0 100644
--- a/api.md
+++ b/api.md
@@ -30,15 +30,11 @@ Types:
```python
from mixedbread.types import (
- ExpiresAfter,
- FileCounts,
- ScoredAudioURLInputChunk,
- ScoredImageURLInputChunk,
- ScoredTextInputChunk,
ScoredVideoURLInputChunk,
- VectorStore,
- VectorStoreChunkSearchOptions,
- VectorStoreFileSearchOptions,
+ VectorStoreCreateResponse,
+ VectorStoreRetrieveResponse,
+ VectorStoreUpdateResponse,
+ VectorStoreListResponse,
VectorStoreDeleteResponse,
VectorStoreQuestionAnsweringResponse,
VectorStoreSearchResponse,
@@ -47,10 +43,10 @@ from mixedbread.types import (
Methods:
-- client.vector_stores.create(\*\*params) -> VectorStore
-- client.vector_stores.retrieve(vector_store_id) -> VectorStore
-- client.vector_stores.update(vector_store_id, \*\*params) -> VectorStore
-- client.vector_stores.list(\*\*params) -> SyncLimitOffset[VectorStore]
+- client.vector_stores.create(\*\*params) -> VectorStoreCreateResponse
+- client.vector_stores.retrieve(vector_store_id) -> VectorStoreRetrieveResponse
+- client.vector_stores.update(vector_store_id, \*\*params) -> VectorStoreUpdateResponse
+- client.vector_stores.list(\*\*params) -> SyncLimitOffset[VectorStoreListResponse]
- client.vector_stores.delete(vector_store_id) -> VectorStoreDeleteResponse
- client.vector_stores.question_answering(\*\*params) -> VectorStoreQuestionAnsweringResponse
- client.vector_stores.search(\*\*params) -> VectorStoreSearchResponse
diff --git a/src/mixedbread/resources/vector_stores/files.py b/src/mixedbread/resources/vector_stores/files.py
index 51e7dd3b..5022d024 100644
--- a/src/mixedbread/resources/vector_stores/files.py
+++ b/src/mixedbread/resources/vector_stores/files.py
@@ -24,7 +24,6 @@
from ...types.vector_stores.vector_store_file import VectorStoreFile
from ...types.vector_stores.file_delete_response import FileDeleteResponse
from ...types.vector_stores.file_search_response import FileSearchResponse
-from ...types.vector_store_file_search_options_param import VectorStoreFileSearchOptionsParam
__all__ = ["FilesResource", "AsyncFilesResource"]
@@ -259,7 +258,7 @@ def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[file_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreFileSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: file_search_params.SearchOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -659,7 +658,7 @@ async def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[file_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreFileSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: file_search_params.SearchOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/mixedbread/resources/vector_stores/vector_stores.py b/src/mixedbread/resources/vector_stores/vector_stores.py
index 18b25941..9ca63f0d 100644
--- a/src/mixedbread/resources/vector_stores/vector_stores.py
+++ b/src/mixedbread/resources/vector_stores/vector_stores.py
@@ -33,11 +33,12 @@
)
from ...pagination import SyncLimitOffset, AsyncLimitOffset
from ..._base_client import AsyncPaginator, make_request_options
-from ...types.vector_store import VectorStore
-from ...types.expires_after_param import ExpiresAfterParam
+from ...types.vector_store_list_response import VectorStoreListResponse
+from ...types.vector_store_create_response import VectorStoreCreateResponse
from ...types.vector_store_delete_response import VectorStoreDeleteResponse
from ...types.vector_store_search_response import VectorStoreSearchResponse
-from ...types.vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
+from ...types.vector_store_update_response import VectorStoreUpdateResponse
+from ...types.vector_store_retrieve_response import VectorStoreRetrieveResponse
from ...types.vector_store_question_answering_response import VectorStoreQuestionAnsweringResponse
__all__ = ["VectorStoresResource", "AsyncVectorStoresResource"]
@@ -72,7 +73,7 @@ def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[vector_store_create_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -81,7 +82,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreCreateResponse:
"""
Create a new vector store.
@@ -124,7 +125,7 @@ def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreCreateResponse,
)
def retrieve(
@@ -137,7 +138,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreRetrieveResponse:
"""
Get a vector store by ID.
@@ -163,7 +164,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreRetrieveResponse,
)
def update(
@@ -172,7 +173,7 @@ def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -180,7 +181,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreUpdateResponse:
"""
Update a vector store by ID.
@@ -225,7 +226,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreUpdateResponse,
)
def list(
@@ -239,7 +240,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncLimitOffset[VectorStore]:
+ ) -> SyncLimitOffset[VectorStoreListResponse]:
"""
List all vector stores.
@@ -262,7 +263,7 @@ def list(
"""
return self._get_api_list(
"/v1/vector_stores",
- page=SyncLimitOffset[VectorStore],
+ page=SyncLimitOffset[VectorStoreListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -276,7 +277,7 @@ def list(
vector_store_list_params.VectorStoreListParams,
),
),
- model=VectorStore,
+ model=VectorStoreListResponse,
)
def delete(
@@ -325,7 +326,7 @@ def question_answering(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_question_answering_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: vector_store_question_answering_params.SearchOptions | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
qa_options: vector_store_question_answering_params.QaOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -390,7 +391,7 @@ def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: vector_store_search_params.SearchOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -482,7 +483,7 @@ async def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[vector_store_create_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -491,7 +492,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreCreateResponse:
"""
Create a new vector store.
@@ -534,7 +535,7 @@ async def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreCreateResponse,
)
async def retrieve(
@@ -547,7 +548,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreRetrieveResponse:
"""
Get a vector store by ID.
@@ -573,7 +574,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreRetrieveResponse,
)
async def update(
@@ -582,7 +583,7 @@ async def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -590,7 +591,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStore:
+ ) -> VectorStoreUpdateResponse:
"""
Update a vector store by ID.
@@ -635,7 +636,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStore,
+ cast_to=VectorStoreUpdateResponse,
)
def list(
@@ -649,7 +650,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[VectorStore, AsyncLimitOffset[VectorStore]]:
+ ) -> AsyncPaginator[VectorStoreListResponse, AsyncLimitOffset[VectorStoreListResponse]]:
"""
List all vector stores.
@@ -672,7 +673,7 @@ def list(
"""
return self._get_api_list(
"/v1/vector_stores",
- page=AsyncLimitOffset[VectorStore],
+ page=AsyncLimitOffset[VectorStoreListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -686,7 +687,7 @@ def list(
vector_store_list_params.VectorStoreListParams,
),
),
- model=VectorStore,
+ model=VectorStoreListResponse,
)
async def delete(
@@ -735,7 +736,7 @@ async def question_answering(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_question_answering_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: vector_store_question_answering_params.SearchOptions | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
qa_options: vector_store_question_answering_params.QaOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -800,7 +801,7 @@ async def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
+ search_options: vector_store_search_params.SearchOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/mixedbread/types/__init__.py b/src/mixedbread/types/__init__.py
index 8fd7bc6b..d38a6b06 100644
--- a/src/mixedbread/types/__init__.py
+++ b/src/mixedbread/types/__init__.py
@@ -6,11 +6,8 @@
from .api_key import APIKey as APIKey
from .embedding import Embedding as Embedding
from .data_source import DataSource as DataSource
-from .file_counts import FileCounts as FileCounts
from .file_object import FileObject as FileObject
from .object_type import ObjectType as ObjectType
-from .vector_store import VectorStore as VectorStore
-from .expires_after import ExpiresAfter as ExpiresAfter
from .info_response import InfoResponse as InfoResponse
from .api_key_created import APIKeyCreated as APIKeyCreated
from .encoding_format import EncodingFormat as EncodingFormat
@@ -21,7 +18,6 @@
from .file_update_params import FileUpdateParams as FileUpdateParams
from .api_key_list_params import APIKeyListParams as APIKeyListParams
from .client_embed_params import ClientEmbedParams as ClientEmbedParams
-from .expires_after_param import ExpiresAfterParam as ExpiresAfterParam
from .client_rerank_params import ClientRerankParams as ClientRerankParams
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
from .api_key_create_params import APIKeyCreateParams as APIKeyCreateParams
@@ -29,7 +25,6 @@
from .api_key_delete_response import APIKeyDeleteResponse as APIKeyDeleteResponse
from .data_source_list_params import DataSourceListParams as DataSourceListParams
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
-from .scored_text_input_chunk import ScoredTextInputChunk as ScoredTextInputChunk
from .multi_encoding_embedding import MultiEncodingEmbedding as MultiEncodingEmbedding
from .vector_store_list_params import VectorStoreListParams as VectorStoreListParams
from .data_source_create_params import DataSourceCreateParams as DataSourceCreateParams
@@ -37,24 +32,20 @@
from .data_source_update_params import DataSourceUpdateParams as DataSourceUpdateParams
from .embedding_create_response import EmbeddingCreateResponse as EmbeddingCreateResponse
from .vector_store_create_params import VectorStoreCreateParams as VectorStoreCreateParams
+from .vector_store_list_response import VectorStoreListResponse as VectorStoreListResponse
from .vector_store_search_params import VectorStoreSearchParams as VectorStoreSearchParams
from .vector_store_update_params import VectorStoreUpdateParams as VectorStoreUpdateParams
from .data_source_delete_response import DataSourceDeleteResponse as DataSourceDeleteResponse
-from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk as ScoredAudioURLInputChunk
-from .scored_image_url_input_chunk import ScoredImageURLInputChunk as ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk as ScoredVideoURLInputChunk
+from .vector_store_create_response import VectorStoreCreateResponse as VectorStoreCreateResponse
from .vector_store_delete_response import VectorStoreDeleteResponse as VectorStoreDeleteResponse
from .vector_store_search_response import VectorStoreSearchResponse as VectorStoreSearchResponse
+from .vector_store_update_response import VectorStoreUpdateResponse as VectorStoreUpdateResponse
+from .vector_store_retrieve_response import VectorStoreRetrieveResponse as VectorStoreRetrieveResponse
from .data_source_oauth2_params_param import DataSourceOauth2ParamsParam as DataSourceOauth2ParamsParam
-from .vector_store_file_search_options_param import (
- VectorStoreFileSearchOptionsParam as VectorStoreFileSearchOptionsParam,
-)
from .vector_store_question_answering_params import (
VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams,
)
-from .vector_store_chunk_search_options_param import (
- VectorStoreChunkSearchOptionsParam as VectorStoreChunkSearchOptionsParam,
-)
from .vector_store_question_answering_response import (
VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
)
diff --git a/src/mixedbread/types/expires_after.py b/src/mixedbread/types/expires_after.py
deleted file mode 100644
index 8550ad0a..00000000
--- a/src/mixedbread/types/expires_after.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["ExpiresAfter"]
-
-
-class ExpiresAfter(BaseModel):
- anchor: Optional[Literal["last_active_at"]] = None
- """Anchor date for the expiration policy"""
-
- days: Optional[int] = None
- """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/expires_after_param.py b/src/mixedbread/types/expires_after_param.py
deleted file mode 100644
index e7b4bee0..00000000
--- a/src/mixedbread/types/expires_after_param.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Literal, TypedDict
-
-__all__ = ["ExpiresAfterParam"]
-
-
-class ExpiresAfterParam(TypedDict, total=False):
- anchor: Literal["last_active_at"]
- """Anchor date for the expiration policy"""
-
- days: int
- """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/file_counts.py b/src/mixedbread/types/file_counts.py
deleted file mode 100644
index 05ff3f63..00000000
--- a/src/mixedbread/types/file_counts.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from .._models import BaseModel
-
-__all__ = ["FileCounts"]
-
-
-class FileCounts(BaseModel):
- in_progress: Optional[int] = None
- """Number of files currently being processed"""
-
- cancelled: Optional[int] = None
- """Number of files whose processing was cancelled"""
-
- completed: Optional[int] = None
- """Number of successfully processed files"""
-
- failed: Optional[int] = None
- """Number of files that failed processing"""
-
- total: Optional[int] = None
- """Total number of files"""
diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py
deleted file mode 100644
index b514f1bd..00000000
--- a/src/mixedbread/types/scored_audio_url_input_chunk.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["ScoredAudioURLInputChunk", "AudioURL"]
-
-
-class AudioURL(BaseModel):
- url: str
- """The audio URL. Can be either a URL or a Data URI."""
-
-
-class ScoredAudioURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["audio_url"]] = None
- """Input type identifier"""
-
- audio_url: AudioURL
- """The audio input specification."""
-
- transcription: Optional[str] = None
- """speech recognition (sr) text of the audio"""
-
- summary: Optional[str] = None
- """summary of the audio"""
diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py
deleted file mode 100644
index ec6ba9dd..00000000
--- a/src/mixedbread/types/scored_image_url_input_chunk.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["ScoredImageURLInputChunk", "ImageURL"]
-
-
-class ImageURL(BaseModel):
- url: str
- """The image URL. Can be either a URL or a Data URI."""
-
-
-class ScoredImageURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["image_url"]] = None
- """Input type identifier"""
-
- image_url: ImageURL
- """The image input specification."""
-
- ocr_text: Optional[str] = None
- """ocr text of the image"""
-
- summary: Optional[str] = None
- """summary of the image"""
diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py
deleted file mode 100644
index 42870062..00000000
--- a/src/mixedbread/types/scored_text_input_chunk.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["ScoredTextInputChunk"]
-
-
-class ScoredTextInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["text"]] = None
- """Input type identifier"""
-
- text: str
- """Text content to process"""
diff --git a/src/mixedbread/types/vector_store_chunk_search_options_param.py b/src/mixedbread/types/vector_store_chunk_search_options_param.py
deleted file mode 100644
index a2396bec..00000000
--- a/src/mixedbread/types/vector_store_chunk_search_options_param.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["VectorStoreChunkSearchOptionsParam"]
-
-
-class VectorStoreChunkSearchOptionsParam(TypedDict, total=False):
- score_threshold: float
- """Minimum similarity score threshold"""
-
- rewrite_query: bool
- """Whether to rewrite the query"""
-
- return_metadata: bool
- """Whether to return file metadata"""
diff --git a/src/mixedbread/types/vector_store_create_params.py b/src/mixedbread/types/vector_store_create_params.py
index 3013c59c..31fc3526 100644
--- a/src/mixedbread/types/vector_store_create_params.py
+++ b/src/mixedbread/types/vector_store_create_params.py
@@ -3,11 +3,9 @@
from __future__ import annotations
from typing import List, Optional
-from typing_extensions import TypedDict
+from typing_extensions import Literal, TypedDict
-from .expires_after_param import ExpiresAfterParam
-
-__all__ = ["VectorStoreCreateParams"]
+__all__ = ["VectorStoreCreateParams", "ExpiresAfter"]
class VectorStoreCreateParams(TypedDict, total=False):
@@ -17,7 +15,7 @@ class VectorStoreCreateParams(TypedDict, total=False):
description: Optional[str]
"""Description of the vector store"""
- expires_after: Optional[ExpiresAfterParam]
+ expires_after: Optional[ExpiresAfter]
"""Represents an expiration policy for a vector store."""
metadata: object
@@ -25,3 +23,11 @@ class VectorStoreCreateParams(TypedDict, total=False):
file_ids: Optional[List[str]]
"""Optional list of file IDs"""
+
+
+class ExpiresAfter(TypedDict, total=False):
+ anchor: Literal["last_active_at"]
+ """Anchor date for the expiration policy"""
+
+ days: int
+ """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/vector_store_create_response.py b/src/mixedbread/types/vector_store_create_response.py
new file mode 100644
index 00000000..69946db2
--- /dev/null
+++ b/src/mixedbread/types/vector_store_create_response.py
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["VectorStoreCreateResponse", "FileCounts", "ExpiresAfter"]
+
+
+class FileCounts(BaseModel):
+ in_progress: Optional[int] = None
+ """Number of files currently being processed"""
+
+ cancelled: Optional[int] = None
+ """Number of files whose processing was cancelled"""
+
+ completed: Optional[int] = None
+ """Number of successfully processed files"""
+
+ failed: Optional[int] = None
+ """Number of files that failed processing"""
+
+ total: Optional[int] = None
+ """Total number of files"""
+
+
+class ExpiresAfter(BaseModel):
+ anchor: Optional[Literal["last_active_at"]] = None
+ """Anchor date for the expiration policy"""
+
+ days: Optional[int] = None
+ """Number of days after which the vector store expires"""
+
+
+class VectorStoreCreateResponse(BaseModel):
+ id: str
+ """Unique identifier for the vector store"""
+
+ name: str
+ """Name of the vector store"""
+
+ description: Optional[str] = None
+ """Detailed description of the vector store's purpose and contents"""
+
+ metadata: Optional[object] = None
+ """Additional metadata associated with the vector store"""
+
+ file_counts: Optional[FileCounts] = None
+ """Counts of files in different states"""
+
+ expires_after: Optional[ExpiresAfter] = None
+ """Represents an expiration policy for a vector store."""
+
+ status: Optional[Literal["expired", "in_progress", "completed"]] = None
+ """Processing status of the vector store"""
+
+ created_at: datetime
+ """Timestamp when the vector store was created"""
+
+ updated_at: datetime
+ """Timestamp when the vector store was last updated"""
+
+ last_active_at: Optional[datetime] = None
+ """Timestamp when the vector store was last used"""
+
+ usage_bytes: Optional[int] = None
+ """Total storage usage in bytes"""
+
+ expires_at: Optional[datetime] = None
+ """Optional expiration timestamp for the vector store"""
+
+ object: Optional[Literal["vector_store"]] = None
+ """Type of the object"""
diff --git a/src/mixedbread/types/vector_store_file_search_options_param.py b/src/mixedbread/types/vector_store_file_search_options_param.py
deleted file mode 100644
index 13ed8e95..00000000
--- a/src/mixedbread/types/vector_store_file_search_options_param.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["VectorStoreFileSearchOptionsParam"]
-
-
-class VectorStoreFileSearchOptionsParam(TypedDict, total=False):
- score_threshold: float
- """Minimum similarity score threshold"""
-
- rewrite_query: bool
- """Whether to rewrite the query"""
-
- return_metadata: bool
- """Whether to return file metadata"""
-
- return_chunks: bool
- """Whether to return matching text chunks"""
-
- chunks_per_file: int
- """Number of chunks to return for each file"""
diff --git a/src/mixedbread/types/vector_store.py b/src/mixedbread/types/vector_store_list_response.py
similarity index 64%
rename from src/mixedbread/types/vector_store.py
rename to src/mixedbread/types/vector_store_list_response.py
index b310d3e6..4d4b2ded 100644
--- a/src/mixedbread/types/vector_store.py
+++ b/src/mixedbread/types/vector_store_list_response.py
@@ -5,13 +5,36 @@
from typing_extensions import Literal
from .._models import BaseModel
-from .file_counts import FileCounts
-from .expires_after import ExpiresAfter
-__all__ = ["VectorStore"]
+__all__ = ["VectorStoreListResponse", "FileCounts", "ExpiresAfter"]
-class VectorStore(BaseModel):
+class FileCounts(BaseModel):
+ in_progress: Optional[int] = None
+ """Number of files currently being processed"""
+
+ cancelled: Optional[int] = None
+ """Number of files whose processing was cancelled"""
+
+ completed: Optional[int] = None
+ """Number of successfully processed files"""
+
+ failed: Optional[int] = None
+ """Number of files that failed processing"""
+
+ total: Optional[int] = None
+ """Total number of files"""
+
+
+class ExpiresAfter(BaseModel):
+ anchor: Optional[Literal["last_active_at"]] = None
+ """Anchor date for the expiration policy"""
+
+ days: Optional[int] = None
+ """Number of days after which the vector store expires"""
+
+
+class VectorStoreListResponse(BaseModel):
id: str
"""Unique identifier for the vector store"""
diff --git a/src/mixedbread/types/vector_store_question_answering_params.py b/src/mixedbread/types/vector_store_question_answering_params.py
index abb7919b..16083394 100644
--- a/src/mixedbread/types/vector_store_question_answering_params.py
+++ b/src/mixedbread/types/vector_store_question_answering_params.py
@@ -6,9 +6,8 @@
from typing_extensions import Required, TypeAlias, TypedDict
from .shared_params.search_filter_condition import SearchFilterCondition
-from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
-__all__ = ["VectorStoreQuestionAnsweringParams", "Filters", "FiltersUnionMember2", "QaOptions"]
+__all__ = ["VectorStoreQuestionAnsweringParams", "Filters", "FiltersUnionMember2", "SearchOptions", "QaOptions"]
class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
@@ -27,7 +26,7 @@ class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
filters: Optional[Filters]
"""Optional filter conditions"""
- search_options: VectorStoreChunkSearchOptionsParam
+ search_options: SearchOptions
"""Search configuration options"""
stream: bool
@@ -42,6 +41,17 @@ class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]
+class SearchOptions(TypedDict, total=False):
+ score_threshold: float
+ """Minimum similarity score threshold"""
+
+ rewrite_query: bool
+ """Whether to rewrite the query"""
+
+ return_metadata: bool
+ """Whether to return file metadata"""
+
+
class QaOptions(TypedDict, total=False):
cite: bool
"""Whether to use citations"""
diff --git a/src/mixedbread/types/vector_store_question_answering_response.py b/src/mixedbread/types/vector_store_question_answering_response.py
index 2a477a87..71240d6f 100644
--- a/src/mixedbread/types/vector_store_question_answering_response.py
+++ b/src/mixedbread/types/vector_store_question_answering_response.py
@@ -1,19 +1,148 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import Annotated, TypeAlias
+from typing_extensions import Literal, Annotated, TypeAlias
from .._utils import PropertyInfo
from .._models import BaseModel
-from .scored_text_input_chunk import ScoredTextInputChunk
-from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
-from .scored_image_url_input_chunk import ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["VectorStoreQuestionAnsweringResponse", "Source"]
+__all__ = [
+ "VectorStoreQuestionAnsweringResponse",
+ "Source",
+ "SourceScoredTextInputChunk",
+ "SourceScoredImageURLInputChunk",
+ "SourceScoredImageURLInputChunkImageURL",
+ "SourceScoredAudioURLInputChunk",
+ "SourceScoredAudioURLInputChunkAudioURL",
+]
+
+
+class SourceScoredTextInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["text"]] = None
+ """Input type identifier"""
+
+ text: str
+ """Text content to process"""
+
+
+class SourceScoredImageURLInputChunkImageURL(BaseModel):
+ url: str
+ """The image URL. Can be either a URL or a Data URI."""
+
+
+class SourceScoredImageURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["image_url"]] = None
+ """Input type identifier"""
+
+ image_url: SourceScoredImageURLInputChunkImageURL
+ """The image input specification."""
+
+ ocr_text: Optional[str] = None
+ """ocr text of the image"""
+
+ summary: Optional[str] = None
+ """summary of the image"""
+
+
+class SourceScoredAudioURLInputChunkAudioURL(BaseModel):
+ url: str
+ """The audio URL. Can be either a URL or a Data URI."""
+
+
+class SourceScoredAudioURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["audio_url"]] = None
+ """Input type identifier"""
+
+ audio_url: SourceScoredAudioURLInputChunkAudioURL
+ """The audio input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the audio"""
+
+ summary: Optional[str] = None
+ """summary of the audio"""
+
Source: TypeAlias = Annotated[
- Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ Union[
+ SourceScoredTextInputChunk,
+ SourceScoredImageURLInputChunk,
+ SourceScoredAudioURLInputChunk,
+ ScoredVideoURLInputChunk,
+ ],
PropertyInfo(discriminator="type"),
]
diff --git a/src/mixedbread/types/vector_store_retrieve_response.py b/src/mixedbread/types/vector_store_retrieve_response.py
new file mode 100644
index 00000000..02cffa65
--- /dev/null
+++ b/src/mixedbread/types/vector_store_retrieve_response.py
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["VectorStoreRetrieveResponse", "FileCounts", "ExpiresAfter"]
+
+
+class FileCounts(BaseModel):
+ in_progress: Optional[int] = None
+ """Number of files currently being processed"""
+
+ cancelled: Optional[int] = None
+ """Number of files whose processing was cancelled"""
+
+ completed: Optional[int] = None
+ """Number of successfully processed files"""
+
+ failed: Optional[int] = None
+ """Number of files that failed processing"""
+
+ total: Optional[int] = None
+ """Total number of files"""
+
+
+class ExpiresAfter(BaseModel):
+ anchor: Optional[Literal["last_active_at"]] = None
+ """Anchor date for the expiration policy"""
+
+ days: Optional[int] = None
+ """Number of days after which the vector store expires"""
+
+
+class VectorStoreRetrieveResponse(BaseModel):
+ id: str
+ """Unique identifier for the vector store"""
+
+ name: str
+ """Name of the vector store"""
+
+ description: Optional[str] = None
+ """Detailed description of the vector store's purpose and contents"""
+
+ metadata: Optional[object] = None
+ """Additional metadata associated with the vector store"""
+
+ file_counts: Optional[FileCounts] = None
+ """Counts of files in different states"""
+
+ expires_after: Optional[ExpiresAfter] = None
+ """Represents an expiration policy for a vector store."""
+
+ status: Optional[Literal["expired", "in_progress", "completed"]] = None
+ """Processing status of the vector store"""
+
+ created_at: datetime
+ """Timestamp when the vector store was created"""
+
+ updated_at: datetime
+ """Timestamp when the vector store was last updated"""
+
+ last_active_at: Optional[datetime] = None
+ """Timestamp when the vector store was last used"""
+
+ usage_bytes: Optional[int] = None
+ """Total storage usage in bytes"""
+
+ expires_at: Optional[datetime] = None
+ """Optional expiration timestamp for the vector store"""
+
+ object: Optional[Literal["vector_store"]] = None
+ """Type of the object"""
diff --git a/src/mixedbread/types/vector_store_search_params.py b/src/mixedbread/types/vector_store_search_params.py
index e0edc1bb..7a28385c 100644
--- a/src/mixedbread/types/vector_store_search_params.py
+++ b/src/mixedbread/types/vector_store_search_params.py
@@ -6,9 +6,8 @@
from typing_extensions import Required, TypeAlias, TypedDict
from .shared_params.search_filter_condition import SearchFilterCondition
-from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
-__all__ = ["VectorStoreSearchParams", "Filters", "FiltersUnionMember2"]
+__all__ = ["VectorStoreSearchParams", "Filters", "FiltersUnionMember2", "SearchOptions"]
class VectorStoreSearchParams(TypedDict, total=False):
@@ -24,7 +23,7 @@ class VectorStoreSearchParams(TypedDict, total=False):
filters: Optional[Filters]
"""Optional filter conditions"""
- search_options: VectorStoreChunkSearchOptionsParam
+ search_options: SearchOptions
"""Search configuration options"""
@@ -32,4 +31,16 @@ class VectorStoreSearchParams(TypedDict, total=False):
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]
+
+class SearchOptions(TypedDict, total=False):
+ score_threshold: float
+ """Minimum similarity score threshold"""
+
+ rewrite_query: bool
+ """Whether to rewrite the query"""
+
+ return_metadata: bool
+ """Whether to return file metadata"""
+
+
from .shared_params.search_filter import SearchFilter
diff --git a/src/mixedbread/types/vector_store_search_response.py b/src/mixedbread/types/vector_store_search_response.py
index 50143c9f..c1f8e788 100644
--- a/src/mixedbread/types/vector_store_search_response.py
+++ b/src/mixedbread/types/vector_store_search_response.py
@@ -5,15 +5,141 @@
from .._utils import PropertyInfo
from .._models import BaseModel
-from .scored_text_input_chunk import ScoredTextInputChunk
-from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
-from .scored_image_url_input_chunk import ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["VectorStoreSearchResponse", "Data"]
+__all__ = [
+ "VectorStoreSearchResponse",
+ "Data",
+ "DataScoredTextInputChunk",
+ "DataScoredImageURLInputChunk",
+ "DataScoredImageURLInputChunkImageURL",
+ "DataScoredAudioURLInputChunk",
+ "DataScoredAudioURLInputChunkAudioURL",
+]
+
+
+class DataScoredTextInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["text"]] = None
+ """Input type identifier"""
+
+ text: str
+ """Text content to process"""
+
+
+class DataScoredImageURLInputChunkImageURL(BaseModel):
+ url: str
+ """The image URL. Can be either a URL or a Data URI."""
+
+
+class DataScoredImageURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["image_url"]] = None
+ """Input type identifier"""
+
+ image_url: DataScoredImageURLInputChunkImageURL
+ """The image input specification."""
+
+ ocr_text: Optional[str] = None
+ """ocr text of the image"""
+
+ summary: Optional[str] = None
+ """summary of the image"""
+
+
+class DataScoredAudioURLInputChunkAudioURL(BaseModel):
+ url: str
+ """The audio URL. Can be either a URL or a Data URI."""
+
+
+class DataScoredAudioURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["audio_url"]] = None
+ """Input type identifier"""
+
+ audio_url: DataScoredAudioURLInputChunkAudioURL
+ """The audio input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the audio"""
+
+ summary: Optional[str] = None
+ """summary of the audio"""
+
Data: TypeAlias = Annotated[
- Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ Union[
+ DataScoredTextInputChunk, DataScoredImageURLInputChunk, DataScoredAudioURLInputChunk, ScoredVideoURLInputChunk
+ ],
PropertyInfo(discriminator="type"),
]
diff --git a/src/mixedbread/types/vector_store_update_params.py b/src/mixedbread/types/vector_store_update_params.py
index d8e6a83b..99c6a113 100644
--- a/src/mixedbread/types/vector_store_update_params.py
+++ b/src/mixedbread/types/vector_store_update_params.py
@@ -3,11 +3,9 @@
from __future__ import annotations
from typing import Optional
-from typing_extensions import TypedDict
+from typing_extensions import Literal, TypedDict
-from .expires_after_param import ExpiresAfterParam
-
-__all__ = ["VectorStoreUpdateParams"]
+__all__ = ["VectorStoreUpdateParams", "ExpiresAfter"]
class VectorStoreUpdateParams(TypedDict, total=False):
@@ -17,8 +15,16 @@ class VectorStoreUpdateParams(TypedDict, total=False):
description: Optional[str]
"""New description"""
- expires_after: Optional[ExpiresAfterParam]
+ expires_after: Optional[ExpiresAfter]
"""Represents an expiration policy for a vector store."""
metadata: object
"""Optional metadata key-value pairs"""
+
+
+class ExpiresAfter(TypedDict, total=False):
+ anchor: Literal["last_active_at"]
+ """Anchor date for the expiration policy"""
+
+ days: int
+ """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/vector_store_update_response.py b/src/mixedbread/types/vector_store_update_response.py
new file mode 100644
index 00000000..532d9082
--- /dev/null
+++ b/src/mixedbread/types/vector_store_update_response.py
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["VectorStoreUpdateResponse", "FileCounts", "ExpiresAfter"]
+
+
+class FileCounts(BaseModel):
+ in_progress: Optional[int] = None
+ """Number of files currently being processed"""
+
+ cancelled: Optional[int] = None
+ """Number of files whose processing was cancelled"""
+
+ completed: Optional[int] = None
+ """Number of successfully processed files"""
+
+ failed: Optional[int] = None
+ """Number of files that failed processing"""
+
+ total: Optional[int] = None
+ """Total number of files"""
+
+
+class ExpiresAfter(BaseModel):
+ anchor: Optional[Literal["last_active_at"]] = None
+ """Anchor date for the expiration policy"""
+
+ days: Optional[int] = None
+ """Number of days after which the vector store expires"""
+
+
+class VectorStoreUpdateResponse(BaseModel):
+ id: str
+ """Unique identifier for the vector store"""
+
+ name: str
+ """Name of the vector store"""
+
+ description: Optional[str] = None
+ """Detailed description of the vector store's purpose and contents"""
+
+ metadata: Optional[object] = None
+ """Additional metadata associated with the vector store"""
+
+ file_counts: Optional[FileCounts] = None
+ """Counts of files in different states"""
+
+ expires_after: Optional[ExpiresAfter] = None
+ """Represents an expiration policy for a vector store."""
+
+ status: Optional[Literal["expired", "in_progress", "completed"]] = None
+ """Processing status of the vector store"""
+
+ created_at: datetime
+ """Timestamp when the vector store was created"""
+
+ updated_at: datetime
+ """Timestamp when the vector store was last updated"""
+
+ last_active_at: Optional[datetime] = None
+ """Timestamp when the vector store was last used"""
+
+ usage_bytes: Optional[int] = None
+ """Total storage usage in bytes"""
+
+ expires_at: Optional[datetime] = None
+ """Optional expiration timestamp for the vector store"""
+
+ object: Optional[Literal["vector_store"]] = None
+ """Type of the object"""
diff --git a/src/mixedbread/types/vector_stores/file_search_params.py b/src/mixedbread/types/vector_stores/file_search_params.py
index d7569c39..c34d7611 100644
--- a/src/mixedbread/types/vector_stores/file_search_params.py
+++ b/src/mixedbread/types/vector_stores/file_search_params.py
@@ -6,9 +6,8 @@
from typing_extensions import Required, TypeAlias, TypedDict
from ..shared_params.search_filter_condition import SearchFilterCondition
-from ..vector_store_file_search_options_param import VectorStoreFileSearchOptionsParam
-__all__ = ["FileSearchParams", "Filters", "FiltersUnionMember2"]
+__all__ = ["FileSearchParams", "Filters", "FiltersUnionMember2", "SearchOptions"]
class FileSearchParams(TypedDict, total=False):
@@ -24,7 +23,7 @@ class FileSearchParams(TypedDict, total=False):
filters: Optional[Filters]
"""Optional filter conditions"""
- search_options: VectorStoreFileSearchOptionsParam
+ search_options: SearchOptions
"""Search configuration options"""
@@ -32,4 +31,22 @@ class FileSearchParams(TypedDict, total=False):
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]
+
+class SearchOptions(TypedDict, total=False):
+ score_threshold: float
+ """Minimum similarity score threshold"""
+
+ rewrite_query: bool
+ """Whether to rewrite the query"""
+
+ return_metadata: bool
+ """Whether to return file metadata"""
+
+ return_chunks: bool
+ """Whether to return matching text chunks"""
+
+ chunks_per_file: int
+ """Number of chunks to return for each file"""
+
+
from ..shared_params.search_filter import SearchFilter
diff --git a/src/mixedbread/types/vector_stores/scored_vector_store_file.py b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
index 7c702c1c..ee5a2db8 100644
--- a/src/mixedbread/types/vector_stores/scored_vector_store_file.py
+++ b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
@@ -6,15 +6,144 @@
from ..._utils import PropertyInfo
from ..._models import BaseModel
-from ..scored_text_input_chunk import ScoredTextInputChunk
-from ..scored_audio_url_input_chunk import ScoredAudioURLInputChunk
-from ..scored_image_url_input_chunk import ScoredImageURLInputChunk
from ..scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = ["ScoredVectorStoreFile", "Chunk"]
+__all__ = [
+ "ScoredVectorStoreFile",
+ "Chunk",
+ "ChunkScoredTextInputChunk",
+ "ChunkScoredImageURLInputChunk",
+ "ChunkScoredImageURLInputChunkImageURL",
+ "ChunkScoredAudioURLInputChunk",
+ "ChunkScoredAudioURLInputChunkAudioURL",
+]
+
+
+class ChunkScoredTextInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["text"]] = None
+ """Input type identifier"""
+
+ text: str
+ """Text content to process"""
+
+
+class ChunkScoredImageURLInputChunkImageURL(BaseModel):
+ url: str
+ """The image URL. Can be either a URL or a Data URI."""
+
+
+class ChunkScoredImageURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["image_url"]] = None
+ """Input type identifier"""
+
+ image_url: ChunkScoredImageURLInputChunkImageURL
+ """The image input specification."""
+
+ ocr_text: Optional[str] = None
+ """ocr text of the image"""
+
+ summary: Optional[str] = None
+ """summary of the image"""
+
+
+class ChunkScoredAudioURLInputChunkAudioURL(BaseModel):
+ url: str
+ """The audio URL. Can be either a URL or a Data URI."""
+
+
+class ChunkScoredAudioURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["audio_url"]] = None
+ """Input type identifier"""
+
+ audio_url: ChunkScoredAudioURLInputChunkAudioURL
+ """The audio input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the audio"""
+
+ summary: Optional[str] = None
+ """summary of the audio"""
+
Chunk: TypeAlias = Annotated[
- Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
+ Union[
+ ChunkScoredTextInputChunk,
+ ChunkScoredImageURLInputChunk,
+ ChunkScoredAudioURLInputChunk,
+ ScoredVideoURLInputChunk,
+ ],
PropertyInfo(discriminator="type"),
]
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 4cbe5b96..9c7c2941 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -10,9 +10,12 @@
from mixedbread import Mixedbread, AsyncMixedbread
from tests.utils import assert_matches_type
from mixedbread.types import (
- VectorStore,
+ VectorStoreListResponse,
+ VectorStoreCreateResponse,
VectorStoreDeleteResponse,
VectorStoreSearchResponse,
+ VectorStoreUpdateResponse,
+ VectorStoreRetrieveResponse,
VectorStoreQuestionAnsweringResponse,
)
from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset
@@ -26,7 +29,7 @@ class TestVectorStores:
@parametrize
def test_method_create(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.create()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Mixedbread) -> None:
@@ -40,7 +43,7 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
metadata={},
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
def test_raw_response_create(self, client: Mixedbread) -> None:
@@ -49,7 +52,7 @@ def test_raw_response_create(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Mixedbread) -> None:
@@ -58,7 +61,7 @@ def test_streaming_response_create(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -67,7 +70,7 @@ def test_method_retrieve(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Mixedbread) -> None:
@@ -78,7 +81,7 @@ def test_raw_response_retrieve(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
@parametrize
def test_streaming_response_retrieve(self, client: Mixedbread) -> None:
@@ -89,7 +92,7 @@ def test_streaming_response_retrieve(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -105,7 +108,7 @@ def test_method_update(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Mixedbread) -> None:
@@ -119,7 +122,7 @@ def test_method_update_with_all_params(self, client: Mixedbread) -> None:
},
metadata={},
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
def test_raw_response_update(self, client: Mixedbread) -> None:
@@ -130,7 +133,7 @@ def test_raw_response_update(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Mixedbread) -> None:
@@ -141,7 +144,7 @@ def test_streaming_response_update(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -155,7 +158,7 @@ def test_path_params_update(self, client: Mixedbread) -> None:
@parametrize
def test_method_list(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.list()
- assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Mixedbread) -> None:
@@ -163,7 +166,7 @@ def test_method_list_with_all_params(self, client: Mixedbread) -> None:
limit=1000,
offset=0,
)
- assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
def test_raw_response_list(self, client: Mixedbread) -> None:
@@ -172,7 +175,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Mixedbread) -> None:
@@ -181,7 +184,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -404,7 +407,7 @@ class TestAsyncVectorStores:
@parametrize
async def test_method_create(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.create()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -418,7 +421,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
metadata={},
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
@@ -427,7 +430,7 @@ async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncMixedbread) -> None:
@@ -436,7 +439,7 @@ async def test_streaming_response_create(self, async_client: AsyncMixedbread) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -445,7 +448,7 @@ async def test_method_retrieve(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncMixedbread) -> None:
@@ -456,7 +459,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncMixedbread) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncMixedbread) -> None:
@@ -467,7 +470,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncMixedbread)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -483,7 +486,7 @@ async def test_method_update(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -497,7 +500,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncMixedbread
},
metadata={},
)
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
@@ -508,7 +511,7 @@ async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncMixedbread) -> None:
@@ -519,7 +522,7 @@ async def test_streaming_response_update(self, async_client: AsyncMixedbread) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStore, vector_store, path=["response"])
+ assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -533,7 +536,7 @@ async def test_path_params_update(self, async_client: AsyncMixedbread) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.list()
- assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -541,7 +544,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncMixedbread)
limit=1000,
offset=0,
)
- assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None:
@@ -550,7 +553,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None:
@@ -559,7 +562,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
From 5bfd6a5ca4c7e1f8e71a0e675272f7a5e23f9123 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 12:41:26 +0000
Subject: [PATCH 3/4] feat(api): update via SDK Studio
---
.stats.yml | 2 +-
api.md | 18 ++-
.../resources/vector_stores/vector_stores.py | 59 ++++----
src/mixedbread/types/__init__.py | 13 +-
src/mixedbread/types/expires_after.py | 16 ++
src/mixedbread/types/expires_after_param.py | 15 ++
.../types/scored_audio_url_input_chunk.py | 51 +++++++
.../types/scored_image_url_input_chunk.py | 51 +++++++
.../types/scored_text_input_chunk.py | 40 +++++
...store_list_response.py => vector_store.py} | 13 +-
...vector_store_chunk_search_options_param.py | 18 +++
.../types/vector_store_create_params.py | 16 +-
.../types/vector_store_create_response.py | 75 ----------
.../vector_store_question_answering_params.py | 16 +-
...ector_store_question_answering_response.py | 141 +-----------------
.../types/vector_store_retrieve_response.py | 75 ----------
.../types/vector_store_search_params.py | 17 +--
.../types/vector_store_search_response.py | 136 +----------------
.../types/vector_store_update_params.py | 16 +-
.../types/vector_store_update_response.py | 75 ----------
.../vector_stores/scored_vector_store_file.py | 139 +----------------
tests/api_resources/test_vector_stores.py | 65 ++++----
22 files changed, 306 insertions(+), 761 deletions(-)
create mode 100644 src/mixedbread/types/expires_after.py
create mode 100644 src/mixedbread/types/expires_after_param.py
create mode 100644 src/mixedbread/types/scored_audio_url_input_chunk.py
create mode 100644 src/mixedbread/types/scored_image_url_input_chunk.py
create mode 100644 src/mixedbread/types/scored_text_input_chunk.py
rename src/mixedbread/types/{vector_store_list_response.py => vector_store.py} (84%)
create mode 100644 src/mixedbread/types/vector_store_chunk_search_options_param.py
delete mode 100644 src/mixedbread/types/vector_store_create_response.py
delete mode 100644 src/mixedbread/types/vector_store_retrieve_response.py
delete mode 100644 src/mixedbread/types/vector_store_update_response.py
diff --git a/.stats.yml b/.stats.yml
index d7063b0f..71c5ffa2 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-82c2c1c322149cd73b2e8e45f475919b941752a89e74464ccecd1aee9352e9be.yml
openapi_spec_hash: 07482ed86f5ccf7b480c514d6d5ebb15
-config_hash: a3a88b6c5d74153fc5e19da6d8509bf7
+config_hash: 167171738605c297aa5e8bc73abc66e3
diff --git a/api.md b/api.md
index 23c225b0..ff98c770 100644
--- a/api.md
+++ b/api.md
@@ -30,11 +30,13 @@ Types:
```python
from mixedbread.types import (
+ ExpiresAfter,
+ ScoredAudioURLInputChunk,
+ ScoredImageURLInputChunk,
+ ScoredTextInputChunk,
ScoredVideoURLInputChunk,
- VectorStoreCreateResponse,
- VectorStoreRetrieveResponse,
- VectorStoreUpdateResponse,
- VectorStoreListResponse,
+ VectorStore,
+ VectorStoreChunkSearchOptions,
VectorStoreDeleteResponse,
VectorStoreQuestionAnsweringResponse,
VectorStoreSearchResponse,
@@ -43,10 +45,10 @@ from mixedbread.types import (
Methods:
-- client.vector_stores.create(\*\*params) -> VectorStoreCreateResponse
-- client.vector_stores.retrieve(vector_store_id) -> VectorStoreRetrieveResponse
-- client.vector_stores.update(vector_store_id, \*\*params) -> VectorStoreUpdateResponse
-- client.vector_stores.list(\*\*params) -> SyncLimitOffset[VectorStoreListResponse]
+- client.vector_stores.create(\*\*params) -> VectorStore
+- client.vector_stores.retrieve(vector_store_id) -> VectorStore
+- client.vector_stores.update(vector_store_id, \*\*params) -> VectorStore
+- client.vector_stores.list(\*\*params) -> SyncLimitOffset[VectorStore]
- client.vector_stores.delete(vector_store_id) -> VectorStoreDeleteResponse
- client.vector_stores.question_answering(\*\*params) -> VectorStoreQuestionAnsweringResponse
- client.vector_stores.search(\*\*params) -> VectorStoreSearchResponse
diff --git a/src/mixedbread/resources/vector_stores/vector_stores.py b/src/mixedbread/resources/vector_stores/vector_stores.py
index 9ca63f0d..18b25941 100644
--- a/src/mixedbread/resources/vector_stores/vector_stores.py
+++ b/src/mixedbread/resources/vector_stores/vector_stores.py
@@ -33,12 +33,11 @@
)
from ...pagination import SyncLimitOffset, AsyncLimitOffset
from ..._base_client import AsyncPaginator, make_request_options
-from ...types.vector_store_list_response import VectorStoreListResponse
-from ...types.vector_store_create_response import VectorStoreCreateResponse
+from ...types.vector_store import VectorStore
+from ...types.expires_after_param import ExpiresAfterParam
from ...types.vector_store_delete_response import VectorStoreDeleteResponse
from ...types.vector_store_search_response import VectorStoreSearchResponse
-from ...types.vector_store_update_response import VectorStoreUpdateResponse
-from ...types.vector_store_retrieve_response import VectorStoreRetrieveResponse
+from ...types.vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
from ...types.vector_store_question_answering_response import VectorStoreQuestionAnsweringResponse
__all__ = ["VectorStoresResource", "AsyncVectorStoresResource"]
@@ -73,7 +72,7 @@ def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[vector_store_create_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -82,7 +81,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreCreateResponse:
+ ) -> VectorStore:
"""
Create a new vector store.
@@ -125,7 +124,7 @@ def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreCreateResponse,
+ cast_to=VectorStore,
)
def retrieve(
@@ -138,7 +137,7 @@ def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreRetrieveResponse:
+ ) -> VectorStore:
"""
Get a vector store by ID.
@@ -164,7 +163,7 @@ def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreRetrieveResponse,
+ cast_to=VectorStore,
)
def update(
@@ -173,7 +172,7 @@ def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -181,7 +180,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreUpdateResponse:
+ ) -> VectorStore:
"""
Update a vector store by ID.
@@ -226,7 +225,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreUpdateResponse,
+ cast_to=VectorStore,
)
def list(
@@ -240,7 +239,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncLimitOffset[VectorStoreListResponse]:
+ ) -> SyncLimitOffset[VectorStore]:
"""
List all vector stores.
@@ -263,7 +262,7 @@ def list(
"""
return self._get_api_list(
"/v1/vector_stores",
- page=SyncLimitOffset[VectorStoreListResponse],
+ page=SyncLimitOffset[VectorStore],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -277,7 +276,7 @@ def list(
vector_store_list_params.VectorStoreListParams,
),
),
- model=VectorStoreListResponse,
+ model=VectorStore,
)
def delete(
@@ -326,7 +325,7 @@ def question_answering(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_question_answering_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: vector_store_question_answering_params.SearchOptions | NotGiven = NOT_GIVEN,
+ search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
qa_options: vector_store_question_answering_params.QaOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -391,7 +390,7 @@ def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: vector_store_search_params.SearchOptions | NotGiven = NOT_GIVEN,
+ search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -483,7 +482,7 @@ async def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[vector_store_create_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -492,7 +491,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreCreateResponse:
+ ) -> VectorStore:
"""
Create a new vector store.
@@ -535,7 +534,7 @@ async def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreCreateResponse,
+ cast_to=VectorStore,
)
async def retrieve(
@@ -548,7 +547,7 @@ async def retrieve(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreRetrieveResponse:
+ ) -> VectorStore:
"""
Get a vector store by ID.
@@ -574,7 +573,7 @@ async def retrieve(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreRetrieveResponse,
+ cast_to=VectorStore,
)
async def update(
@@ -583,7 +582,7 @@ async def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
- expires_after: Optional[vector_store_update_params.ExpiresAfter] | NotGiven = NOT_GIVEN,
+ expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -591,7 +590,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> VectorStoreUpdateResponse:
+ ) -> VectorStore:
"""
Update a vector store by ID.
@@ -636,7 +635,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=VectorStoreUpdateResponse,
+ cast_to=VectorStore,
)
def list(
@@ -650,7 +649,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[VectorStoreListResponse, AsyncLimitOffset[VectorStoreListResponse]]:
+ ) -> AsyncPaginator[VectorStore, AsyncLimitOffset[VectorStore]]:
"""
List all vector stores.
@@ -673,7 +672,7 @@ def list(
"""
return self._get_api_list(
"/v1/vector_stores",
- page=AsyncLimitOffset[VectorStoreListResponse],
+ page=AsyncLimitOffset[VectorStore],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -687,7 +686,7 @@ def list(
vector_store_list_params.VectorStoreListParams,
),
),
- model=VectorStoreListResponse,
+ model=VectorStore,
)
async def delete(
@@ -736,7 +735,7 @@ async def question_answering(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_question_answering_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: vector_store_question_answering_params.SearchOptions | NotGiven = NOT_GIVEN,
+ search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
stream: bool | NotGiven = NOT_GIVEN,
qa_options: vector_store_question_answering_params.QaOptions | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -801,7 +800,7 @@ async def search(
vector_store_ids: List[str],
top_k: int | NotGiven = NOT_GIVEN,
filters: Optional[vector_store_search_params.Filters] | NotGiven = NOT_GIVEN,
- search_options: vector_store_search_params.SearchOptions | NotGiven = NOT_GIVEN,
+ search_options: VectorStoreChunkSearchOptionsParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/mixedbread/types/__init__.py b/src/mixedbread/types/__init__.py
index d38a6b06..56f206a5 100644
--- a/src/mixedbread/types/__init__.py
+++ b/src/mixedbread/types/__init__.py
@@ -8,6 +8,8 @@
from .data_source import DataSource as DataSource
from .file_object import FileObject as FileObject
from .object_type import ObjectType as ObjectType
+from .vector_store import VectorStore as VectorStore
+from .expires_after import ExpiresAfter as ExpiresAfter
from .info_response import InfoResponse as InfoResponse
from .api_key_created import APIKeyCreated as APIKeyCreated
from .encoding_format import EncodingFormat as EncodingFormat
@@ -18,6 +20,7 @@
from .file_update_params import FileUpdateParams as FileUpdateParams
from .api_key_list_params import APIKeyListParams as APIKeyListParams
from .client_embed_params import ClientEmbedParams as ClientEmbedParams
+from .expires_after_param import ExpiresAfterParam as ExpiresAfterParam
from .client_rerank_params import ClientRerankParams as ClientRerankParams
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
from .api_key_create_params import APIKeyCreateParams as APIKeyCreateParams
@@ -25,6 +28,7 @@
from .api_key_delete_response import APIKeyDeleteResponse as APIKeyDeleteResponse
from .data_source_list_params import DataSourceListParams as DataSourceListParams
from .embedding_create_params import EmbeddingCreateParams as EmbeddingCreateParams
+from .scored_text_input_chunk import ScoredTextInputChunk as ScoredTextInputChunk
from .multi_encoding_embedding import MultiEncodingEmbedding as MultiEncodingEmbedding
from .vector_store_list_params import VectorStoreListParams as VectorStoreListParams
from .data_source_create_params import DataSourceCreateParams as DataSourceCreateParams
@@ -32,20 +36,21 @@
from .data_source_update_params import DataSourceUpdateParams as DataSourceUpdateParams
from .embedding_create_response import EmbeddingCreateResponse as EmbeddingCreateResponse
from .vector_store_create_params import VectorStoreCreateParams as VectorStoreCreateParams
-from .vector_store_list_response import VectorStoreListResponse as VectorStoreListResponse
from .vector_store_search_params import VectorStoreSearchParams as VectorStoreSearchParams
from .vector_store_update_params import VectorStoreUpdateParams as VectorStoreUpdateParams
from .data_source_delete_response import DataSourceDeleteResponse as DataSourceDeleteResponse
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk as ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk as ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk as ScoredVideoURLInputChunk
-from .vector_store_create_response import VectorStoreCreateResponse as VectorStoreCreateResponse
from .vector_store_delete_response import VectorStoreDeleteResponse as VectorStoreDeleteResponse
from .vector_store_search_response import VectorStoreSearchResponse as VectorStoreSearchResponse
-from .vector_store_update_response import VectorStoreUpdateResponse as VectorStoreUpdateResponse
-from .vector_store_retrieve_response import VectorStoreRetrieveResponse as VectorStoreRetrieveResponse
from .data_source_oauth2_params_param import DataSourceOauth2ParamsParam as DataSourceOauth2ParamsParam
from .vector_store_question_answering_params import (
VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams,
)
+from .vector_store_chunk_search_options_param import (
+ VectorStoreChunkSearchOptionsParam as VectorStoreChunkSearchOptionsParam,
+)
from .vector_store_question_answering_response import (
VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
)
diff --git a/src/mixedbread/types/expires_after.py b/src/mixedbread/types/expires_after.py
new file mode 100644
index 00000000..8550ad0a
--- /dev/null
+++ b/src/mixedbread/types/expires_after.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ExpiresAfter"]
+
+
+class ExpiresAfter(BaseModel):
+ anchor: Optional[Literal["last_active_at"]] = None
+ """Anchor date for the expiration policy"""
+
+ days: Optional[int] = None
+ """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/expires_after_param.py b/src/mixedbread/types/expires_after_param.py
new file mode 100644
index 00000000..e7b4bee0
--- /dev/null
+++ b/src/mixedbread/types/expires_after_param.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["ExpiresAfterParam"]
+
+
+class ExpiresAfterParam(TypedDict, total=False):
+ anchor: Literal["last_active_at"]
+ """Anchor date for the expiration policy"""
+
+ days: int
+ """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py
new file mode 100644
index 00000000..b514f1bd
--- /dev/null
+++ b/src/mixedbread/types/scored_audio_url_input_chunk.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredAudioURLInputChunk", "AudioURL"]
+
+
+class AudioURL(BaseModel):
+ url: str
+ """The audio URL. Can be either a URL or a Data URI."""
+
+
+class ScoredAudioURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["audio_url"]] = None
+ """Input type identifier"""
+
+ audio_url: AudioURL
+ """The audio input specification."""
+
+ transcription: Optional[str] = None
+ """speech recognition (sr) text of the audio"""
+
+ summary: Optional[str] = None
+ """summary of the audio"""
diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py
new file mode 100644
index 00000000..ec6ba9dd
--- /dev/null
+++ b/src/mixedbread/types/scored_image_url_input_chunk.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredImageURLInputChunk", "ImageURL"]
+
+
+class ImageURL(BaseModel):
+ url: str
+ """The image URL. Can be either a URL or a Data URI."""
+
+
+class ScoredImageURLInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["image_url"]] = None
+ """Input type identifier"""
+
+ image_url: ImageURL
+ """The image input specification."""
+
+ ocr_text: Optional[str] = None
+ """ocr text of the image"""
+
+ summary: Optional[str] = None
+ """summary of the image"""
diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py
new file mode 100644
index 00000000..42870062
--- /dev/null
+++ b/src/mixedbread/types/scored_text_input_chunk.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ScoredTextInputChunk"]
+
+
+class ScoredTextInputChunk(BaseModel):
+ chunk_index: int
+ """position of the chunk in a file"""
+
+ mime_type: Optional[str] = None
+ """mime type of the chunk"""
+
+ model: Optional[str] = None
+ """model used for this chunk"""
+
+ score: float
+ """score of the chunk"""
+
+ file_id: str
+ """file id"""
+
+ filename: str
+ """filename"""
+
+ vector_store_id: str
+ """vector store id"""
+
+ metadata: Optional[object] = None
+ """file metadata"""
+
+ type: Optional[Literal["text"]] = None
+ """Input type identifier"""
+
+ text: str
+ """Text content to process"""
diff --git a/src/mixedbread/types/vector_store_list_response.py b/src/mixedbread/types/vector_store.py
similarity index 84%
rename from src/mixedbread/types/vector_store_list_response.py
rename to src/mixedbread/types/vector_store.py
index 4d4b2ded..65cb0ede 100644
--- a/src/mixedbread/types/vector_store_list_response.py
+++ b/src/mixedbread/types/vector_store.py
@@ -5,8 +5,9 @@
from typing_extensions import Literal
from .._models import BaseModel
+from .expires_after import ExpiresAfter
-__all__ = ["VectorStoreListResponse", "FileCounts", "ExpiresAfter"]
+__all__ = ["VectorStore", "FileCounts"]
class FileCounts(BaseModel):
@@ -26,15 +27,7 @@ class FileCounts(BaseModel):
"""Total number of files"""
-class ExpiresAfter(BaseModel):
- anchor: Optional[Literal["last_active_at"]] = None
- """Anchor date for the expiration policy"""
-
- days: Optional[int] = None
- """Number of days after which the vector store expires"""
-
-
-class VectorStoreListResponse(BaseModel):
+class VectorStore(BaseModel):
id: str
"""Unique identifier for the vector store"""
diff --git a/src/mixedbread/types/vector_store_chunk_search_options_param.py b/src/mixedbread/types/vector_store_chunk_search_options_param.py
new file mode 100644
index 00000000..a2396bec
--- /dev/null
+++ b/src/mixedbread/types/vector_store_chunk_search_options_param.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["VectorStoreChunkSearchOptionsParam"]
+
+
+class VectorStoreChunkSearchOptionsParam(TypedDict, total=False):
+ score_threshold: float
+ """Minimum similarity score threshold"""
+
+ rewrite_query: bool
+ """Whether to rewrite the query"""
+
+ return_metadata: bool
+ """Whether to return file metadata"""
diff --git a/src/mixedbread/types/vector_store_create_params.py b/src/mixedbread/types/vector_store_create_params.py
index 31fc3526..3013c59c 100644
--- a/src/mixedbread/types/vector_store_create_params.py
+++ b/src/mixedbread/types/vector_store_create_params.py
@@ -3,9 +3,11 @@
from __future__ import annotations
from typing import List, Optional
-from typing_extensions import Literal, TypedDict
+from typing_extensions import TypedDict
-__all__ = ["VectorStoreCreateParams", "ExpiresAfter"]
+from .expires_after_param import ExpiresAfterParam
+
+__all__ = ["VectorStoreCreateParams"]
class VectorStoreCreateParams(TypedDict, total=False):
@@ -15,7 +17,7 @@ class VectorStoreCreateParams(TypedDict, total=False):
description: Optional[str]
"""Description of the vector store"""
- expires_after: Optional[ExpiresAfter]
+ expires_after: Optional[ExpiresAfterParam]
"""Represents an expiration policy for a vector store."""
metadata: object
@@ -23,11 +25,3 @@ class VectorStoreCreateParams(TypedDict, total=False):
file_ids: Optional[List[str]]
"""Optional list of file IDs"""
-
-
-class ExpiresAfter(TypedDict, total=False):
- anchor: Literal["last_active_at"]
- """Anchor date for the expiration policy"""
-
- days: int
- """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/vector_store_create_response.py b/src/mixedbread/types/vector_store_create_response.py
deleted file mode 100644
index 69946db2..00000000
--- a/src/mixedbread/types/vector_store_create_response.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["VectorStoreCreateResponse", "FileCounts", "ExpiresAfter"]
-
-
-class FileCounts(BaseModel):
- in_progress: Optional[int] = None
- """Number of files currently being processed"""
-
- cancelled: Optional[int] = None
- """Number of files whose processing was cancelled"""
-
- completed: Optional[int] = None
- """Number of successfully processed files"""
-
- failed: Optional[int] = None
- """Number of files that failed processing"""
-
- total: Optional[int] = None
- """Total number of files"""
-
-
-class ExpiresAfter(BaseModel):
- anchor: Optional[Literal["last_active_at"]] = None
- """Anchor date for the expiration policy"""
-
- days: Optional[int] = None
- """Number of days after which the vector store expires"""
-
-
-class VectorStoreCreateResponse(BaseModel):
- id: str
- """Unique identifier for the vector store"""
-
- name: str
- """Name of the vector store"""
-
- description: Optional[str] = None
- """Detailed description of the vector store's purpose and contents"""
-
- metadata: Optional[object] = None
- """Additional metadata associated with the vector store"""
-
- file_counts: Optional[FileCounts] = None
- """Counts of files in different states"""
-
- expires_after: Optional[ExpiresAfter] = None
- """Represents an expiration policy for a vector store."""
-
- status: Optional[Literal["expired", "in_progress", "completed"]] = None
- """Processing status of the vector store"""
-
- created_at: datetime
- """Timestamp when the vector store was created"""
-
- updated_at: datetime
- """Timestamp when the vector store was last updated"""
-
- last_active_at: Optional[datetime] = None
- """Timestamp when the vector store was last used"""
-
- usage_bytes: Optional[int] = None
- """Total storage usage in bytes"""
-
- expires_at: Optional[datetime] = None
- """Optional expiration timestamp for the vector store"""
-
- object: Optional[Literal["vector_store"]] = None
- """Type of the object"""
diff --git a/src/mixedbread/types/vector_store_question_answering_params.py b/src/mixedbread/types/vector_store_question_answering_params.py
index 16083394..abb7919b 100644
--- a/src/mixedbread/types/vector_store_question_answering_params.py
+++ b/src/mixedbread/types/vector_store_question_answering_params.py
@@ -6,8 +6,9 @@
from typing_extensions import Required, TypeAlias, TypedDict
from .shared_params.search_filter_condition import SearchFilterCondition
+from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
-__all__ = ["VectorStoreQuestionAnsweringParams", "Filters", "FiltersUnionMember2", "SearchOptions", "QaOptions"]
+__all__ = ["VectorStoreQuestionAnsweringParams", "Filters", "FiltersUnionMember2", "QaOptions"]
class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
@@ -26,7 +27,7 @@ class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
filters: Optional[Filters]
"""Optional filter conditions"""
- search_options: SearchOptions
+ search_options: VectorStoreChunkSearchOptionsParam
"""Search configuration options"""
stream: bool
@@ -41,17 +42,6 @@ class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]
-class SearchOptions(TypedDict, total=False):
- score_threshold: float
- """Minimum similarity score threshold"""
-
- rewrite_query: bool
- """Whether to rewrite the query"""
-
- return_metadata: bool
- """Whether to return file metadata"""
-
-
class QaOptions(TypedDict, total=False):
cite: bool
"""Whether to use citations"""
diff --git a/src/mixedbread/types/vector_store_question_answering_response.py b/src/mixedbread/types/vector_store_question_answering_response.py
index 71240d6f..2a477a87 100644
--- a/src/mixedbread/types/vector_store_question_answering_response.py
+++ b/src/mixedbread/types/vector_store_question_answering_response.py
@@ -1,148 +1,19 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Annotated, TypeAlias
from .._utils import PropertyInfo
from .._models import BaseModel
+from .scored_text_input_chunk import ScoredTextInputChunk
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = [
- "VectorStoreQuestionAnsweringResponse",
- "Source",
- "SourceScoredTextInputChunk",
- "SourceScoredImageURLInputChunk",
- "SourceScoredImageURLInputChunkImageURL",
- "SourceScoredAudioURLInputChunk",
- "SourceScoredAudioURLInputChunkAudioURL",
-]
-
-
-class SourceScoredTextInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["text"]] = None
- """Input type identifier"""
-
- text: str
- """Text content to process"""
-
-
-class SourceScoredImageURLInputChunkImageURL(BaseModel):
- url: str
- """The image URL. Can be either a URL or a Data URI."""
-
-
-class SourceScoredImageURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["image_url"]] = None
- """Input type identifier"""
-
- image_url: SourceScoredImageURLInputChunkImageURL
- """The image input specification."""
-
- ocr_text: Optional[str] = None
- """ocr text of the image"""
-
- summary: Optional[str] = None
- """summary of the image"""
-
-
-class SourceScoredAudioURLInputChunkAudioURL(BaseModel):
- url: str
- """The audio URL. Can be either a URL or a Data URI."""
-
-
-class SourceScoredAudioURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["audio_url"]] = None
- """Input type identifier"""
-
- audio_url: SourceScoredAudioURLInputChunkAudioURL
- """The audio input specification."""
-
- transcription: Optional[str] = None
- """speech recognition (sr) text of the audio"""
-
- summary: Optional[str] = None
- """summary of the audio"""
-
+__all__ = ["VectorStoreQuestionAnsweringResponse", "Source"]
Source: TypeAlias = Annotated[
- Union[
- SourceScoredTextInputChunk,
- SourceScoredImageURLInputChunk,
- SourceScoredAudioURLInputChunk,
- ScoredVideoURLInputChunk,
- ],
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
PropertyInfo(discriminator="type"),
]
diff --git a/src/mixedbread/types/vector_store_retrieve_response.py b/src/mixedbread/types/vector_store_retrieve_response.py
deleted file mode 100644
index 02cffa65..00000000
--- a/src/mixedbread/types/vector_store_retrieve_response.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["VectorStoreRetrieveResponse", "FileCounts", "ExpiresAfter"]
-
-
-class FileCounts(BaseModel):
- in_progress: Optional[int] = None
- """Number of files currently being processed"""
-
- cancelled: Optional[int] = None
- """Number of files whose processing was cancelled"""
-
- completed: Optional[int] = None
- """Number of successfully processed files"""
-
- failed: Optional[int] = None
- """Number of files that failed processing"""
-
- total: Optional[int] = None
- """Total number of files"""
-
-
-class ExpiresAfter(BaseModel):
- anchor: Optional[Literal["last_active_at"]] = None
- """Anchor date for the expiration policy"""
-
- days: Optional[int] = None
- """Number of days after which the vector store expires"""
-
-
-class VectorStoreRetrieveResponse(BaseModel):
- id: str
- """Unique identifier for the vector store"""
-
- name: str
- """Name of the vector store"""
-
- description: Optional[str] = None
- """Detailed description of the vector store's purpose and contents"""
-
- metadata: Optional[object] = None
- """Additional metadata associated with the vector store"""
-
- file_counts: Optional[FileCounts] = None
- """Counts of files in different states"""
-
- expires_after: Optional[ExpiresAfter] = None
- """Represents an expiration policy for a vector store."""
-
- status: Optional[Literal["expired", "in_progress", "completed"]] = None
- """Processing status of the vector store"""
-
- created_at: datetime
- """Timestamp when the vector store was created"""
-
- updated_at: datetime
- """Timestamp when the vector store was last updated"""
-
- last_active_at: Optional[datetime] = None
- """Timestamp when the vector store was last used"""
-
- usage_bytes: Optional[int] = None
- """Total storage usage in bytes"""
-
- expires_at: Optional[datetime] = None
- """Optional expiration timestamp for the vector store"""
-
- object: Optional[Literal["vector_store"]] = None
- """Type of the object"""
diff --git a/src/mixedbread/types/vector_store_search_params.py b/src/mixedbread/types/vector_store_search_params.py
index 7a28385c..e0edc1bb 100644
--- a/src/mixedbread/types/vector_store_search_params.py
+++ b/src/mixedbread/types/vector_store_search_params.py
@@ -6,8 +6,9 @@
from typing_extensions import Required, TypeAlias, TypedDict
from .shared_params.search_filter_condition import SearchFilterCondition
+from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam
-__all__ = ["VectorStoreSearchParams", "Filters", "FiltersUnionMember2", "SearchOptions"]
+__all__ = ["VectorStoreSearchParams", "Filters", "FiltersUnionMember2"]
class VectorStoreSearchParams(TypedDict, total=False):
@@ -23,7 +24,7 @@ class VectorStoreSearchParams(TypedDict, total=False):
filters: Optional[Filters]
"""Optional filter conditions"""
- search_options: SearchOptions
+ search_options: VectorStoreChunkSearchOptionsParam
"""Search configuration options"""
@@ -31,16 +32,4 @@ class VectorStoreSearchParams(TypedDict, total=False):
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]
-
-class SearchOptions(TypedDict, total=False):
- score_threshold: float
- """Minimum similarity score threshold"""
-
- rewrite_query: bool
- """Whether to rewrite the query"""
-
- return_metadata: bool
- """Whether to return file metadata"""
-
-
from .shared_params.search_filter import SearchFilter
diff --git a/src/mixedbread/types/vector_store_search_response.py b/src/mixedbread/types/vector_store_search_response.py
index c1f8e788..50143c9f 100644
--- a/src/mixedbread/types/vector_store_search_response.py
+++ b/src/mixedbread/types/vector_store_search_response.py
@@ -5,141 +5,15 @@
from .._utils import PropertyInfo
from .._models import BaseModel
+from .scored_text_input_chunk import ScoredTextInputChunk
+from .scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from .scored_image_url_input_chunk import ScoredImageURLInputChunk
from .scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = [
- "VectorStoreSearchResponse",
- "Data",
- "DataScoredTextInputChunk",
- "DataScoredImageURLInputChunk",
- "DataScoredImageURLInputChunkImageURL",
- "DataScoredAudioURLInputChunk",
- "DataScoredAudioURLInputChunkAudioURL",
-]
-
-
-class DataScoredTextInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["text"]] = None
- """Input type identifier"""
-
- text: str
- """Text content to process"""
-
-
-class DataScoredImageURLInputChunkImageURL(BaseModel):
- url: str
- """The image URL. Can be either a URL or a Data URI."""
-
-
-class DataScoredImageURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["image_url"]] = None
- """Input type identifier"""
-
- image_url: DataScoredImageURLInputChunkImageURL
- """The image input specification."""
-
- ocr_text: Optional[str] = None
- """ocr text of the image"""
-
- summary: Optional[str] = None
- """summary of the image"""
-
-
-class DataScoredAudioURLInputChunkAudioURL(BaseModel):
- url: str
- """The audio URL. Can be either a URL or a Data URI."""
-
-
-class DataScoredAudioURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["audio_url"]] = None
- """Input type identifier"""
-
- audio_url: DataScoredAudioURLInputChunkAudioURL
- """The audio input specification."""
-
- transcription: Optional[str] = None
- """speech recognition (sr) text of the audio"""
-
- summary: Optional[str] = None
- """summary of the audio"""
-
+__all__ = ["VectorStoreSearchResponse", "Data"]
Data: TypeAlias = Annotated[
- Union[
- DataScoredTextInputChunk, DataScoredImageURLInputChunk, DataScoredAudioURLInputChunk, ScoredVideoURLInputChunk
- ],
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
PropertyInfo(discriminator="type"),
]
diff --git a/src/mixedbread/types/vector_store_update_params.py b/src/mixedbread/types/vector_store_update_params.py
index 99c6a113..d8e6a83b 100644
--- a/src/mixedbread/types/vector_store_update_params.py
+++ b/src/mixedbread/types/vector_store_update_params.py
@@ -3,9 +3,11 @@
from __future__ import annotations
from typing import Optional
-from typing_extensions import Literal, TypedDict
+from typing_extensions import TypedDict
-__all__ = ["VectorStoreUpdateParams", "ExpiresAfter"]
+from .expires_after_param import ExpiresAfterParam
+
+__all__ = ["VectorStoreUpdateParams"]
class VectorStoreUpdateParams(TypedDict, total=False):
@@ -15,16 +17,8 @@ class VectorStoreUpdateParams(TypedDict, total=False):
description: Optional[str]
"""New description"""
- expires_after: Optional[ExpiresAfter]
+ expires_after: Optional[ExpiresAfterParam]
"""Represents an expiration policy for a vector store."""
metadata: object
"""Optional metadata key-value pairs"""
-
-
-class ExpiresAfter(TypedDict, total=False):
- anchor: Literal["last_active_at"]
- """Anchor date for the expiration policy"""
-
- days: int
- """Number of days after which the vector store expires"""
diff --git a/src/mixedbread/types/vector_store_update_response.py b/src/mixedbread/types/vector_store_update_response.py
deleted file mode 100644
index 532d9082..00000000
--- a/src/mixedbread/types/vector_store_update_response.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["VectorStoreUpdateResponse", "FileCounts", "ExpiresAfter"]
-
-
-class FileCounts(BaseModel):
- in_progress: Optional[int] = None
- """Number of files currently being processed"""
-
- cancelled: Optional[int] = None
- """Number of files whose processing was cancelled"""
-
- completed: Optional[int] = None
- """Number of successfully processed files"""
-
- failed: Optional[int] = None
- """Number of files that failed processing"""
-
- total: Optional[int] = None
- """Total number of files"""
-
-
-class ExpiresAfter(BaseModel):
- anchor: Optional[Literal["last_active_at"]] = None
- """Anchor date for the expiration policy"""
-
- days: Optional[int] = None
- """Number of days after which the vector store expires"""
-
-
-class VectorStoreUpdateResponse(BaseModel):
- id: str
- """Unique identifier for the vector store"""
-
- name: str
- """Name of the vector store"""
-
- description: Optional[str] = None
- """Detailed description of the vector store's purpose and contents"""
-
- metadata: Optional[object] = None
- """Additional metadata associated with the vector store"""
-
- file_counts: Optional[FileCounts] = None
- """Counts of files in different states"""
-
- expires_after: Optional[ExpiresAfter] = None
- """Represents an expiration policy for a vector store."""
-
- status: Optional[Literal["expired", "in_progress", "completed"]] = None
- """Processing status of the vector store"""
-
- created_at: datetime
- """Timestamp when the vector store was created"""
-
- updated_at: datetime
- """Timestamp when the vector store was last updated"""
-
- last_active_at: Optional[datetime] = None
- """Timestamp when the vector store was last used"""
-
- usage_bytes: Optional[int] = None
- """Total storage usage in bytes"""
-
- expires_at: Optional[datetime] = None
- """Optional expiration timestamp for the vector store"""
-
- object: Optional[Literal["vector_store"]] = None
- """Type of the object"""
diff --git a/src/mixedbread/types/vector_stores/scored_vector_store_file.py b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
index ee5a2db8..7c702c1c 100644
--- a/src/mixedbread/types/vector_stores/scored_vector_store_file.py
+++ b/src/mixedbread/types/vector_stores/scored_vector_store_file.py
@@ -6,144 +6,15 @@
from ..._utils import PropertyInfo
from ..._models import BaseModel
+from ..scored_text_input_chunk import ScoredTextInputChunk
+from ..scored_audio_url_input_chunk import ScoredAudioURLInputChunk
+from ..scored_image_url_input_chunk import ScoredImageURLInputChunk
from ..scored_video_url_input_chunk import ScoredVideoURLInputChunk
-__all__ = [
- "ScoredVectorStoreFile",
- "Chunk",
- "ChunkScoredTextInputChunk",
- "ChunkScoredImageURLInputChunk",
- "ChunkScoredImageURLInputChunkImageURL",
- "ChunkScoredAudioURLInputChunk",
- "ChunkScoredAudioURLInputChunkAudioURL",
-]
-
-
-class ChunkScoredTextInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["text"]] = None
- """Input type identifier"""
-
- text: str
- """Text content to process"""
-
-
-class ChunkScoredImageURLInputChunkImageURL(BaseModel):
- url: str
- """The image URL. Can be either a URL or a Data URI."""
-
-
-class ChunkScoredImageURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["image_url"]] = None
- """Input type identifier"""
-
- image_url: ChunkScoredImageURLInputChunkImageURL
- """The image input specification."""
-
- ocr_text: Optional[str] = None
- """ocr text of the image"""
-
- summary: Optional[str] = None
- """summary of the image"""
-
-
-class ChunkScoredAudioURLInputChunkAudioURL(BaseModel):
- url: str
- """The audio URL. Can be either a URL or a Data URI."""
-
-
-class ChunkScoredAudioURLInputChunk(BaseModel):
- chunk_index: int
- """position of the chunk in a file"""
-
- mime_type: Optional[str] = None
- """mime type of the chunk"""
-
- model: Optional[str] = None
- """model used for this chunk"""
-
- score: float
- """score of the chunk"""
-
- file_id: str
- """file id"""
-
- filename: str
- """filename"""
-
- vector_store_id: str
- """vector store id"""
-
- metadata: Optional[object] = None
- """file metadata"""
-
- type: Optional[Literal["audio_url"]] = None
- """Input type identifier"""
-
- audio_url: ChunkScoredAudioURLInputChunkAudioURL
- """The audio input specification."""
-
- transcription: Optional[str] = None
- """speech recognition (sr) text of the audio"""
-
- summary: Optional[str] = None
- """summary of the audio"""
-
+__all__ = ["ScoredVectorStoreFile", "Chunk"]
Chunk: TypeAlias = Annotated[
- Union[
- ChunkScoredTextInputChunk,
- ChunkScoredImageURLInputChunk,
- ChunkScoredAudioURLInputChunk,
- ScoredVideoURLInputChunk,
- ],
+ Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
PropertyInfo(discriminator="type"),
]
diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py
index 9c7c2941..4cbe5b96 100644
--- a/tests/api_resources/test_vector_stores.py
+++ b/tests/api_resources/test_vector_stores.py
@@ -10,12 +10,9 @@
from mixedbread import Mixedbread, AsyncMixedbread
from tests.utils import assert_matches_type
from mixedbread.types import (
- VectorStoreListResponse,
- VectorStoreCreateResponse,
+ VectorStore,
VectorStoreDeleteResponse,
VectorStoreSearchResponse,
- VectorStoreUpdateResponse,
- VectorStoreRetrieveResponse,
VectorStoreQuestionAnsweringResponse,
)
from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset
@@ -29,7 +26,7 @@ class TestVectorStores:
@parametrize
def test_method_create(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.create()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Mixedbread) -> None:
@@ -43,7 +40,7 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
metadata={},
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
)
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_raw_response_create(self, client: Mixedbread) -> None:
@@ -52,7 +49,7 @@ def test_raw_response_create(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Mixedbread) -> None:
@@ -61,7 +58,7 @@ def test_streaming_response_create(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -70,7 +67,7 @@ def test_method_retrieve(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Mixedbread) -> None:
@@ -81,7 +78,7 @@ def test_raw_response_retrieve(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_streaming_response_retrieve(self, client: Mixedbread) -> None:
@@ -92,7 +89,7 @@ def test_streaming_response_retrieve(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -108,7 +105,7 @@ def test_method_update(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Mixedbread) -> None:
@@ -122,7 +119,7 @@ def test_method_update_with_all_params(self, client: Mixedbread) -> None:
},
metadata={},
)
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_raw_response_update(self, client: Mixedbread) -> None:
@@ -133,7 +130,7 @@ def test_raw_response_update(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Mixedbread) -> None:
@@ -144,7 +141,7 @@ def test_streaming_response_update(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -158,7 +155,7 @@ def test_path_params_update(self, client: Mixedbread) -> None:
@parametrize
def test_method_list(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.list()
- assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Mixedbread) -> None:
@@ -166,7 +163,7 @@ def test_method_list_with_all_params(self, client: Mixedbread) -> None:
limit=1000,
offset=0,
)
- assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
def test_raw_response_list(self, client: Mixedbread) -> None:
@@ -175,7 +172,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Mixedbread) -> None:
@@ -184,7 +181,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = response.parse()
- assert_matches_type(SyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -407,7 +404,7 @@ class TestAsyncVectorStores:
@parametrize
async def test_method_create(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.create()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -421,7 +418,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
metadata={},
file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
)
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
@@ -430,7 +427,7 @@ async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncMixedbread) -> None:
@@ -439,7 +436,7 @@ async def test_streaming_response_create(self, async_client: AsyncMixedbread) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreCreateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -448,7 +445,7 @@ async def test_method_retrieve(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncMixedbread) -> None:
@@ -459,7 +456,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncMixedbread) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncMixedbread) -> None:
@@ -470,7 +467,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncMixedbread)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreRetrieveResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -486,7 +483,7 @@ async def test_method_update(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.update(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -500,7 +497,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncMixedbread
},
metadata={},
)
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
@@ -511,7 +508,7 @@ async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncMixedbread) -> None:
@@ -522,7 +519,7 @@ async def test_streaming_response_update(self, async_client: AsyncMixedbread) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(VectorStoreUpdateResponse, vector_store, path=["response"])
+ assert_matches_type(VectorStore, vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -536,7 +533,7 @@ async def test_path_params_update(self, async_client: AsyncMixedbread) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncMixedbread) -> None:
vector_store = await async_client.vector_stores.list()
- assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None:
@@ -544,7 +541,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncMixedbread)
limit=1000,
offset=0,
)
- assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None:
@@ -553,7 +550,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None:
@@ -562,7 +559,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
vector_store = await response.parse()
- assert_matches_type(AsyncLimitOffset[VectorStoreListResponse], vector_store, path=["response"])
+ assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
assert cast(Any, response.is_closed) is True
From c29db8bbfba389554891ab04053756816dbe274d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 12:41:43 +0000
Subject: [PATCH 4/4] release: 0.5.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 10 ++++++++++
pyproject.toml | 2 +-
src/mixedbread/_version.py | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index da59f99e..2aca35ae 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.4.0"
+ ".": "0.5.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 95b6efae..f4dee4fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# Changelog
+## 0.5.0 (2025-05-26)
+
+Full Changelog: [v0.4.0...v0.5.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.4.0...v0.5.0)
+
+### Features
+
+* **api:** update via SDK Studio ([5bfd6a5](https://github.com/mixedbread-ai/mixedbread-python/commit/5bfd6a5ca4c7e1f8e71a0e675272f7a5e23f9123))
+* **api:** update via SDK Studio ([e0b1fc1](https://github.com/mixedbread-ai/mixedbread-python/commit/e0b1fc12231187039ca03302b3a7b3f320fac4aa))
+* **api:** update via SDK Studio ([1977f12](https://github.com/mixedbread-ai/mixedbread-python/commit/1977f125d46011248652cc976f94e9c9585e9dfe))
+
## 0.4.0 (2025-05-26)
Full Changelog: [v0.3.1...v0.4.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.3.1...v0.4.0)
diff --git a/pyproject.toml b/pyproject.toml
index 1b83a9b4..b6e83d86 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "mixedbread"
-version = "0.4.0"
+version = "0.5.0"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py
index 57b9c213..7a42cf4e 100644
--- a/src/mixedbread/_version.py
+++ b/src/mixedbread/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "mixedbread"
-__version__ = "0.4.0" # x-release-please-version
+__version__ = "0.5.0" # x-release-please-version