Skip to content
Snippets Groups Projects
Unverified Commit 0adf1be8 authored by Emanuel Ferreira's avatar Emanuel Ferreira Committed by GitHub
Browse files

fix: _service_context managed index (#12199)

parent b224ff42
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ from llama_index_client import PipelineType, ProjectCreate, StatusEnum ...@@ -12,6 +12,7 @@ from llama_index_client import PipelineType, ProjectCreate, StatusEnum
from llama_index.core.base.base_query_engine import BaseQueryEngine from llama_index.core.base.base_query_engine import BaseQueryEngine
from llama_index.core.base.base_retriever import BaseRetriever from llama_index.core.base.base_retriever import BaseRetriever
from llama_index.core.callbacks.base import CallbackManager
from llama_index.core.constants import DEFAULT_APP_URL, DEFAULT_PROJECT_NAME from llama_index.core.constants import DEFAULT_APP_URL, DEFAULT_PROJECT_NAME
from llama_index.core.indices.managed.base import BaseManagedIndex from llama_index.core.indices.managed.base import BaseManagedIndex
from llama_index.core.ingestion.api_utils import ( from llama_index.core.ingestion.api_utils import (
...@@ -21,6 +22,7 @@ from llama_index.core.ingestion.api_utils import ( ...@@ -21,6 +22,7 @@ from llama_index.core.ingestion.api_utils import (
get_pipeline_create, get_pipeline_create,
) )
from llama_index.core.schema import BaseNode, Document, TransformComponent from llama_index.core.schema import BaseNode, Document, TransformComponent
from llama_index.core.settings import Settings
class LlamaCloudIndex(BaseManagedIndex): class LlamaCloudIndex(BaseManagedIndex):
...@@ -37,6 +39,7 @@ class LlamaCloudIndex(BaseManagedIndex): ...@@ -37,6 +39,7 @@ class LlamaCloudIndex(BaseManagedIndex):
base_url: Optional[str] = None, base_url: Optional[str] = None,
app_url: Optional[str] = None, app_url: Optional[str] = None,
show_progress: bool = False, show_progress: bool = False,
callback_manager: Optional[CallbackManager] = None,
**kwargs: Any, **kwargs: Any,
) -> None: ) -> None:
"""Initialize the Platform Index.""" """Initialize the Platform Index."""
...@@ -56,6 +59,8 @@ class LlamaCloudIndex(BaseManagedIndex): ...@@ -56,6 +59,8 @@ class LlamaCloudIndex(BaseManagedIndex):
self._app_url = app_url self._app_url = app_url
self._timeout = timeout self._timeout = timeout
self._show_progress = show_progress self._show_progress = show_progress
self._service_context = None
self._callback_manager = callback_manager or Settings.callback_manager
@classmethod @classmethod
def from_documents( # type: ignore def from_documents( # type: ignore
......
...@@ -30,7 +30,7 @@ exclude = ["**/BUILD"] ...@@ -30,7 +30,7 @@ exclude = ["**/BUILD"]
license = "MIT" license = "MIT"
name = "llama-index-indices-managed-llama-cloud" name = "llama-index-indices-managed-llama-cloud"
readme = "README.md" readme = "README.md"
version = "0.1.4" version = "0.1.5"
[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