Skip to content

Commit ec7d6e3

Browse files
authored
Refactor Data directory structure (#252)
1 parent db69580 commit ec7d6e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+58
-824
lines changed

llmstack/apps/tasks.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
import weaviate
44

5-
from llmstack.datasources.handlers.datasource_processor import DataSourceProcessor
6-
from llmstack.datasources.models import (
7-
DataSource,
8-
DataSourceEntry,
9-
DataSourceEntryStatus,
10-
)
11-
from llmstack.datasources.types import DataSourceTypeFactory
5+
from llmstack.data.datasource_processor import DataSourceProcessor
6+
from llmstack.data.models import DataSource, DataSourceEntry, DataSourceEntryStatus
7+
from llmstack.data.types import DataSourceTypeFactory
128

139
logger = logging.getLogger(__name__)
1410

File renamed without changes.
File renamed without changes.

llmstack/datasources/apis.py renamed to llmstack/data/apis.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919
delete_data_source_task,
2020
resync_data_entry_task,
2121
)
22-
from llmstack.datasources.handlers.datasource_processor import (
23-
DataSourceEntryItem,
24-
DataSourceProcessor,
25-
)
26-
from llmstack.datasources.types import (
22+
from llmstack.data.datasource_processor import DataSourceEntryItem, DataSourceProcessor
23+
from llmstack.data.types import (
2724
DataSourceTypeFactory,
2825
get_data_source_type_interface_subclasses,
2926
)
@@ -438,7 +435,7 @@ def add_entry_async(self, request, uid):
438435

439436
adhoc_job = AdhocJob(
440437
name=f"add_entry_{datasource.uuid}",
441-
callable="llmstack.datasources.tasks.process_datasource_add_entry_request",
438+
callable="llmstack.data.tasks.process_datasource_add_entry_request",
442439
callable_args=[
443440
uid,
444441
request.data["entry_data"],

llmstack/datasources/apps.py renamed to llmstack/data/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
class DatasourcesConfig(AppConfig):
55
default_auto_field = "django.db.models.BigAutoField"
6-
name = "llmstack.datasources"
6+
name = "llmstack.data"
77
label = "datasources"

llmstack/datasources/handlers/datasource_processor.py renamed to llmstack/data/datasource_processor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
from llmstack.common.blocks.base.processor import BaseInputType, ProcessorInterface
1818
from llmstack.common.blocks.base.schema import BaseSchema as _Schema
1919
from llmstack.common.blocks.data.store.vectorstore import Document
20-
from llmstack.datasources.models import DataSource
21-
from llmstack.datasources.vector_stores.types import get_vector_store_configuration
20+
from llmstack.data.destinations.vector_stores.types import (
21+
get_vector_store_configuration,
22+
)
23+
from llmstack.data.models import DataSource
2224

2325
logger = logging.getLogger(__name__)
2426

File renamed without changes.

llmstack/datasources/vector_stores/chromadb.py renamed to llmstack/data/destinations/vector_stores/chromadb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import chromadb
44
from llama_index.vector_stores.chroma import ChromaVectorStore
55

6-
from llmstack.datasources.vector_stores.base import VectorStoreConfiguration
6+
from llmstack.data.destinations.vector_stores.base import VectorStoreConfiguration
77

88

99
class PromptlyChromaVectorStore(ChromaVectorStore):

0 commit comments

Comments
 (0)