Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.31.0"
".": "0.32.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 49
configured_endpoints: 61
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-34b8fc657696023cc3a74eee6febe0d2fc0decda668f874bfa42abe6222d8566.yml
openapi_spec_hash: dcd015b362c3fcb4ef449606a8027873
config_hash: a2549e1f1923904c8cee4ea4f5ff58e1
config_hash: 2de40c343cf7b242d5925e3405ee8908
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.32.0 (2025-10-01)

Full Changelog: [v0.31.0...v0.32.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.31.0...v0.32.0)

### Features

* **api:** update via SDK Studio ([cdca00d](https://github.com/mixedbread-ai/mixedbread-python/commit/cdca00d9f31579e66e3992cd08e43aa70a9079d1))

## 0.31.0 (2025-10-01)

Full Changelog: [v0.30.0...v0.31.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.30.0...v0.31.0)
Expand Down
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ client = Mixedbread(
environment="development",
)

vector_store = client.vector_stores.create()
print(vector_store.id)
store = client.stores.create()
print(store.id)
```

While you can provide an `api_key` keyword argument,
Expand All @@ -60,8 +60,8 @@ client = AsyncMixedbread(


async def main() -> None:
vector_store = await client.vector_stores.create()
print(vector_store.id)
store = await client.stores.create()
print(store.id)


asyncio.run(main())
Expand Down Expand Up @@ -93,8 +93,8 @@ async def main() -> None:
api_key="My API Key",
http_client=DefaultAioHttpClient(),
) as client:
vector_store = await client.vector_stores.create()
print(vector_store.id)
store = await client.stores.create()
print(store.id)


asyncio.run(main())
Expand All @@ -120,12 +120,12 @@ from mixedbread import Mixedbread

client = Mixedbread()

all_vector_stores = []
all_stores = []
# Automatically fetches more pages as needed.
for vector_store in client.vector_stores.list():
# Do something with vector_store here
all_vector_stores.append(vector_store)
print(all_vector_stores)
for store in client.stores.list():
# Do something with store here
all_stores.append(store)
print(all_stores)
```

Or, asynchronously:
Expand All @@ -138,11 +138,11 @@ client = AsyncMixedbread()


async def main() -> None:
all_vector_stores = []
all_stores = []
# Iterate through items across all pages, issuing requests as needed.
async for vector_store in client.vector_stores.list():
all_vector_stores.append(vector_store)
print(all_vector_stores)
async for store in client.stores.list():
all_stores.append(store)
print(all_stores)


asyncio.run(main())
Expand All @@ -151,7 +151,7 @@ asyncio.run(main())
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:

```python
first_page = await client.vector_stores.list()
first_page = await client.stores.list()
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
next_page = await first_page.get_next_page()
Expand All @@ -163,11 +163,11 @@ if first_page.has_next_page():
Or just work directly with the returned data:

```python
first_page = await client.vector_stores.list()
first_page = await client.stores.list()

print(f"next page cursor: {first_page.pagination.last_cursor}") # => "next page cursor: ..."
for vector_store in first_page.data:
print(vector_store.id)
for store in first_page.data:
print(store.id)

# Remove `await` for non-async usage.
```
Expand All @@ -181,10 +181,10 @@ from mixedbread import Mixedbread

client = Mixedbread()

vector_store = client.vector_stores.create(
store = client.stores.create(
expires_after={},
)
print(vector_store.expires_after)
print(store.expires_after)
```

## File uploads
Expand Down Expand Up @@ -220,7 +220,7 @@ from mixedbread import Mixedbread
client = Mixedbread()

try:
client.vector_stores.create()
client.stores.create()
except mixedbread.APIConnectionError as e:
print("The server could not be reached")
print(e.__cause__) # an underlying Exception, likely raised within httpx.
Expand Down Expand Up @@ -263,7 +263,7 @@ client = Mixedbread(
)

# Or, configure per-request:
client.with_options(max_retries=5).vector_stores.create()
client.with_options(max_retries=5).stores.create()
```

### Timeouts
Expand All @@ -286,7 +286,7 @@ client = Mixedbread(
)

# Override per-request:
client.with_options(timeout=5.0).vector_stores.create()
client.with_options(timeout=5.0).stores.create()
```

On timeout, an `APITimeoutError` is thrown.
Expand Down Expand Up @@ -327,11 +327,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
from mixedbread import Mixedbread

client = Mixedbread()
response = client.vector_stores.with_raw_response.create()
response = client.stores.with_raw_response.create()
print(response.headers.get('X-My-Header'))

vector_store = response.parse() # get the object that `vector_stores.create()` would have returned
print(vector_store.id)
store = response.parse() # get the object that `stores.create()` would have returned
print(store.id)
```

These methods return an [`APIResponse`](https://github.com/mixedbread-ai/mixedbread-python/tree/main/src/mixedbread/_response.py) object.
Expand All @@ -345,7 +345,7 @@ The above interface eagerly reads the full response body when you make the reque
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.

```python
with client.vector_stores.with_streaming_response.create() as response:
with client.stores.with_streaming_response.create() as response:
print(response.headers.get("X-My-Header"))

for line in response.iter_lines():
Expand Down
47 changes: 47 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,53 @@ Methods:
- <code title="delete /v1/vector_stores/{vector_store_identifier}/files/{file_id}">client.vector_stores.files.<a href="./src/mixedbread/resources/vector_stores/files.py">delete</a>(file_id, \*, vector_store_identifier) -> <a href="./src/mixedbread/types/vector_stores/file_delete_response.py">FileDeleteResponse</a></code>
- <code title="post /v1/vector_stores/files/search">client.vector_stores.files.<a href="./src/mixedbread/resources/vector_stores/files.py">search</a>(\*\*<a href="src/mixedbread/types/vector_stores/file_search_params.py">params</a>) -> <a href="./src/mixedbread/types/vector_stores/file_search_response.py">FileSearchResponse</a></code>

# Stores

Types:

```python
from mixedbread.types import (
Store,
StoreChunkSearchOptions,
StoreDeleteResponse,
StoreQuestionAnsweringResponse,
StoreSearchResponse,
)
```

Methods:

- <code title="post /v1/stores">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">create</a>(\*\*<a href="src/mixedbread/types/store_create_params.py">params</a>) -> <a href="./src/mixedbread/types/store.py">Store</a></code>
- <code title="get /v1/stores/{store_identifier}">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">retrieve</a>(store_identifier) -> <a href="./src/mixedbread/types/store.py">Store</a></code>
- <code title="put /v1/stores/{store_identifier}">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">update</a>(store_identifier, \*\*<a href="src/mixedbread/types/store_update_params.py">params</a>) -> <a href="./src/mixedbread/types/store.py">Store</a></code>
- <code title="get /v1/stores">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">list</a>(\*\*<a href="src/mixedbread/types/store_list_params.py">params</a>) -> <a href="./src/mixedbread/types/store.py">SyncCursor[Store]</a></code>
- <code title="delete /v1/stores/{store_identifier}">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">delete</a>(store_identifier) -> <a href="./src/mixedbread/types/store_delete_response.py">StoreDeleteResponse</a></code>
- <code title="post /v1/stores/question-answering">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">question_answering</a>(\*\*<a href="src/mixedbread/types/store_question_answering_params.py">params</a>) -> <a href="./src/mixedbread/types/store_question_answering_response.py">StoreQuestionAnsweringResponse</a></code>
- <code title="post /v1/stores/search">client.stores.<a href="./src/mixedbread/resources/stores/stores.py">search</a>(\*\*<a href="src/mixedbread/types/store_search_params.py">params</a>) -> <a href="./src/mixedbread/types/store_search_response.py">StoreSearchResponse</a></code>

## Files

Types:

```python
from mixedbread.types.stores import (
ScoredStoreFile,
StoreFileStatus,
StoreFile,
FileListResponse,
FileDeleteResponse,
FileSearchResponse,
)
```

Methods:

- <code title="post /v1/stores/{store_identifier}/files">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">create</a>(store_identifier, \*\*<a href="src/mixedbread/types/stores/file_create_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
- <code title="get /v1/stores/{store_identifier}/files/{file_id}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">retrieve</a>(file_id, \*, store_identifier, \*\*<a href="src/mixedbread/types/stores/file_retrieve_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
- <code title="post /v1/stores/{store_identifier}/files/list">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">list</a>(store_identifier, \*\*<a href="src/mixedbread/types/stores/file_list_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_list_response.py">FileListResponse</a></code>
- <code title="delete /v1/stores/{store_identifier}/files/{file_id}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">delete</a>(file_id, \*, store_identifier) -> <a href="./src/mixedbread/types/stores/file_delete_response.py">FileDeleteResponse</a></code>
- <code title="post /v1/stores/files/search">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">search</a>(\*\*<a href="src/mixedbread/types/stores/file_search_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_search_response.py">FileSearchResponse</a></code>

# Parsing

## Jobs
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mixedbread"
version = "0.31.0"
version = "0.32.0"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 9 additions & 0 deletions src/mixedbread/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
AsyncAPIClient,
make_request_options,
)
from .resources.stores import stores
from .resources.parsing import parsing
from .types.info_response import InfoResponse
from .resources.extractions import extractions
Expand Down Expand Up @@ -77,6 +78,7 @@

class Mixedbread(SyncAPIClient):
vector_stores: vector_stores.VectorStoresResource
stores: stores.StoresResource
parsing: parsing.ParsingResource
files: files.FilesResource
extractions: extractions.ExtractionsResource
Expand Down Expand Up @@ -166,6 +168,7 @@ def __init__(
)

self.vector_stores = vector_stores.VectorStoresResource(self)
self.stores = stores.StoresResource(self)
self.parsing = parsing.ParsingResource(self)
self.files = files.FilesResource(self)
self.extractions = extractions.ExtractionsResource(self)
Expand Down Expand Up @@ -440,6 +443,7 @@ def _make_status_error(

class AsyncMixedbread(AsyncAPIClient):
vector_stores: vector_stores.AsyncVectorStoresResource
stores: stores.AsyncStoresResource
parsing: parsing.AsyncParsingResource
files: files.AsyncFilesResource
extractions: extractions.AsyncExtractionsResource
Expand Down Expand Up @@ -529,6 +533,7 @@ def __init__(
)

self.vector_stores = vector_stores.AsyncVectorStoresResource(self)
self.stores = stores.AsyncStoresResource(self)
self.parsing = parsing.AsyncParsingResource(self)
self.files = files.AsyncFilesResource(self)
self.extractions = extractions.AsyncExtractionsResource(self)
Expand Down Expand Up @@ -804,6 +809,7 @@ def _make_status_error(
class MixedbreadWithRawResponse:
def __init__(self, client: Mixedbread) -> None:
self.vector_stores = vector_stores.VectorStoresResourceWithRawResponse(client.vector_stores)
self.stores = stores.StoresResourceWithRawResponse(client.stores)
self.parsing = parsing.ParsingResourceWithRawResponse(client.parsing)
self.files = files.FilesResourceWithRawResponse(client.files)
self.extractions = extractions.ExtractionsResourceWithRawResponse(client.extractions)
Expand All @@ -826,6 +832,7 @@ def __init__(self, client: Mixedbread) -> None:
class AsyncMixedbreadWithRawResponse:
def __init__(self, client: AsyncMixedbread) -> None:
self.vector_stores = vector_stores.AsyncVectorStoresResourceWithRawResponse(client.vector_stores)
self.stores = stores.AsyncStoresResourceWithRawResponse(client.stores)
self.parsing = parsing.AsyncParsingResourceWithRawResponse(client.parsing)
self.files = files.AsyncFilesResourceWithRawResponse(client.files)
self.extractions = extractions.AsyncExtractionsResourceWithRawResponse(client.extractions)
Expand All @@ -848,6 +855,7 @@ def __init__(self, client: AsyncMixedbread) -> None:
class MixedbreadWithStreamedResponse:
def __init__(self, client: Mixedbread) -> None:
self.vector_stores = vector_stores.VectorStoresResourceWithStreamingResponse(client.vector_stores)
self.stores = stores.StoresResourceWithStreamingResponse(client.stores)
self.parsing = parsing.ParsingResourceWithStreamingResponse(client.parsing)
self.files = files.FilesResourceWithStreamingResponse(client.files)
self.extractions = extractions.ExtractionsResourceWithStreamingResponse(client.extractions)
Expand All @@ -870,6 +878,7 @@ def __init__(self, client: Mixedbread) -> None:
class AsyncMixedbreadWithStreamedResponse:
def __init__(self, client: AsyncMixedbread) -> None:
self.vector_stores = vector_stores.AsyncVectorStoresResourceWithStreamingResponse(client.vector_stores)
self.stores = stores.AsyncStoresResourceWithStreamingResponse(client.stores)
self.parsing = parsing.AsyncParsingResourceWithStreamingResponse(client.parsing)
self.files = files.AsyncFilesResourceWithStreamingResponse(client.files)
self.extractions = extractions.AsyncExtractionsResourceWithStreamingResponse(client.extractions)
Expand Down
2 changes: 1 addition & 1 deletion src/mixedbread/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "mixedbread"
__version__ = "0.31.0" # x-release-please-version
__version__ = "0.32.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/mixedbread/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
FilesResourceWithStreamingResponse,
AsyncFilesResourceWithStreamingResponse,
)
from .stores import (
StoresResource,
AsyncStoresResource,
StoresResourceWithRawResponse,
AsyncStoresResourceWithRawResponse,
StoresResourceWithStreamingResponse,
AsyncStoresResourceWithStreamingResponse,
)
from .parsing import (
ParsingResource,
AsyncParsingResource,
Expand Down Expand Up @@ -72,6 +80,12 @@
"AsyncVectorStoresResourceWithRawResponse",
"VectorStoresResourceWithStreamingResponse",
"AsyncVectorStoresResourceWithStreamingResponse",
"StoresResource",
"AsyncStoresResource",
"StoresResourceWithRawResponse",
"AsyncStoresResourceWithRawResponse",
"StoresResourceWithStreamingResponse",
"AsyncStoresResourceWithStreamingResponse",
"ParsingResource",
"AsyncParsingResource",
"ParsingResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/mixedbread/resources/stores/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .files import (
FilesResource,
AsyncFilesResource,
FilesResourceWithRawResponse,
AsyncFilesResourceWithRawResponse,
FilesResourceWithStreamingResponse,
AsyncFilesResourceWithStreamingResponse,
)
from .stores import (
StoresResource,
AsyncStoresResource,
StoresResourceWithRawResponse,
AsyncStoresResourceWithRawResponse,
StoresResourceWithStreamingResponse,
AsyncStoresResourceWithStreamingResponse,
)

__all__ = [
"FilesResource",
"AsyncFilesResource",
"FilesResourceWithRawResponse",
"AsyncFilesResourceWithRawResponse",
"FilesResourceWithStreamingResponse",
"AsyncFilesResourceWithStreamingResponse",
"StoresResource",
"AsyncStoresResource",
"StoresResourceWithRawResponse",
"AsyncStoresResourceWithRawResponse",
"StoresResourceWithStreamingResponse",
"AsyncStoresResourceWithStreamingResponse",
]
Loading
Loading