diff --git a/pyproject.toml b/pyproject.toml index 46b3d15..5de89d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "credal" [tool.poetry] name = "credal" -version = "0.1.5" +version = "0.1.6" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 9953e6a..d611ac9 100644 --- a/reference.md +++ b/reference.md @@ -938,7 +938,7 @@ client.document_catalog.upload_document_contents(
-**collection_id:** `typing.Optional[str]` — If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. +**collection_id:** `typing.Optional[str]` — If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter.
@@ -962,7 +962,7 @@ client.document_catalog.upload_document_contents(
-**await_vector_store_sync:** `typing.Optional[bool]` — If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. +**await_vector_store_sync:** `typing.Optional[bool]` — Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns.
diff --git a/src/credal/core/client_wrapper.py b/src/credal/core/client_wrapper.py index 4bd5cd1..b62eb5f 100644 --- a/src/credal/core/client_wrapper.py +++ b/src/credal/core/client_wrapper.py @@ -22,10 +22,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "credal/0.1.5", + "User-Agent": "credal/0.1.6", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "credal", - "X-Fern-SDK-Version": "0.1.5", + "X-Fern-SDK-Version": "0.1.6", **(self.get_custom_headers() or {}), } headers["Authorization"] = f"Bearer {self._get_api_key()}" diff --git a/src/credal/core/pydantic_utilities.py b/src/credal/core/pydantic_utilities.py index dd7d89f..8906cdf 100644 --- a/src/credal/core/pydantic_utilities.py +++ b/src/credal/core/pydantic_utilities.py @@ -61,7 +61,7 @@ class UniversalBaseModel(pydantic.BaseModel): @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] def serialize_model(self) -> Any: # type: ignore[name-defined] - serialized = self.model_dump() # type: ignore[attr-defined] + serialized = self.dict() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data diff --git a/src/credal/document_catalog/client.py b/src/credal/document_catalog/client.py index cc44808..0b05698 100644 --- a/src/credal/document_catalog/client.py +++ b/src/credal/document_catalog/client.py @@ -70,7 +70,7 @@ def upload_document_contents( Optional JSON representing any custom metadata for this document collection_id : typing.Optional[str] - If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. + If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. force_update : typing.Optional[bool] If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal @@ -79,7 +79,7 @@ def upload_document_contents( If specified, document will be accessible to everyone within the organization of the uploader await_vector_store_sync : typing.Optional[bool] - If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. + Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -269,7 +269,7 @@ async def upload_document_contents( Optional JSON representing any custom metadata for this document collection_id : typing.Optional[str] - If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. + If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. force_update : typing.Optional[bool] If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal @@ -278,7 +278,7 @@ async def upload_document_contents( If specified, document will be accessible to everyone within the organization of the uploader await_vector_store_sync : typing.Optional[bool] - If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. + Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/src/credal/document_catalog/raw_client.py b/src/credal/document_catalog/raw_client.py index 276ee2f..392d63e 100644 --- a/src/credal/document_catalog/raw_client.py +++ b/src/credal/document_catalog/raw_client.py @@ -63,7 +63,7 @@ def upload_document_contents( Optional JSON representing any custom metadata for this document collection_id : typing.Optional[str] - If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. + If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. force_update : typing.Optional[bool] If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal @@ -72,7 +72,7 @@ def upload_document_contents( If specified, document will be accessible to everyone within the organization of the uploader await_vector_store_sync : typing.Optional[bool] - If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. + Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -250,7 +250,7 @@ async def upload_document_contents( Optional JSON representing any custom metadata for this document collection_id : typing.Optional[str] - If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. + If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. force_update : typing.Optional[bool] If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal @@ -259,7 +259,7 @@ async def upload_document_contents( If specified, document will be accessible to everyone within the organization of the uploader await_vector_store_sync : typing.Optional[bool] - If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. + Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py index 9f141a4..d17e586 100644 --- a/tests/utils/test_query_encoding.py +++ b/tests/utils/test_query_encoding.py @@ -1,6 +1,5 @@ # This file was auto-generated by Fern from our API Definition. - from credal.core.query_encoder import encode_query