Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(vector_service): Fixes type hinting and removes unnecessary ignores (#19574)
-LAN-f0137be71980
diff --git a/api/services/vector_service.py b/api/services/vector_service.pyindex 18d10cc5285..58292c59f4b 100644--- a/api/services/vector_service.py+++ b/api/services/vector_service.py@@ -21,8 +21,9 @@ class VectorService:def create_segments_vector(cls, keywords_list: Optional[list[list[str]]], segments: list[DocumentSegment], dataset: Dataset, doc_form: str):- documents = []+ documents: list[Document] = []+ document: Document | None = Nonefor segment in segments:if doc_form == IndexType.PARENT_CHILD_INDEX:document = db.session.query(DatasetDocument).filter_by(id=segment.document_id).first()@@ -62,7 +63,7 @@ class VectorService:raise ValueError("The knowledge base index technique is not high quality!")cls.generate_child_chunks(segment, document, dataset, embedding_model_instance, processing_rule, False)else:- document = Document( # type: ignore+ document = Document(page_content=segment.content,metadata={"doc_id": segment.index_node_id,@@ -74,7 +75,7 @@ class VectorService:documents.append(document)if len(documents) > 0:index_processor = IndexProcessorFactory(doc_form).init_index_processor()- index_processor.load(dataset, documents, with_keywords=True, keywords_list=keywords_list) # type: ignore+ index_processor.load(dataset, documents, with_keywords=True, keywords_list=keywords_list)@classmethoddef update_segment_vector(cls, keywords: Optional[list[str]], segment: DocumentSegment, dataset: Dataset):diff --git a/web/app/components/develop/template/template.zh.mdx b/web/app/components/develop/template/template.zh.mdxindex 64814e02359..da9aa432042 100755--- a/web/app/components/develop/template/template.zh.mdx+++ b/web/app/components/develop/template/template.zh.mdx@@ -907,4 +907,4 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'```</CodeGroup></Col>-</Row>\ No newline at end of file+</Row>