Skip to content
Snippets Groups Projects
Unverified Commit 23a1a191 authored by Logan's avatar Logan Committed by GitHub
Browse files

Logan/avoid nest asyncio (#11707)

parent f4858808
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,6 @@ import json ...@@ -5,8 +5,6 @@ import json
import uuid import uuid
from typing import Any, Dict, Iterable, List, Optional, Union, cast from typing import Any, Dict, Iterable, List, Optional, Union, cast
import nest_asyncio
from llama_index.core.bridge.pydantic import PrivateAttr from llama_index.core.bridge.pydantic import PrivateAttr
from llama_index.core.schema import BaseNode, MetadataMode, TextNode from llama_index.core.schema import BaseNode, MetadataMode, TextNode
...@@ -321,7 +319,6 @@ class OpensearchVectorClient: ...@@ -321,7 +319,6 @@ class OpensearchVectorClient:
self._os_client = _get_async_opensearch_client(self._endpoint, **kwargs) self._os_client = _get_async_opensearch_client(self._endpoint, **kwargs)
not_found_error = _import_not_found_error() not_found_error = _import_not_found_error()
nest_asyncio.apply()
event_loop = asyncio.get_event_loop() event_loop = asyncio.get_event_loop()
try: try:
event_loop.run_until_complete( event_loop.run_until_complete(
...@@ -454,7 +451,6 @@ class OpensearchVectorStore(BasePydanticVectorStore): ...@@ -454,7 +451,6 @@ class OpensearchVectorStore(BasePydanticVectorStore):
) -> None: ) -> None:
"""Initialize params.""" """Initialize params."""
super().__init__() super().__init__()
nest_asyncio.apply()
self._client = client self._client = client
@property @property
......
...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"] ...@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT" license = "MIT"
name = "llama-index-vector-stores-opensearch" name = "llama-index-vector-stores-opensearch"
readme = "README.md" readme = "README.md"
version = "0.1.6" version = "0.1.7"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.8.1,<4.0" python = ">=3.8.1,<4.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment