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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-43906e7132098c54e8b761fa3bd67fbd9174894faeb22367a681e92f60f6445f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-073867bf61fcd7c956b54d9c1ecb04dafa75523d10b3f25f2dcee85725184f1a.yml
8 changes: 8 additions & 0 deletions src/mixedbread/resources/vector_stores/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def create(
vector_store_id: str,
*,
file_id: str,
experimental: file_create_params.Experimental | 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.
Expand All @@ -76,6 +77,8 @@ def create(

file_id: ID of the file to add

experimental: Strategy for adding the file

metadata: Optional metadata for the file

extra_headers: Send extra headers
Expand All @@ -93,6 +96,7 @@ def create(
body=maybe_transform(
{
"file_id": file_id,
"experimental": experimental,
"metadata": metadata,
},
file_create_params.FileCreateParams,
Expand Down Expand Up @@ -345,6 +349,7 @@ async def create(
vector_store_id: str,
*,
file_id: str,
experimental: file_create_params.Experimental | 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.
Expand All @@ -366,6 +371,8 @@ async def create(

file_id: ID of the file to add

experimental: Strategy for adding the file

metadata: Optional metadata for the file

extra_headers: Send extra headers
Expand All @@ -383,6 +390,7 @@ async def create(
body=await async_maybe_transform(
{
"file_id": file_id,
"experimental": experimental,
"metadata": metadata,
},
file_create_params.FileCreateParams,
Expand Down
2 changes: 1 addition & 1 deletion src/mixedbread/types/file_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class FileCounts(BaseModel):
cancelled: Optional[int] = None
"""Number of files whose processing was canceled"""
"""Number of files whose processing was cancelled"""

completed: Optional[int] = None
"""Number of successfully processed files"""
Expand Down
12 changes: 10 additions & 2 deletions src/mixedbread/types/vector_stores/file_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

from __future__ import annotations

from typing_extensions import Required, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["FileCreateParams"]
__all__ = ["FileCreateParams", "Experimental"]


class FileCreateParams(TypedDict, total=False):
file_id: Required[str]
"""ID of the file to add"""

experimental: Experimental
"""Strategy for adding the file"""

metadata: object
"""Optional metadata for the file"""


class Experimental(TypedDict, total=False):
parsing_strategy: Literal["fast", "high_quality"]
"""Strategy for adding the file"""
2 changes: 2 additions & 0 deletions tests/api_resources/vector_stores/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
file = client.vector_stores.files.create(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={"parsing_strategy": "fast"},
metadata={},
)
assert_matches_type(VectorStoreFile, file, path=["response"])
Expand Down Expand Up @@ -320,6 +321,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
file = await async_client.vector_stores.files.create(
vector_store_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={"parsing_strategy": "fast"},
metadata={},
)
assert_matches_type(VectorStoreFile, file, path=["response"])
Expand Down