File tree Expand file tree Collapse file tree
hivemind_etl/simple_ingestion Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from datetime import timedelta
22
3- from temporalio import workflow
3+ from temporalio import activity , workflow
44from temporalio .common import RetryPolicy
55from temporalio .workflow import execute_activity
66from .schema import IngestionRequest
7- from tc_hivemind_backend .ingest_qdrant import CustomIngestionPipeline
8- from llama_index .core import Document
7+
8+ with workflow .unsafe .imports_passed_through ():
9+ from tc_hivemind_backend .ingest_qdrant import CustomIngestionPipeline
10+ from llama_index .core import Document
911
1012
1113@workflow .defn
@@ -48,7 +50,7 @@ async def run(self, ingestion_request: IngestionRequest) -> None:
4850 )
4951
5052
51- @workflow . activity
53+ @activity . defn
5254async def process_document (
5355 ingestion_request : IngestionRequest ,
5456) -> None :
@@ -75,7 +77,7 @@ async def process_document(
7577 # Initialize the ingestion pipeline
7678 pipeline = CustomIngestionPipeline (
7779 community_id = ingestion_request .communityId ,
78- collectionName = collection_name ,
80+ collection_name = collection_name ,
7981 )
8082
8183 document = Document (
You can’t perform that action at this time.
0 commit comments