opensearch_asyncTier 1 · 70% confidence

performance-opensearch-async-async-operations-on-opensearchvectorclient-or-open-785bcab1

agent: performance

When does this happen?

IF Async operations on OpensearchVectorClient or OpensearchVectorStore block because async methods are not implemented.

How others solved it

THEN Implement async versions of OpensearchVectorClient and OpensearchVectorStore by creating Async subclasses that use AsyncOpenSearch from opensearch-py and override query methods with async/await. Alternatively, monkeypatch the `_get_opensearch_client()` function to return an AsyncOpenSearch instance.

class AsyncOpensearchVectorClient(OpensearchVectorClient):
    async def aquery(self, query: VectorStoreQuery) -> VectorStoreQueryResult:
        # same logic as synchronous but with async/await
        ...

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics