Skip to content

Commit 6234608

Browse files
committed
Add another example to code block of instantiating async client
1 parent db84764 commit 6234608

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/changelog.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ This minor version includes:
88

99
- The introduction of the ``WeaviateAsyncClient`` class to support I/O requests to Weaviate using the ``async/await`` syntax with `asyncio <https://docs.python.org/3/library/asyncio.html>`
1010
- All methods that perform CRUD and search actions are now ``async def`` functions
11-
- To instantiate a client quickly, using the ``weaviate.use_async_with_x`` methods in an async context manager pattern, e.g.:
11+
- To instantiate a client quickly, use the ``weaviate.use_async_with_x`` methods in an async context manager pattern, e.g.:
1212
.. code-block:: python
1313
async with weaviate.use_async_with_local() as client:
1414
# Your code
15+
- Note, you cannot do ``await weaviate.use_async_with_x`` if not using the context manager pattern. You have to create the client first and then connect manually:
16+
.. code-block:: python
17+
client = weaviate.use_async_with_local()
18+
await client.connect()
19+
# Your code
20+
await client.close()
1521
- A refactoring of the underlying implementation of the ``WeaviateClient`` to use the ``WeaviateAsyncClient`` under-the-hood scheduling the necessary coroutines to run in a side-car event-loop thread
1622
- Support for new core Weaviate features in both the sync and async clients:
1723
- Multi-vector search in the ``.near_x`` and ``.hybrid`` methods within the ``.generate`` and ``.query`` collection namespaces

0 commit comments

Comments
 (0)