From 2107f472e1f02d92d2aa7000da0a4e94f9f05b21 Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Sun, 23 Mar 2025 16:20:40 +0800 Subject: [PATCH 1/3] fix:rag workflow update --- .../src/dbgpt/storage/knowledge_graph/base.py | 7 +- .../src/dbgpt/storage/vector_store/base.py | 50 +- .../rag/operators/knowledge_graph.py | 2 +- .../dbgpt_ext/rag/operators/process_branch.py | 6 +- .../dbgpt_ext/rag/operators/vector_store.py | 2 +- .../storage/graph_store/tugraph_store.py | 42 + .../knowledge_graph/community_summary.py | 6 + .../knowledge_graph/knowledge_graph.py | 122 +- .../storage/vector_store/chroma_store.py | 3 +- .../storage/vector_store/elastic_store.py | 3 +- .../storage/vector_store/milvus_store.py | 5 +- .../storage/vector_store/oceanbase_store.py | 3 +- .../storage/vector_store/pgvector_store.py | 3 +- .../storage/vector_store/weaviate_store.py | 3 +- ...edded-knowledge-process-flow-template.json | 1618 +++++----- .../en/hybrid-knowledge-process-template.json | 2258 +++++-------- .../kg-knowledge-process-flow-template.json | 1693 +++++----- ...edded-knowledge-process-flow-template.json | 1616 +++++----- ...hybrid-knowldge-process-flow-template.json | 2820 +++++++++-------- .../kg-knowledge-process-flow-template.json | 1691 +++++----- 20 files changed, 5807 insertions(+), 6146 deletions(-) diff --git a/packages/dbgpt-core/src/dbgpt/storage/knowledge_graph/base.py b/packages/dbgpt-core/src/dbgpt/storage/knowledge_graph/base.py index 7439e7cc0..7080e1958 100644 --- a/packages/dbgpt-core/src/dbgpt/storage/knowledge_graph/base.py +++ b/packages/dbgpt-core/src/dbgpt/storage/knowledge_graph/base.py @@ -7,7 +7,7 @@ from typing import List, Optional from pydantic import Field -from dbgpt.core import Chunk +from dbgpt.core import Chunk, Embeddings from dbgpt.storage.base import IndexStoreBase, IndexStoreConfig from dbgpt.storage.graph_store.graph import Graph from dbgpt.util import RegisterParameters @@ -29,6 +29,11 @@ class KnowledgeGraphBase(IndexStoreBase, ABC): def get_config(self) -> KnowledgeGraphConfig: """Get the knowledge graph config.""" + @property + def embeddings(self) -> Embeddings: + """Get the knowledge graph embeddings.""" + raise NotImplementedError + @abstractmethod def query_graph(self, limit: Optional[int] = None) -> Graph: """Get graph data.""" diff --git a/packages/dbgpt-core/src/dbgpt/storage/vector_store/base.py b/packages/dbgpt-core/src/dbgpt/storage/vector_store/base.py index 3419129b9..a3e64ed8d 100644 --- a/packages/dbgpt-core/src/dbgpt/storage/vector_store/base.py +++ b/packages/dbgpt-core/src/dbgpt/storage/vector_store/base.py @@ -17,7 +17,7 @@ from dbgpt.util.i18n_utils import _ logger = logging.getLogger(__name__) -_COMMON_PARAMETERS = [ +_VECTOR_STORE_COMMON_PARAMETERS = [ Parameter.build_from( _("Collection Name"), "name", @@ -28,6 +28,20 @@ _COMMON_PARAMETERS = [ optional=True, default="dbgpt_collection", ), + Parameter.build_from( + _("Embedding Function"), + "embedding_fn", + Embeddings, + description=_( + "The embedding function of vector store, if not set, will use " + "the default embedding function." + ), + optional=True, + default=None, + ), +] + +_COMMON_PARAMETERS = [ Parameter.build_from( _("User"), "user", @@ -48,40 +62,6 @@ _COMMON_PARAMETERS = [ optional=True, default=None, ), - Parameter.build_from( - _("Embedding Function"), - "embedding_fn", - Embeddings, - description=_( - "The embedding function of vector store, if not set, will use " - "the default embedding function." - ), - optional=True, - default=None, - ), - Parameter.build_from( - _("Max Chunks Once Load"), - "max_chunks_once_load", - int, - description=_( - "The max number of chunks to load at once. If your document is " - "large, you can set this value to a larger number to speed up the loading " - "process. Default is 10." - ), - optional=True, - default=10, - ), - Parameter.build_from( - _("Max Threads"), - "max_threads", - int, - description=_( - "The max number of threads to use. Default is 1. If you set " - "this bigger than 1, please make sure your vector store is thread-safe." - ), - optional=True, - default=1, - ), ] diff --git a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/knowledge_graph.py b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/knowledge_graph.py index efb4a0b0a..522b7994d 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/knowledge_graph.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/knowledge_graph.py @@ -58,7 +58,7 @@ class KnowledgeGraphOperator(MapOperator[List[Chunk], List[Chunk]]): """Init the Knowledge Graph operator.""" MapOperator.__init__(self, **kwargs) self._graph_store = graph_store - self._embeddings = graph_store.get_config().embedding_fn + self._embeddings = graph_store.embeddings self._max_chunks_once_load = max_chunks_once_load self.graph_store = graph_store diff --git a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/process_branch.py b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/process_branch.py index 837d058e0..abd778f8d 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/process_branch.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/process_branch.py @@ -84,7 +84,7 @@ class KnowledgeProcessBranchOperator(BranchOperator[Knowledge, Knowledge]): async def check_graph_process(r: Knowledge) -> bool: # If check graph is true, we will run extract knowledge graph triplets. - from dbgpt.rag.operators import KnowledgeGraphOperator + from dbgpt_ext.rag.operators import KnowledgeGraphOperator if KnowledgeGraphOperator in download_cls_list: return True @@ -92,7 +92,7 @@ class KnowledgeProcessBranchOperator(BranchOperator[Knowledge, Knowledge]): async def check_embedding_process(r: Knowledge) -> bool: # If check embedding is true, we will run extract document embedding. - from dbgpt.rag.operators import VectorStorageOperator + from dbgpt_ext.rag.operators import VectorStorageOperator if VectorStorageOperator in download_cls_list: return True @@ -100,7 +100,7 @@ class KnowledgeProcessBranchOperator(BranchOperator[Knowledge, Knowledge]): async def check_full_text_process(r: Knowledge) -> bool: # If check full text is true, we will run extract document keywords. - from dbgpt.rag.operators.full_text import FullTextStorageOperator + from dbgpt_ext.rag.operators.full_text import FullTextStorageOperator if FullTextStorageOperator in download_cls_list: return True diff --git a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/vector_store.py b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/vector_store.py index 755ef5ceb..ed1f3acf4 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/vector_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/rag/operators/vector_store.py @@ -58,7 +58,7 @@ class VectorStorageOperator(MapOperator[List[Chunk], List[Chunk]]): """Init the datasource operator.""" MapOperator.__init__(self, **kwargs) self._vector_store = vector_store - self._embeddings = vector_store.get_config().embedding_fn + self._embeddings = vector_store.embeddings self._max_chunks_once_load = max_chunks_once_load self.vector_store = vector_store diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py index 5b66edd6d..7560c3250 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py @@ -7,13 +7,55 @@ import os from dataclasses import dataclass, field from typing import List +from dbgpt.core.awel.flow import register_resource, ResourceCategory, Parameter from dbgpt.storage.graph_store.base import GraphStoreBase, GraphStoreConfig from dbgpt.storage.graph_store.graph import GraphElemType from dbgpt_ext.datasource.conn_tugraph import TuGraphConnector +from dbgpt.util.i18n_utils import _ logger = logging.getLogger(__name__) +@register_resource( + _("TuGraph Graph Config"), + "tugraph_config", + category=ResourceCategory.KNOWLEDGE_GRAPH, + description=_("TuGraph config."), + parameters=[ + Parameter.build_from( + _("host"), + "host", + str, + optional=True, + default="127.0.0.1", + description=_("TuGraph host"), + ), + Parameter.build_from( + _("port"), + "port", + int, + optional=True, + default="7687", + description=_("TuGraph port"), + ), + Parameter.build_from( + _("username"), + "username", + str, + optional=True, + default="admin", + description=_("TuGraph username"), + ), + Parameter.build_from( + _("password"), + "password", + str, + optional=True, + default="73@TuGraph", + description=_("TuGraph password"), + ), + ], +) @dataclass class TuGraphStoreConfig(GraphStoreConfig): """TuGraph store config.""" diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py index e66d5fc7b..8c29bb6a8 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py @@ -285,6 +285,12 @@ class CommunitySummaryKnowledgeGraph(BuiltinKnowledgeGraph): """Get the knowledge graph config.""" return self._config + + @property + def embeddings(self) -> Embeddings: + """Get the knowledge graph config.""" + return self._embedding_fn + async def aload_document(self, chunks: List[Chunk]) -> List[str]: """Extract and persist graph from the document file.""" if not self.vector_name_exists(): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py index adc1406c1..c8396a718 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py @@ -4,7 +4,7 @@ import asyncio import logging import os from dataclasses import dataclass, field -from typing import List, Optional +from typing import List, Optional, Any from dbgpt.core import Chunk, Embeddings, LLMClient from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource @@ -68,50 +68,50 @@ GRAPH_PARAMETERS = [ ] -@register_resource( - _("Builtin Graph Config"), - "knowledge_graph_config", - category=ResourceCategory.KNOWLEDGE_GRAPH, - description=_("knowledge graph config."), - parameters=[ - *GRAPH_PARAMETERS, - Parameter.build_from( - _("Knowledge Graph Type"), - "graph_store_type", - str, - description=_("graph store type."), - optional=True, - default="TuGraph", - ), - Parameter.build_from( - _("LLM Client"), - "llm_client", - LLMClient, - description=_("llm client for extract graph triplets."), - ), - Parameter.build_from( - _("LLM Model Name"), - "model_name", - str, - description=_("llm model name."), - optional=True, - default=None, - ), - ], -) -@dataclass -class BuiltinKnowledgeGraphConfig(KnowledgeGraphConfig): - """Builtin knowledge graph config.""" - - __type__ = "tugraph" - - llm_model: Optional[str] = field( - default=None, metadata={"description": "llm model name."} - ) - - graph_type: Optional[str] = field( - default="TuGraph", metadata={"description": "graph store type."} - ) +# @register_resource( +# _("Builtin Graph Config"), +# "knowledge_graph_config", +# category=ResourceCategory.KNOWLEDGE_GRAPH, +# description=_("knowledge graph config."), +# parameters=[ +# *GRAPH_PARAMETERS, +# Parameter.build_from( +# _("Knowledge Graph Type"), +# "graph_store_type", +# str, +# description=_("graph store type."), +# optional=True, +# default="TuGraph", +# ), +# Parameter.build_from( +# _("LLM Client"), +# "llm_client", +# LLMClient, +# description=_("llm client for extract graph triplets."), +# ), +# Parameter.build_from( +# _("LLM Model Name"), +# "model_name", +# str, +# description=_("llm model name."), +# optional=True, +# default=None, +# ), +# ], +# ) +# @dataclass +# class BuiltinKnowledgeGraphConfig(KnowledgeGraphConfig): +# """Builtin knowledge graph config.""" +# +# __type__ = "tugraph" +# +# llm_model: Optional[str] = field( +# default=None, metadata={"description": "llm model name."} +# ) +# +# graph_type: Optional[str] = field( +# default="TuGraph", metadata={"description": "graph store type."} +# ) @register_resource( @@ -121,13 +121,34 @@ class BuiltinKnowledgeGraphConfig(KnowledgeGraphConfig): description=_("Builtin Knowledge Graph."), parameters=[ Parameter.build_from( - _("Builtin Knowledge Graph Config."), + _("Graph Store Config"), "config", - BuiltinKnowledgeGraphConfig, - description=_("Builtin Knowledge Graph Config."), + GraphStoreConfig, + description=_("graph store config."), + ), + Parameter.build_from( + _("Graph Store Name"), + "name", + str, + optional=True, + default="dbgpt", + description=_("Graph Store Name"), + ), + Parameter.build_from( + _("LLM Client"), + "llm_client", + LLMClient, + description=_("llm client for extract graph triplets."), + ), + Parameter.build_from( + _("LLM Model Name"), + "llm_model", + str, + description=_("kg extract llm model name."), optional=True, default=None, ), + ], ) class BuiltinKnowledgeGraph(KnowledgeGraphBase): @@ -168,6 +189,11 @@ class BuiltinKnowledgeGraph(KnowledgeGraphBase): """Get the knowledge graph config.""" return self._config + @property + def embeddings(self) -> Any: + """Get the knowledge graph config.""" + return None + def load_document(self, chunks: List[Chunk]) -> List[str]: """Extract and persist triplets to graph store.""" diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py index 2303d9602..6d2918cc7 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py @@ -13,7 +13,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util import string_utils @@ -77,6 +77,7 @@ class ChromaVectorConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class ChromaStore(VectorStoreBase): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py index 5ff8f28a8..aa8bd0559 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py @@ -12,7 +12,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util import string_utils @@ -145,6 +145,7 @@ class ElasticsearchStoreConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class ElasticStore(VectorStoreBase): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py index 96ddcaa64..48e045c3d 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py @@ -13,7 +13,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util import string_utils @@ -185,6 +185,7 @@ class MilvusVectorConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class MilvusStore(VectorStoreBase): @@ -561,7 +562,7 @@ class MilvusStore(VectorStoreBase): # use default index params. if param is None: index_type = self.col.indexes[0].params["index_type"] - param = self.index_params_map[index_type].get("params") + param = self.index_params_map[index_type] # query text embedding. query_vector = self.embedding.embed_query(query) # Determine result metadata fields. diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py index 939d3a5b5..c1400fbd8 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py @@ -17,7 +17,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util.i18n_utils import _ @@ -180,6 +180,7 @@ class OceanBaseConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class OceanBaseStore(VectorStoreBase): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py index affaa76b2..22ec34eb7 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py @@ -9,7 +9,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util.i18n_utils import _ @@ -70,6 +70,7 @@ class PGVectorConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class PGVectorStore(VectorStoreBase): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py index 777adbdd9..74c798d45 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py @@ -10,7 +10,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, + VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util.i18n_utils import _ @@ -84,6 +84,7 @@ class WeaviateVectorConfig(VectorStoreConfig): optional=True, default=None, ), + *_VECTOR_STORE_COMMON_PARAMETERS, ], ) class WeaviateStore(VectorStoreBase): diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/embedded-knowledge-process-flow-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/embedded-knowledge-process-flow-template.json index 5498aca08..1044308e5 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/embedded-knowledge-process-flow-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/embedded-knowledge-process-flow-template.json @@ -1,811 +1,815 @@ { - "flow": { - "uid": "e1d6fba4-7ea6-4120-8f59-e4f56964258f", - "label": "Embedding Knowledge Process Workflow", - "name": "embedding_process_workflow", - "flow_category": null, - "description": "Embedding Knowledge Process Workflow", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-16 18:04:00", - "gmt_modified": "2024-12-16 18:04:00", - "metadata": { - "triggers": [ - { - "trigger_type": "http" - } - ], - "sse_output": false, - "streaming_output": false, - "tags": {} - }, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "target_order": 3, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|parameters|3", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 1043.477794539488, - "y": 580.8652141334148, - "zoom": 0.4897130009645833 + "flow": { + "uid": "6259d0cb-891b-43bd-b27a-01b69c825bb6", + "label": "Embedding Knowledge Process Workflow", + "name": "embedding_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "position": { + "x": 1036.5559482027597, + "y": 112.93198043952461, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Vector Storage Operator", + "custom_label": null, + "name": "vector_storage_operator", + "description": "Persist embeddings into vector storage.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 323, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "position": { - "x": -25.997695320590083, - "y": -90.04159277333981, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -25.997695320590083, - "y": -90.04159277333981, - "zoom": 0.0 - }, - "data": { - "label": "Vector Storage Operator", - "custom_label": null, - "name": "vector_storage_operator", - "description": "Persist embeddings into vector storage.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to vector store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "VectorStorageOperator", - "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator", - "parameters": [ - { - "type_name": "VectorStoreBase", - "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Vector Store Connector", - "name": "vector_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The vector store.", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -913.571872386726, - "y": -61.6367538649408, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -913.571872386726, - "y": -61.6367538649408, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "position": { - "x": -256.96257013540503, - "y": -509.98997877383584, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -256.96257013540503, - "y": -509.98997877383584, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaStore", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", - "label": "Chroma Vector Store", - "custom_label": null, - "name": "chroma_vector_store", - "description": "Chroma vector store.", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaStore", - "dbgpt.storage.vector_store.base.VectorStoreBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chroma Config", - "name": "vector_store_config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "the chroma config of vector store.", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 674, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "position": { - "x": -731.2095474673597, - "y": -879.5845342539665, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -731.2095474673597, - "y": -879.5845342539665, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "label": "Chroma Config", - "custom_label": null, - "name": "chroma_vector_config", - "description": "Chroma vector store config.", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig", - "dbgpt.storage.vector_store.base.VectorStoreConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Collection Name", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "The name of vector store, if not set, will use the default name.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "User", - "name": "user", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The user of vector store, if not set, will use the default user.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Password", - "name": "password", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The password of vector store, if not set, will use the default password.", - "value": null, - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Embedding Function", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The embedding function of vector store, if not set, will use the default embedding function.", - "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Chunks Once Load", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "The max number of chunks to load at once. If your document is large, you can set this value to a larger number to speed up the loading process. Default is 10.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Threads", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "The max number of threads to use. Default is 1. If you set this bigger than 1, please make sure your vector store is thread-safe.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Persist Path", - "name": "persist_path", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "the persist path of vector store.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1517.087378905087, - "y": -191.2030717055229, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1517.087378905087, - "y": -191.2030717055229, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Loader Operator", - "custom_label": null, - "name": "knowledge_operator", - "description": "The knowledge operator, which can create knowledge from datasource.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Default datasource", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Default datasource.", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge type", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "Knowledge type.", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "data": { - "label": "Dict Http Trigger", - "custom_label": null, - "name": "dict_http_trigger", - "description": "Trigger your workflow by http request, and parse the request body as a dict", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API Endpoint", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The API endpoint", - "value": "/rag/knowledge/embedding/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Methods", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "The methods of the API endpoint", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Streaming Response", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "Whether the response is streaming", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Response Body", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response body of the API endpoint", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Response Media Type", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response media type", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Status Code", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "The http status code", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 148, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "position": { - "x": -1297.0596621977236, - "y": -756.4644248292581, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1297.0596621977236, - "y": -756.4644248292581, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultEmbeddings", - "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "label": "Default Embeddings", - "custom_label": null, - "name": "default_embeddings", - "description": "Default embeddings(using default embedding model of current system)", - "category": "embeddings", - "category_label": "Embeddings", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "dbgpt.core.interface.embeddings.Embeddings" - ], - "parameters": [] - } - } + "parameters": [ + { + "type_name": "VectorStoreBase", + "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Vector Storage Connector", + "name": "vector_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Vector storage.", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Text blocks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Assembled chunks persisted in vector storage.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "VectorStorageOperator", + "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator" + }, + "position_absolute": { + "x": 1036.5559482027597, + "y": 112.93198043952461, + "zoom": 0 + } + }, + { + "width": 320, + "height": 347, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "position": { + "x": 279.29806363580246, + "y": 287.53598714740707, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaStore", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "label": "Chroma Vector Storage", + "custom_label": null, + "name": "chroma_vector_store", + "description": "Chroma vector storage.", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chroma Configuration", + "name": "vector_store_config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Chroma configuration for vector storage.", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Collection Name", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt_collection", + "placeholder": null, + "description": "Name of the vector storage; if not set, the default name is used.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "Embeddings", + "type_cls": "dbgpt.core.interface.embeddings.Embeddings", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Embedding Function", + "name": "embedding_fn", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Embedding function for vector storage; if not set, the default embedding function is used.", + "options": null, + "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "dbgpt.storage.vector_store.base.VectorStoreBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": 279.29806363580246, + "y": 287.53598714740707, + "zoom": 0 + } + }, + { + "width": 320, + "height": 147, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "position": { + "x": -227.941619675604, + "y": -57.32513900638435, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultEmbeddings", + "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "label": "Default Embeddings", + "custom_label": null, + "name": "default_embeddings", + "description": "Default embeddings (using the current system's default embedding model)", + "category": "embeddings", + "category_label": "Embeddings", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "dbgpt.core.interface.embeddings.Embeddings" + ] + }, + "position_absolute": { + "x": -227.941619675604, + "y": -57.32513900638435, + "zoom": 0 + } + }, + { + "width": 320, + "height": 415, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "position": { + "x": -256.0502224268164, + "y": 228.68054202578486, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "label": "Chroma Configuration", + "custom_label": null, + "name": "chroma_vector_config", + "description": "Chroma vector storage configuration.", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "User", + "name": "user", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "User for the vector storage; if not set, the default user is used.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Password", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Password for the vector storage; if not set, the default password is used.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Persist Path", + "name": "persist_path", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Persist path for the vector storage.", + "options": null, + "value": "../../../../pilot/data", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dbgpt.storage.vector_store.base.VectorStoreConfig", + "dbgpt.storage.base.IndexStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -256.0502224268164, + "y": 228.68054202578486, + "zoom": 0 + } + }, + { + "width": 320, + "height": 320, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": 604.0551779510319, + "y": -164.0310479956741, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Chunk Management Operator", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "Split knowledge documents into chunks.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chunk Splitting Parameters", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Parameters for splitting chunks.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "knowledge", + "description": "Knowledge to load.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Chunks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": 604.0551779510319, + "y": -164.0310479956741, + "zoom": 0 + } + }, + { + "width": 320, + "height": 430, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": 189.6032415868342, + "y": -652.1461566982952, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Knowledge Loading Operator", + "custom_label": null, + "name": "knowledge_operator", + "description": "Knowledge operator that creates knowledge from data sources.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Default Data Source", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Default data source.", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Knowledge Type", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "Type of knowledge.", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Knowledge Data Source", + "custom_label": null, + "name": "knowledge datasource", + "description": "Knowledge data source, can be document, URL, or text.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "Knowledge", + "description": "Knowledge object.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": 189.6032415868342, + "y": -652.1461566982952, + "zoom": 0 + } + }, + { + "width": 320, + "height": 601, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -533.1682405026245, + "y": -723.1650941049104, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Dictionary HTTP Trigger", + "custom_label": null, + "name": "dict_http_trigger", + "description": "Trigger the workflow via HTTP request and parse the request body as a dictionary", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API Endpoint", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "This API endpoint", + "options": null, + "value": "/rag/embdding/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Method", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "Method of the API endpoint", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Streaming Response", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "Is the response streaming?", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Response Body", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response body of the API endpoint", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Response Media Type", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response media type", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Status Code", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP status code", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Request Body", + "custom_label": null, + "name": "request_body", + "description": "Request body of the API endpoint", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -533.1682405026245, + "y": -723.1650941049104, + "zoom": 0 + } } - } -} \ No newline at end of file + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_order": 0, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 2, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + } + ], + "viewport": { + "x": 402.1598068160989, + "y": 430.5231843092321, + "zoom": 0.6023610980904216 + } + }, + "description": "embedding_loader", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_embedding_loader_6259d0cb-891b-43bd-b27a-01b69c825bb6", + "gmt_created": "2025-03-21 00:17:45", + "gmt_modified": "2025-03-21 00:17:45", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/embdding/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } +} diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/hybrid-knowledge-process-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/hybrid-knowledge-process-template.json index 6a8de347e..e783b5f4f 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/hybrid-knowledge-process-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/hybrid-knowledge-process-template.json @@ -1,1394 +1,872 @@ { - "flow": { - "uid": "3b6a2c55-0c3b-4e38-bd71-d68104cccf37", - "label": "Hybrid Knowledge Process Workflow", - "name": "hybrid_knowledge_process_workflow", - "flow_category": null, - "description": "hybrid_knowledge_process_workflow", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-14 15:57:44", - "gmt_modified": "2024-12-14 15:57:44", - "metadata": null, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "source_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "target_order": 1, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|1", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "target_order": 3, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|parameters|3", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "target_order": 5, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|parameters|5", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_order": 1, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|1", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 862.7562630728534, - "y": 416.4952851718194, - "zoom": 0.3836649890553727 + "flow": { + "uid": "cdc54643-3580-4336-b60f-98ffc2e8d02f", + "label": "Knowledge Graph Process Workflow", + "name": "knowledge_graph_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "position": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Knowledge Graph Operator", + "custom_label": null, + "name": "knowledge_graph_operator", + "description": "Extract documents and persist them to the graph database.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 275, - "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "position": { - "x": 604.5, - "y": 77.0, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 604.5, - "y": 77.0, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Process Join Operator", - "custom_label": null, - "name": "knowledge_process_join_operator", - "description": "Join Branch the workflow based on the Knowledge Process Results.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "join", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Knowledge Graph Storage Results", - "custom_label": null, - "name": "input_value", - "description": "knowledge graph storage results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Knowledge Graph Storage Results", - "custom_label": null, - "name": "input_value", - "description": "knowledge graph storage results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Knowledge Process Results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeProcessJoinOperator", - "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessJoinOperator", - "parameters": [] - } - }, - { - "width": 320, - "height": 323, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "position": { - "x": 174.16583729394188, - "y": -131.63401513480102, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 174.16583729394188, - "y": -131.63401513480102, - "zoom": 0.0 - }, - "data": { - "label": "Vector Storage Operator", - "custom_label": null, - "name": "vector_storage_operator", - "description": "Persist embeddings into vector storage.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to vector store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "VectorStorageOperator", - "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator", - "parameters": [ - { - "type_name": "VectorStoreBase", - "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Vector Store Connector", - "name": "vector_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The vector store.", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 323, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "position": { - "x": 180.89103763027083, - "y": 341.37174185366564, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 180.89103763027083, - "y": 341.37174185366564, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Graph Operator", - "custom_label": null, - "name": "knowledge_graph_operator", - "description": "Extract Documents and persist into graph database.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to graph store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeGraphOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator", - "parameters": [ - { - "type_name": "KnowledgeGraphBase", - "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge Graph Connector", - "name": "graph_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The knowledge graph.", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -1056.545824254249, - "y": -163.01828337100258, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1056.545824254249, - "y": -163.01828337100258, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "position": { - "x": -306.391788536534, - "y": 491.0961943850906, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -306.391788536534, - "y": 491.0961943850906, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraph", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "label": "Builtin Knowledge Graph", - "custom_label": null, - "name": "builtin_knowledge_graph", - "description": "Builtin Knowledge Graph.", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Builtin Knowledge Graph Config.", - "name": "config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Builtin Knowledge Graph Config.", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 645, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "position": { - "x": -813.7432345424928, - "y": 328.2957752754239, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -813.7432345424928, - "y": 328.2957752754239, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "label": "Builtin Graph Config", - "custom_label": null, - "name": "knowledge_graph_config", - "description": "knowledge graph config.", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Graph Name", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "The name of Graph, if not set, will use the default name.", - "value": "dbgpt_collection_V1", - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Embedding Function", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The embedding function of vector store, if not set, will use the default embedding function.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Chunks Once Load", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "The max number of chunks to load at once. If your document is large, you can set this value to a larger number to speed up the loading process. Default is 10.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Threads", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "The max number of threads to use. Default is 1. If you set this bigger than 1, please make sure your vector store is thread-safe.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge Graph Type", - "name": "graph_store_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "TuGraph", - "placeholder": null, - "description": "graph store type.", - "value": "TuGraph", - "options": null - }, - { - "type_name": "LLMClient", - "type_cls": "dbgpt.core.interface.llm.LLMClient", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM Client", - "name": "llm_client", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "llm client for extract graph triplets.", - "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM Model Name", - "name": "model_name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "llm model name.", - "value": "zhipu_proxyllm", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "position": { - "x": -251.7635173402225, - "y": -367.01602690631285, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -251.7635173402225, - "y": -367.01602690631285, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaStore", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", - "label": "Chroma Vector Store", - "custom_label": null, - "name": "chroma_vector_store", - "description": "Chroma vector store.", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaStore", - "dbgpt.storage.vector_store.base.VectorStoreBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chroma Config", - "name": "vector_store_config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "the chroma config of vector store.", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 674, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "position": { - "x": -684.4180723107158, - "y": -934.1745886033843, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -684.4180723107158, - "y": -934.1745886033843, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "label": "Chroma Config", - "custom_label": null, - "name": "chroma_vector_config", - "description": "Chroma vector store config.", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig", - "dbgpt.storage.vector_store.base.VectorStoreConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Collection Name", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "The name of vector store, if not set, will use the default name.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "User", - "name": "user", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The user of vector store, if not set, will use the default user.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Password", - "name": "password", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The password of vector store, if not set, will use the default password.", - "value": null, - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Embedding Function", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The embedding function of vector store, if not set, will use the default embedding function.", - "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Chunks Once Load", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "The max number of chunks to load at once. If your document is large, you can set this value to a larger number to speed up the loading process. Default is 10.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Threads", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "The max number of threads to use. Default is 1. If you set this bigger than 1, please make sure your vector store is thread-safe.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Persist Path", - "name": "persist_path", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "the persist path of vector store.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1558.679801266548, - "y": -149.61064934406164, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1558.679801266548, - "y": -149.61064934406164, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Loader Operator", - "custom_label": null, - "name": "knowledge_operator", - "description": "The knowledge operator, which can create knowledge from datasource.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Default datasource", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Default datasource.", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge type", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "Knowledge type.", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "data": { - "label": "Dict Http Trigger", - "custom_label": null, - "name": "dict_http_trigger", - "description": "Trigger your workflow by http request, and parse the request body as a dict", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API Endpoint", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The API endpoint", - "value": "/rag/knowledge/hybrid/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Methods", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "The methods of the API endpoint", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Streaming Response", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "Whether the response is streaming", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Response Body", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response body of the API endpoint", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Response Media Type", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response media type", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Status Code", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "The http status code", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 148, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "position": { - "x": -1112.4932879687394, - "y": -753.8648984316667, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1112.4932879687394, - "y": -753.8648984316667, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultEmbeddings", - "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "label": "Default Embeddings", - "custom_label": null, - "name": "default_embeddings", - "description": "Default embeddings(using default embedding model of current system)", - "category": "embeddings", - "category_label": "Embeddings", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "dbgpt.core.interface.embeddings.Embeddings" - ], - "parameters": [] - } - }, - { - "width": 320, - "height": 272, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "position": { - "x": -1350.535131696419, - "y": 435.2340305150391, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1350.535131696419, - "y": 435.2340305150391, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultLLMClient", - "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", - "label": "Default LLM Client", - "custom_label": null, - "name": "default_llm_client", - "description": "Default LLM client(Connect to your DB-GPT model serving)", - "category": "llm_client", - "category_label": "LLM Client", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.model.cluster.client.DefaultLLMClient", - "dbgpt.core.interface.llm.LLMClient" - ], - "parameters": [ - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Auto Convert Message", - "name": "auto_convert_message", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": true, - "placeholder": null, - "description": "Whether to auto convert the messages that are not supported by the LLM to a compatible format", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 295, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "position": { - "x": -614.4846931519926, - "y": -92.5163519851338, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -614.4846931519926, - "y": -92.5163519851338, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Process Branch Operator", - "custom_label": null, - "name": "knowledge_process_operator", - "description": "Branch the workflow based on the stream flag of the request.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "branch", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Document Chunks", - "custom_label": null, - "name": "input_value", - "description": "The input value of the operator.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeProcessBranchOperator", - "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessBranchOperator", - "parameters": [] - } - } + "parameters": [ + { + "type_name": "KnowledgeGraphBase", + "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Knowledge Graph Connector", + "name": "graph_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Knowledge graph.", + "options": null, + "value": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Text blocks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Assembled chunks persisted to the graph storage.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeGraphOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator" + }, + "position_absolute": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + } + }, + { + "width": 320, + "height": 422, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "position": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "BuiltinKnowledgeGraph", + "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "label": "Built-in Knowledge Graph", + "custom_label": null, + "name": "builtin_knowledge_graph", + "description": "Built-in knowledge graph.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "GraphStoreConfig", + "type_cls": "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Config", + "name": "config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Graph store configuration.", + "options": null, + "value": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Name", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt", + "placeholder": null, + "description": "Graph Store Name", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "LLMClient", + "type_cls": "dbgpt.core.interface.llm.LLMClient", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Large Language Model Client", + "name": "llm_client", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Large language model client for extracting graph triples.", + "options": null, + "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Large Language Model Name", + "name": "llm_model", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "KG extract LLM model name.", + "options": null, + "value": "deepseek-chat", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + } + }, + { + "width": 320, + "height": 487, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "position": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "TuGraphStoreConfig", + "type_cls": "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "label": "TuGraph Graph Config", + "custom_label": null, + "name": "tugraph_config", + "description": "TuGraph configuration.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Host", + "name": "host", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "127.0.0.1", + "placeholder": null, + "description": "TuGraph host", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Port", + "name": "port", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "7687", + "placeholder": null, + "description": "TuGraph port", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Username", + "name": "username", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "admin", + "placeholder": null, + "description": "TuGraph username", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Password", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "73@TuGraph", + "placeholder": null, + "description": "TuGraph password", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + } + }, + { + "width": 320, + "height": 271, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "position": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultLLMClient", + "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", + "label": "Default Large Language Model Client", + "custom_label": null, + "name": "default_llm_client", + "description": "Default large language model client (connecting to your DB-GPT model service)", + "category": "llm_client", + "category_label": "LLM Client", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Auto Convert Message", + "name": "auto_convert_message", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": true, + "placeholder": null, + "description": "Whether to automatically convert messages that the large language model does not support into a compatible format.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.model.cluster.client.DefaultLLMClient", + "dbgpt.core.interface.llm.LLMClient" + ] + }, + "position_absolute": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + } + }, + { + "width": 320, + "height": 321, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Chunk Manager Operator", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "Splits knowledge documents into chunks.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chunk Splitting Parameters", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Parameters for chunk splitting.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "knowledge", + "description": "Knowledge to be loaded.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Chunks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + } + }, + { + "width": 320, + "height": 431, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Knowledge Loading Operator", + "custom_label": null, + "name": "knowledge_operator", + "description": "Knowledge operator that can create knowledge from data sources.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Default Data Source", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Default data source.", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Knowledge Type", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "Type of knowledge.", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Knowledge Data Source", + "custom_label": null, + "name": "knowledge datasource", + "description": "Knowledge data source, can be a document, URL, or text.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "Knowledge", + "description": "Knowledge object.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + } + }, + { + "width": 320, + "height": 602, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Dictionary HTTP Trigger", + "custom_label": null, + "name": "dict_http_trigger", + "description": "Triggers the workflow via an HTTP request and parses the request body as a dictionary.", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API Endpoint", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "The API endpoint.", + "options": null, + "value": "/rag/kg/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Method", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "Method for the API endpoint.", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Streaming Response", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "Whether the response is streamed.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Response Body", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response body for the API endpoint.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Response Media Type", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response media type.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Status Code", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP status code.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Request Body", + "custom_label": null, + "name": "request_body", + "description": "Request body for the API endpoint.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + } } - } -} \ No newline at end of file + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 2, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + } + ], + "viewport": { + "x": 1147.3096968356867, + "y": 363.7692149963865, + "zoom": 0.5702862475657419 + } + }, + "description": "kg_process_workflow", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_kg_process_workflow_cdc54643-3580-4336-b60f-98ffc2e8d02f", + "gmt_created": "2025-03-23 15:08:37", + "gmt_modified": "2025-03-23 15:08:37", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/kg/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } +} diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/kg-knowledge-process-flow-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/kg-knowledge-process-flow-template.json index 94f15bfe5..e783b5f4f 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/kg-knowledge-process-flow-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/en/kg-knowledge-process-flow-template.json @@ -1,829 +1,872 @@ { - "flow": { - "uid": "fd5d843e-9ef5-4515-998b-b062d26edaf2", - "label": "Knowledge Graph Process Workflow", - "name": "knowledge_graph_process_workflow", - "flow_category": null, - "description": "Knowledge Graph Process Workflow", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-16 19:14:00", - "gmt_modified": "2024-12-16 19:14:00", - "metadata": { - "triggers": [ - { - "trigger_type": "http" - } - ], - "sse_output": false, - "streaming_output": false, - "tags": {} - }, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "target_order": 5, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|parameters|5", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 1030.0389432865575, - "y": 345.02642518836063, - "zoom": 0.4818017509272822 + "flow": { + "uid": "cdc54643-3580-4336-b60f-98ffc2e8d02f", + "label": "Knowledge Graph Process Workflow", + "name": "knowledge_graph_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "position": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Knowledge Graph Operator", + "custom_label": null, + "name": "knowledge_graph_operator", + "description": "Extract documents and persist them to the graph database.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 323, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "position": { - "x": 6.722768991652174, - "y": -225.32501282124363, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 6.722768991652174, - "y": -225.32501282124363, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Graph Operator", - "custom_label": null, - "name": "knowledge_graph_operator", - "description": "Extract Documents and persist into graph database.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to graph store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeGraphOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator", - "parameters": [ - { - "type_name": "KnowledgeGraphBase", - "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge Graph Connector", - "name": "graph_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The knowledge graph.", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -812.1903428806644, - "y": -415.17234393736123, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -812.1903428806644, - "y": -415.17234393736123, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "position": { - "x": -446.7662140064656, - "y": 116.76439313193941, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -446.7662140064656, - "y": 116.76439313193941, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraph", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "label": "Builtin Knowledge Graph", - "custom_label": null, - "name": "builtin_knowledge_graph", - "description": "Builtin Knowledge Graph.", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Builtin Knowledge Graph Config.", - "name": "config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Builtin Knowledge Graph Config.", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 645, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "position": { - "x": -915.1247640485547, - "y": 148.92845384162234, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -915.1247640485547, - "y": 148.92845384162234, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "label": "Builtin Graph Config", - "custom_label": null, - "name": "knowledge_graph_config", - "description": "knowledge graph config.", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Graph Name", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "The name of Graph, if not set, will use the default name.", - "value": "dbgpt_collection_V1", - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Embedding Function", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The embedding function of vector store, if not set, will use the default embedding function.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Chunks Once Load", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "The max number of chunks to load at once. If your document is large, you can set this value to a larger number to speed up the loading process. Default is 10.", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Max Threads", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "The max number of threads to use. Default is 1. If you set this bigger than 1, please make sure your vector store is thread-safe.", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge Graph Type", - "name": "graph_store_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "TuGraph", - "placeholder": null, - "description": "graph store type.", - "value": "TuGraph", - "options": null - }, - { - "type_name": "LLMClient", - "type_cls": "dbgpt.core.interface.llm.LLMClient", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM Client", - "name": "llm_client", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "llm client for extract graph triplets.", - "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM Model Name", - "name": "model_name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "llm model name.", - "value": "zhipu_proxyllm", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1381.9120062303377, - "y": -370.57039313932444, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1381.9120062303377, - "y": -370.57039313932444, - "zoom": 0.0 - }, - "data": { - "label": "Knowledge Loader Operator", - "custom_label": null, - "name": "knowledge_operator", - "description": "The knowledge operator, which can create knowledge from datasource.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Default datasource", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Default datasource.", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Knowledge type", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "Knowledge type.", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2020.527087889374, - "y": -445.3470107479735, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2020.527087889374, - "y": -445.3470107479735, - "zoom": 0.0 - }, - "data": { - "label": "Dict Http Trigger", - "custom_label": null, - "name": "dict_http_trigger", - "description": "Trigger your workflow by http request, and parse the request body as a dict", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API Endpoint", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "The API endpoint", - "value": "/rag/knowledge/kg/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Methods", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "The methods of the API endpoint", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Streaming Response", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "Whether the response is streaming", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Response Body", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response body of the API endpoint", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Response Media Type", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "The response media type", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Http Status Code", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "The http status code", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 272, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "position": { - "x": -1506.5067155518987, - "y": 313.0562898282468, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1506.5067155518987, - "y": 313.0562898282468, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultLLMClient", - "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", - "label": "Default LLM Client", - "custom_label": null, - "name": "default_llm_client", - "description": "Default LLM client(Connect to your DB-GPT model serving)", - "category": "llm_client", - "category_label": "LLM Client", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.model.cluster.client.DefaultLLMClient", - "dbgpt.core.interface.llm.LLMClient" - ], - "parameters": [ - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Auto Convert Message", - "name": "auto_convert_message", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": true, - "placeholder": null, - "description": "Whether to auto convert the messages that are not supported by the LLM to a compatible format", - "value": null, - "options": null - } - ] - } - } + "parameters": [ + { + "type_name": "KnowledgeGraphBase", + "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Knowledge Graph Connector", + "name": "graph_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Knowledge graph.", + "options": null, + "value": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Text blocks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Assembled chunks persisted to the graph storage.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeGraphOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator" + }, + "position_absolute": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + } + }, + { + "width": 320, + "height": 422, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "position": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "BuiltinKnowledgeGraph", + "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "label": "Built-in Knowledge Graph", + "custom_label": null, + "name": "builtin_knowledge_graph", + "description": "Built-in knowledge graph.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "GraphStoreConfig", + "type_cls": "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Config", + "name": "config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Graph store configuration.", + "options": null, + "value": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Name", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt", + "placeholder": null, + "description": "Graph Store Name", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "LLMClient", + "type_cls": "dbgpt.core.interface.llm.LLMClient", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Large Language Model Client", + "name": "llm_client", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "Large language model client for extracting graph triples.", + "options": null, + "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Large Language Model Name", + "name": "llm_model", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "KG extract LLM model name.", + "options": null, + "value": "deepseek-chat", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + } + }, + { + "width": 320, + "height": 487, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "position": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "TuGraphStoreConfig", + "type_cls": "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "label": "TuGraph Graph Config", + "custom_label": null, + "name": "tugraph_config", + "description": "TuGraph configuration.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Host", + "name": "host", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "127.0.0.1", + "placeholder": null, + "description": "TuGraph host", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Port", + "name": "port", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "7687", + "placeholder": null, + "description": "TuGraph port", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Username", + "name": "username", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "admin", + "placeholder": null, + "description": "TuGraph username", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Password", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "73@TuGraph", + "placeholder": null, + "description": "TuGraph password", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + } + }, + { + "width": 320, + "height": 271, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "position": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultLLMClient", + "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", + "label": "Default Large Language Model Client", + "custom_label": null, + "name": "default_llm_client", + "description": "Default large language model client (connecting to your DB-GPT model service)", + "category": "llm_client", + "category_label": "LLM Client", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Auto Convert Message", + "name": "auto_convert_message", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": true, + "placeholder": null, + "description": "Whether to automatically convert messages that the large language model does not support into a compatible format.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.model.cluster.client.DefaultLLMClient", + "dbgpt.core.interface.llm.LLMClient" + ] + }, + "position_absolute": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + } + }, + { + "width": 320, + "height": 321, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Chunk Manager Operator", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "Splits knowledge documents into chunks.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chunk Splitting Parameters", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Parameters for chunk splitting.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "knowledge", + "description": "Knowledge to be loaded.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "Chunks", + "custom_label": null, + "name": "chunks", + "description": "Chunks split by the chunk manager.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + } + }, + { + "width": 320, + "height": 431, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Knowledge Loading Operator", + "custom_label": null, + "name": "knowledge_operator", + "description": "Knowledge operator that can create knowledge from data sources.", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Default Data Source", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Default data source.", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Knowledge Type", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "Type of knowledge.", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Knowledge Data Source", + "custom_label": null, + "name": "knowledge datasource", + "description": "Knowledge data source, can be a document, URL, or text.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "Knowledge", + "custom_label": null, + "name": "Knowledge", + "description": "Knowledge object.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + } + }, + { + "width": 320, + "height": 602, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "Dictionary HTTP Trigger", + "custom_label": null, + "name": "dict_http_trigger", + "description": "Triggers the workflow via an HTTP request and parses the request body as a dictionary.", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API Endpoint", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "The API endpoint.", + "options": null, + "value": "/rag/kg/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Method", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "Method for the API endpoint.", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Streaming Response", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "Whether the response is streamed.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Response Body", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response body for the API endpoint.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Response Media Type", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "Response media type.", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP Status Code", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP status code.", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "Request Body", + "custom_label": null, + "name": "request_body", + "description": "Request body for the API endpoint.", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + } } - } -} \ No newline at end of file + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 2, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + } + ], + "viewport": { + "x": 1147.3096968356867, + "y": 363.7692149963865, + "zoom": 0.5702862475657419 + } + }, + "description": "kg_process_workflow", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_kg_process_workflow_cdc54643-3580-4336-b60f-98ffc2e8d02f", + "gmt_created": "2025-03-23 15:08:37", + "gmt_modified": "2025-03-23 15:08:37", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/kg/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } +} diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/embedded-knowledge-process-flow-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/embedded-knowledge-process-flow-template.json index 209f9dd33..02ec71875 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/embedded-knowledge-process-flow-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/embedded-knowledge-process-flow-template.json @@ -1,811 +1,815 @@ { - "flow": { - "uid": "9d47fbd8-420d-439a-bda7-7ff7f6fa01db", - "label": "Embedding 向量加工工作流", - "name": "embedding_process_workflow", - "flow_category": null, - "description": "Embedding知识加工工作流", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-16 15:20:10", - "gmt_modified": "2024-12-16 15:20:10", - "metadata": { - "triggers": [ - { - "trigger_type": "http" - } - ], - "sse_output": false, - "streaming_output": false, - "tags": {} - }, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "target_order": 3, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|parameters|3", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 831.8128405437491, - "y": 421.4753242151554, - "zoom": 0.3846854569072972 + "flow": { + "uid": "6259d0cb-891b-43bd-b27a-01b69c825bb6", + "label": "Embedding Knowledge Process Workflow", + "name": "embedding_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "position": { + "x": 1036.5559482027597, + "y": 112.93198043952461, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "向量存储算子", + "custom_label": null, + "name": "vector_storage_operator", + "description": "将嵌入持久化到向量存储中。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 323, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "position": { - "x": -25.997695320590083, - "y": -90.04159277333981, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -25.997695320590083, - "y": -90.04159277333981, - "zoom": 0.0 - }, - "data": { - "label": "向量存储算子", - "custom_label": null, - "name": "vector_storage_operator", - "description": "将嵌入持久化到向量存储中。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to vector store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "VectorStorageOperator", - "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator", - "parameters": [ - { - "type_name": "VectorStoreBase", - "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "向量存储连接器", - "name": "vector_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "向量存储。", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -913.571872386726, - "y": -61.6367538649408, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -913.571872386726, - "y": -61.6367538649408, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "position": { - "x": -256.96257013540503, - "y": -509.98997877383584, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -256.96257013540503, - "y": -509.98997877383584, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaStore", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", - "label": "Chroma 向量存储", - "custom_label": null, - "name": "chroma_vector_store", - "description": "Chroma 向量存储。", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaStore", - "dbgpt.storage.vector_store.base.VectorStoreBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chroma 配置", - "name": "vector_store_config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的 Chroma 配置。", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 674, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "position": { - "x": -731.2095474673597, - "y": -879.5845342539665, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -731.2095474673597, - "y": -879.5845342539665, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "label": "Chroma 配置", - "custom_label": null, - "name": "chroma_vector_config", - "description": "Chroma 向量存储配置。", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig", - "dbgpt.storage.vector_store.base.VectorStoreConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "集合名称", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "向量存储的名称,如果不设置,将使用默认名称。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "用户", - "name": "user", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的用户,如果不设置,将使用默认用户。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "密码", - "name": "password", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的密码,如果不设置,将使用默认密码。", - "value": null, - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "嵌入函数", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", - "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "一次加载的最大块数", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "一次加载的最大块数。如果文档较大,可以将此值设置为较大的数字以加快加载过程,默认值为 10。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "最大线程数", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "使用的最大线程数,默认值为 1。如果设置为大于 1,请确保向量存储是线程安全的。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "持久化路径", - "name": "persist_path", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的持久化路径。", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1517.087378905087, - "y": -191.2030717055229, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1517.087378905087, - "y": -191.2030717055229, - "zoom": 0.0 - }, - "data": { - "label": "知识加载算子", - "custom_label": null, - "name": "knowledge_operator", - "description": "知识算子,可以从数据源创建知识。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "默认数据源", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "默认数据源。", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识类型", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "知识类型。", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "data": { - "label": "字典 HTTP 触发器", - "custom_label": null, - "name": "dict_http_trigger", - "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API 端点", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "API 端点", - "value": "/rag/knowledge/embedding/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 方法", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "API 端点的方法", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "流式响应", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "响应是否为流式", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 响应体", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "API 端点的响应体", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "响应媒体类型", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "响应媒体类型", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 状态码", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "HTTP 状态码", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 148, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "position": { - "x": -1297.0596621977236, - "y": -756.4644248292581, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1297.0596621977236, - "y": -756.4644248292581, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultEmbeddings", - "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "label": "Default Embeddings", - "custom_label": null, - "name": "default_embeddings", - "description": "Default embeddings(using default embedding model of current system)", - "category": "embeddings", - "category_label": "Embeddings", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "dbgpt.core.interface.embeddings.Embeddings" - ], - "parameters": [] - } - } + "parameters": [ + { + "type_name": "VectorStoreBase", + "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "向量存储连接器", + "name": "vector_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "向量存储。", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器分割的文本块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "已组装的块,已持久化到向量存储中。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "VectorStorageOperator", + "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator" + }, + "position_absolute": { + "x": 1036.5559482027597, + "y": 112.93198043952461, + "zoom": 0 + } + }, + { + "width": 320, + "height": 347, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "position": { + "x": 279.29806363580246, + "y": 287.53598714740707, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaStore", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "label": "Chroma 向量存储", + "custom_label": null, + "name": "chroma_vector_store", + "description": "Chroma 向量存储。", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chroma 配置", + "name": "vector_store_config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的 Chroma 配置。", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "集合名称", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt_collection", + "placeholder": null, + "description": "向量存储的名称,如果不设置,将使用默认名称。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "Embeddings", + "type_cls": "dbgpt.core.interface.embeddings.Embeddings", + "dynamic": false, + "dynamic_minimum": 0, + "label": "嵌入函数", + "name": "embedding_fn", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", + "options": null, + "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "dbgpt.storage.vector_store.base.VectorStoreBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": 279.29806363580246, + "y": 287.53598714740707, + "zoom": 0 + } + }, + { + "width": 320, + "height": 147, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "position": { + "x": -227.941619675604, + "y": -57.32513900638435, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultEmbeddings", + "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "label": "默认嵌入", + "custom_label": null, + "name": "default_embeddings", + "description": "默认嵌入(使用当前系统的默认嵌入模型)", + "category": "embeddings", + "category_label": "Embeddings", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "dbgpt.core.interface.embeddings.Embeddings" + ] + }, + "position_absolute": { + "x": -227.941619675604, + "y": -57.32513900638435, + "zoom": 0 + } + }, + { + "width": 320, + "height": 415, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "position": { + "x": -256.0502224268164, + "y": 228.68054202578486, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "label": "Chroma 配置", + "custom_label": null, + "name": "chroma_vector_config", + "description": "Chroma 向量存储配置。", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "用户", + "name": "user", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的用户,如果不设置,将使用默认用户。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "密码", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的密码,如果不设置,将使用默认密码。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "持久化路径", + "name": "persist_path", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的持久化路径。", + "options": null, + "value": "../../../../pilot/data", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dbgpt.storage.vector_store.base.VectorStoreConfig", + "dbgpt.storage.base.IndexStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -256.0502224268164, + "y": 228.68054202578486, + "zoom": 0 + } + }, + { + "width": 320, + "height": 320, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": 604.0551779510319, + "y": -164.0310479956741, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "分块管理算子", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "将知识文档拆分为分块。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "分块拆分参数", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "分块拆分参数。", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "knowledge", + "description": "要加载的知识。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "分块", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器拆分的分块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": 604.0551779510319, + "y": -164.0310479956741, + "zoom": 0 + } + }, + { + "width": 320, + "height": 430, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": 189.6032415868342, + "y": -652.1461566982952, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识加载算子", + "custom_label": null, + "name": "knowledge_operator", + "description": "知识算子,可从数据源创建知识。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "默认数据源", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "默认数据源。", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "知识类型", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "知识类型。", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "知识数据源", + "custom_label": null, + "name": "knowledge datasource", + "description": "知识数据源,可以是文档、URL 或文本。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "Knowledge", + "description": "知识对象。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": 189.6032415868342, + "y": -652.1461566982952, + "zoom": 0 + } + }, + { + "width": 320, + "height": 601, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -533.1682405026245, + "y": -723.1650941049104, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "字典 HTTP 触发器", + "custom_label": null, + "name": "dict_http_trigger", + "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API 端点", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "该 API 端点", + "options": null, + "value": "/rag/embdding/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 方法", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "API 端点的方法", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "流式响应", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "响应是否为流式", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 响应体", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "API 端点的响应体", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "响应媒体类型", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "响应媒体类型", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 状态码", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP 状态码", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "请求体", + "custom_label": null, + "name": "request_body", + "description": "API 端点的请求体", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -533.1682405026245, + "y": -723.1650941049104, + "zoom": 0 + } } - } + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_order": 0, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 2, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + } + ], + "viewport": { + "x": 402.1598068160989, + "y": 430.5231843092321, + "zoom": 0.6023610980904216 + } + }, + "description": "embedding_loader", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_embedding_loader_6259d0cb-891b-43bd-b27a-01b69c825bb6", + "gmt_created": "2025-03-21 00:17:45", + "gmt_modified": "2025-03-21 00:17:45", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/embdding/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } } \ No newline at end of file diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/hybrid-knowldge-process-flow-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/hybrid-knowldge-process-flow-template.json index 020f4289a..6e2db4b58 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/hybrid-knowldge-process-flow-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/hybrid-knowldge-process-flow-template.json @@ -1,1403 +1,1427 @@ { - "flow": { - "uid": "382e5131-cabc-4665-bffc-8f83be2e8fa8", - "label": "Knowledge Process Workflow", - "name": "hybrid_knowledge_process_workflow_zh", - "flow_category": null, - "description": "结合Embedding和知识图谱抽取的混合知识加工工作流", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-14 15:57:44", - "gmt_modified": "2024-12-14 15:57:44", - "metadata": { - "triggers": [ - { - "trigger_type": "http" - } - ], - "sse_output": false, - "streaming_output": false, - "tags": {} - }, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "source_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "target_order": 1, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|1", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "target_order": 0, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "source_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "source_order": 0, - "target": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "target_order": 3, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", - "target_handle": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0|parameters|3", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "target_order": 5, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|parameters|5", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_order": 1, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|1", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_process_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 862.7562630728534, - "y": 416.4952851718194, - "zoom": 0.3836649890553727 + "flow": { + "uid": "0cfbd62e-12cb-4327-8ed7-05be16daf9e5", + "label": "Hybrid Knowledge Process Workflow", + "name": "hybrid_knowledge_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "position": { + "x": 1411.6470892072725, + "y": -38.326644335267716, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识图谱算子", + "custom_label": null, + "name": "knowledge_graph_operator", + "description": "提取文档并持久化到图数据库中。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 275, - "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "position": { - "x": 604.5, - "y": 77.0, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 604.5, - "y": 77.0, - "zoom": 0.0 - }, - "data": { - "label": "知识处理合并算子", - "custom_label": null, - "name": "knowledge_process_join_operator", - "description": "根据知识处理结果合并工作流分支。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "join", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Knowledge Graph Storage Results", - "custom_label": null, - "name": "input_value", - "description": "knowledge graph storage results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Knowledge Graph Storage Results", - "custom_label": null, - "name": "input_value", - "description": "knowledge graph storage results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Knowledge Process Results.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeProcessJoinOperator", - "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessJoinOperator", - "parameters": [] - } - }, - { - "width": 320, - "height": 323, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "position": { - "x": 174.16583729394188, - "y": -131.63401513480102, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 174.16583729394188, - "y": -131.63401513480102, - "zoom": 0.0 - }, - "data": { - "label": "向量存储算子", - "custom_label": null, - "name": "vector_storage_operator", - "description": "将嵌入持久化到向量存储中。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to vector store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "VectorStorageOperator", - "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator", - "parameters": [ - { - "type_name": "VectorStoreBase", - "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "向量存储连接器", - "name": "vector_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "向量存储。", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 323, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "position": { - "x": 180.89103763027083, - "y": 341.37174185366564, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 180.89103763027083, - "y": 341.37174185366564, - "zoom": 0.0 - }, - "data": { - "label": "知识图谱算子", - "custom_label": null, - "name": "knowledge_graph_operator", - "description": "提取文档并持久化到图数据库中。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to graph store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeGraphOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator", - "parameters": [ - { - "type_name": "KnowledgeGraphBase", - "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识图谱连接器", - "name": "graph_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "知识图谱。", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -1056.545824254249, - "y": -163.01828337100258, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1056.545824254249, - "y": -163.01828337100258, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "position": { - "x": -306.391788536534, - "y": 491.0961943850906, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -306.391788536534, - "y": 491.0961943850906, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraph", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "label": "内置知识图谱", - "custom_label": null, - "name": "builtin_knowledge_graph", - "description": "内置知识图谱。", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "内置知识图谱配置。", - "name": "config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "内置知识图谱配置。", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 645, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "position": { - "x": -813.7432345424928, - "y": 328.2957752754239, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -813.7432345424928, - "y": 328.2957752754239, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "label": "内置图配置", - "custom_label": null, - "name": "knowledge_graph_config", - "description": "知识图谱配置。", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "图名称", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "图的名称,如果不设置,将使用默认名称。", - "value": "dbgpt_collection_V1", - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "嵌入函数", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "一次加载的最大块数", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "一次加载的最大块数。如果文档较大,可以将此值设置为较大的数字以加快加载过程,默认值为 10。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "最大线程数", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "使用的最大线程数,默认值为 1。如果设置为大于 1,请确保向量存储是线程安全的。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识图谱类型", - "name": "graph_store_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "TuGraph", - "placeholder": null, - "description": "图存储类型。", - "value": "TuGraph", - "options": null - }, - { - "type_name": "LLMClient", - "type_cls": "dbgpt.core.interface.llm.LLMClient", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM 客户端", - "name": "llm_client", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "用于提取图三元组的 LLM 客户端。", - "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM 模型名称", - "name": "model_name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "LLM 模型名称。", - "value": "zhipu_proxyllm", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaStore_0", - "position": { - "x": -251.7635173402225, - "y": -367.01602690631285, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -251.7635173402225, - "y": -367.01602690631285, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaStore", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", - "label": "Chroma 向量存储", - "custom_label": null, - "name": "chroma_vector_store", - "description": "Chroma 向量存储。", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaStore", - "dbgpt.storage.vector_store.base.VectorStoreBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chroma 配置", - "name": "vector_store_config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的 Chroma 配置。", - "value": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 674, - "id": "resource_dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "position": { - "x": -684.4180723107158, - "y": -934.1745886033843, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -684.4180723107158, - "y": -934.1745886033843, - "zoom": 0.0 - }, - "data": { - "type_name": "ChromaVectorConfig", - "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", - "label": "Chroma 配置", - "custom_label": null, - "name": "chroma_vector_config", - "description": "Chroma 向量存储配置。", - "category": "vector_store", - "category_label": "Vector Store", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.vector_store.chroma_store.ChromaVectorConfig", - "dbgpt.storage.vector_store.base.VectorStoreConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "集合名称", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "向量存储的名称,如果不设置,将使用默认名称。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "用户", - "name": "user", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的用户,如果不设置,将使用默认用户。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "密码", - "name": "password", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的密码,如果不设置,将使用默认密码。", - "value": null, - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "嵌入函数", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", - "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "一次加载的最大块数", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "一次加载的最大块数。如果文档较大,可以将此值设置为较大的数字以加快加载过程,默认值为 10。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "最大线程数", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "使用的最大线程数,默认值为 1。如果设置为大于 1,请确保向量存储是线程安全的。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "持久化路径", - "name": "persist_path", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的持久化路径。", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1558.679801266548, - "y": -149.61064934406164, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1558.679801266548, - "y": -149.61064934406164, - "zoom": 0.0 - }, - "data": { - "label": "知识加载算子", - "custom_label": null, - "name": "knowledge_operator", - "description": "知识算子,可以从数据源创建知识。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "默认数据源", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "默认数据源。", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识类型", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "知识类型。", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2015.3280350941911, - "y": -603.9181210010445, - "zoom": 0.0 - }, - "data": { - "label": "字典 HTTP 触发器", - "custom_label": null, - "name": "dict_http_trigger", - "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API 端点", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "API 端点", - "value": "/rag/knowledge/hybrid/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 方法", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "API 端点的方法", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "流式响应", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "响应是否为流式", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 响应体", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "API 端点的响应体", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "响应媒体类型", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "响应媒体类型", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 状态码", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "HTTP 状态码", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 148, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "position": { - "x": -1112.4932879687394, - "y": -753.8648984316667, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1112.4932879687394, - "y": -753.8648984316667, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultEmbeddings", - "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "label": "Default Embeddings", - "custom_label": null, - "name": "default_embeddings", - "description": "Default embeddings(using default embedding model of current system)", - "category": "embeddings", - "category_label": "Embeddings", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", - "dbgpt.core.interface.embeddings.Embeddings" - ], - "parameters": [] - } - }, - { - "width": 320, - "height": 272, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "position": { - "x": -1350.535131696419, - "y": 435.2340305150391, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1350.535131696419, - "y": 435.2340305150391, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultLLMClient", - "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", - "label": "默认 LLM 客户端", - "custom_label": null, - "name": "default_llm_client", - "description": "默认 LLM 客户端(连接到你的 DB-GPT 模型服务)", - "category": "llm_client", - "category_label": "LLM Client", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.model.cluster.client.DefaultLLMClient", - "dbgpt.core.interface.llm.LLMClient" - ], - "parameters": [ - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "自动转换消息", - "name": "auto_convert_message", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": true, - "placeholder": null, - "description": "是否自动将 LLM 不支持的消息转换为兼容格式", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 295, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "position": { - "x": -614.4846931519926, - "y": -92.5163519851338, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -614.4846931519926, - "y": -92.5163519851338, - "zoom": 0.0 - }, - "data": { - "label": "知识处理分支算子", - "custom_label": null, - "name": "knowledge_process_operator", - "description": "根据请求的流标志分支工作流。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "branch", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Document Chunks", - "custom_label": null, - "name": "input_value", - "description": "The input value of the operator.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - }, - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "Chunks for Full Text Connector.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeProcessBranchOperator", - "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessBranchOperator", - "parameters": [] - } - } + "parameters": [ + { + "type_name": "KnowledgeGraphBase", + "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "知识图谱连接器", + "name": "graph_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "知识图谱。", + "options": null, + "value": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器分割的文本块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "已组装的块,已持久化到图存储中。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeGraphOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator" + }, + "position_absolute": { + "x": 1411.6470892072725, + "y": -38.326644335267716, + "zoom": 0 + } + }, + { + "width": 320, + "height": 422, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "position": { + "x": 599.3745706799307, + "y": 59.99520109857846, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "BuiltinKnowledgeGraph", + "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "label": "内置知识图谱", + "custom_label": null, + "name": "builtin_knowledge_graph", + "description": "内置知识图谱。", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "GraphStoreConfig", + "type_cls": "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Config", + "name": "config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "graph store config.", + "options": null, + "value": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Name", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt", + "placeholder": null, + "description": "Graph Store Name", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "LLMClient", + "type_cls": "dbgpt.core.interface.llm.LLMClient", + "dynamic": false, + "dynamic_minimum": 0, + "label": "大语言模型客户端", + "name": "llm_client", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "用于提取图三元组的大语言模型客户端。", + "options": null, + "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "大语言模型名称", + "name": "llm_model", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "kg extract llm model name.", + "options": null, + "value": "deepseek-chat", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": 599.3745706799307, + "y": 59.99520109857846, + "zoom": 0 + } + }, + { + "width": 320, + "height": 321, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": 222.8465944162242, + "y": 465.5728135131935, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "分块管理算子", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "将知识文档拆分为分块。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "分块拆分参数", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "分块拆分参数。", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "knowledge", + "description": "要加载的知识。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "分块", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器拆分的分块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": 222.8465944162242, + "y": 465.5728135131935, + "zoom": 0 + } + }, + { + "width": 320, + "height": 431, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": -405.2959226622788, + "y": 69.60391667321142, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识加载算子", + "custom_label": null, + "name": "knowledge_operator", + "description": "知识算子,可从数据源创建知识。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "默认数据源", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "默认数据源。", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "知识类型", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "知识类型。", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "知识数据源", + "custom_label": null, + "name": "knowledge datasource", + "description": "知识数据源,可以是文档、URL 或文本。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "Knowledge", + "description": "知识对象。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": -405.2959226622788, + "y": 69.60391667321142, + "zoom": 0 + } + }, + { + "width": 320, + "height": 487, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "position": { + "x": -92.46479788362194, + "y": -193.32469561901746, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "TuGraphStoreConfig", + "type_cls": "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "label": "TuGraph Graph Config", + "custom_label": null, + "name": "tugraph_config", + "description": "TuGraph config.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "host", + "name": "host", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "127.0.0.1", + "placeholder": null, + "description": "TuGraph host", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "port", + "name": "port", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "7687", + "placeholder": null, + "description": "TuGraph port", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "username", + "name": "username", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "admin", + "placeholder": null, + "description": "TuGraph username", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "password", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "73@TuGraph", + "placeholder": null, + "description": "TuGraph password", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -92.46479788362194, + "y": -193.32469561901746, + "zoom": 0 + } + }, + { + "width": 320, + "height": 295, + "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", + "position": { + "x": 723.3941711703499, + "y": 554.5838684685964, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识处理分支算子", + "custom_label": null, + "name": "knowledge_process_operator", + "description": "根据请求的流标志对工作流进行分支处理。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [], + "operator_type": "branch", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "文档片段", + "custom_label": null, + "name": "input_value", + "description": "算子的输入值。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "用于向量存储连接器的片段。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + }, + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "用于知识图谱连接器的片段。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + }, + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "用于全文连接器的片段。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeProcessBranchOperator", + "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessBranchOperator" + }, + "position_absolute": { + "x": 723.3941711703499, + "y": 554.5838684685964, + "zoom": 0 + } + }, + { + "width": 320, + "height": 322, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "position": { + "x": 1456.1153783921256, + "y": 593.6146610876866, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "向量存储算子", + "custom_label": null, + "name": "vector_storage_operator", + "description": "将嵌入持久化到向量存储中。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "VectorStoreBase", + "type_cls": "dbgpt.storage.vector_store.base.VectorStoreBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "向量存储连接器", + "name": "vector_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "向量存储。", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器分割的文本块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "已组装的块,已持久化到向量存储中。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "VectorStorageOperator", + "type_cls": "dbgpt_ext.rag.operators.vector_store.VectorStorageOperator" + }, + "position_absolute": { + "x": 1456.1153783921256, + "y": 593.6146610876866, + "zoom": 0 + } + }, + { + "width": 320, + "height": 347, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "position": { + "x": 907.5241726191889, + "y": 879.6418478043298, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaStore", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "label": "Chroma 向量存储", + "custom_label": null, + "name": "chroma_vector_store", + "description": "Chroma 向量存储。", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Chroma 配置", + "name": "vector_store_config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的 Chroma 配置。", + "options": null, + "value": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "集合名称", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt_collection", + "placeholder": null, + "description": "向量存储的名称,如果不设置,将使用默认名称。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "Embeddings", + "type_cls": "dbgpt.core.interface.embeddings.Embeddings", + "dynamic": false, + "dynamic_minimum": 0, + "label": "嵌入函数", + "name": "embedding_fn", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", + "options": null, + "value": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaStore", + "dbgpt.storage.vector_store.base.VectorStoreBase", + "dbgpt.storage.base.IndexStoreBase" + ] + }, + "position_absolute": { + "x": 907.5241726191889, + "y": 879.6418478043298, + "zoom": 0 + } + }, + { + "width": 320, + "height": 415, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "position": { + "x": 382.3961345066016, + "y": 807.0177574270571, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "ChromaVectorConfig", + "type_cls": "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "label": "Chroma 配置", + "custom_label": null, + "name": "chroma_vector_config", + "description": "Chroma 向量存储配置。", + "category": "vector_store", + "category_label": "Vector Store", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "用户", + "name": "user", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的用户,如果不设置,将使用默认用户。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "密码", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的密码,如果不设置,将使用默认密码。", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "持久化路径", + "name": "persist_path", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "向量存储的持久化路径。", + "options": null, + "value": "../../../../pilot/data/", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig", + "dbgpt.storage.vector_store.base.VectorStoreConfig", + "dbgpt.storage.base.IndexStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": 382.3961345066016, + "y": 807.0177574270571, + "zoom": 0 + } + }, + { + "width": 320, + "height": 147, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "position": { + "x": 259.4938277142942, + "y": 1272.9292295397142, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultEmbeddings", + "type_cls": "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "label": "默认嵌入", + "custom_label": null, + "name": "default_embeddings", + "description": "默认嵌入(使用当前系统的默认嵌入模型)", + "category": "embeddings", + "category_label": "Embeddings", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings", + "dbgpt.core.interface.embeddings.Embeddings" + ] + }, + "position_absolute": { + "x": 259.4938277142942, + "y": 1272.9292295397142, + "zoom": 0 + } + }, + { + "width": 320, + "height": 274, + "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "position": { + "x": 2165.129987575471, + "y": 166.93328876509636, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识处理合并算子", + "custom_label": null, + "name": "knowledge_process_join_operator", + "description": "根据知识处理结果合并工作流分支。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [], + "operator_type": "join", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "向量存储结果", + "custom_label": null, + "name": "input_value", + "description": "向量存储结果。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + }, + { + "type_name": "List", + "type_cls": "typing.List", + "label": "知识图谱存储结果", + "custom_label": null, + "name": "input_value", + "description": "知识图谱存储结果。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "知识处理结果。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeProcessJoinOperator", + "type_cls": "dbgpt_ext.rag.operators.process_branch.KnowledgeProcessJoinOperator" + }, + "position_absolute": { + "x": 2165.129987575471, + "y": 166.93328876509636, + "zoom": 0 + } + }, + { + "width": 320, + "height": 602, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -1282.6533830800306, + "y": -3.208721146208659, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "字典 HTTP 触发器", + "custom_label": null, + "name": "dict_http_trigger", + "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API 端点", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "该 API 端点", + "options": null, + "value": "/rag/hybrid/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 方法", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "API 端点的方法", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "流式响应", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "响应是否为流式", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 响应体", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "API 端点的响应体", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "响应媒体类型", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "响应媒体类型", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 状态码", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP 状态码", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "请求体", + "custom_label": null, + "name": "request_body", + "description": "API 端点的请求体", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -1282.6533830800306, + "y": -3.208721146208659, + "zoom": 0 + } + }, + { + "width": 320, + "height": 271, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "position": { + "x": 186.02528738076245, + "y": -194.21720397116448, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultLLMClient", + "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", + "label": "默认大语言模型客户端", + "custom_label": null, + "name": "default_llm_client", + "description": "默认大语言模型客户端(连接到你的 DB-GPT 模型服务)", + "category": "llm_client", + "category_label": "LLM Client", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "自动转换消息", + "name": "auto_convert_message", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": true, + "placeholder": null, + "description": "是否自动将大语言模型不支持的消息转换为兼容格式", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.model.cluster.client.DefaultLLMClient", + "dbgpt.core.interface.llm.LLMClient" + ] + }, + "position_absolute": { + "x": 186.02528738076245, + "y": -194.21720397116448, + "zoom": 0 + } } - } + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "source_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_1|parameters|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_process_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_process_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "target_order": 0, + "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_1|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_process_operator___$$___rag___$$___v1_0", + "source_order": 1, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_process_operator___$$___rag___$$___v1_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_process_operator___$$___rag___$$___v1_0|outputs|1", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_order": 0, + "target": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|outputs|0", + "target_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaVectorConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "target_order": 2, + "id": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0", + "source_handle": "resource_dbgpt.rag.embedding.embedding_factory.DefaultEmbeddings_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.vector_store.chroma_store.ChromaStore_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_graph_operator___$$___rag___$$___v1_1", + "source_order": 0, + "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_1|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_1|outputs|0", + "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_vector_storage_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "target_order": 1, + "id": "operator_vector_storage_operator___$$___rag___$$___v1_0|operator_knowledge_process_join_operator___$$___rag___$$___v1_0", + "source_handle": "operator_vector_storage_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_process_join_operator___$$___rag___$$___v1_0|inputs|1", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 2, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|2", + "type": "buttonedge" + } + ], + "viewport": { + "x": 415.10457550936326, + "y": 157.66572621099635, + "zoom": 0.6230089797061746 + } + }, + "description": "hybrid_process_workflow", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_hybrid_process_workflow_0cfbd62e-12cb-4327-8ed7-05be16daf9e5", + "gmt_created": "2025-03-23 15:22:01", + "gmt_modified": "2025-03-23 15:22:01", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/hybrid/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } } \ No newline at end of file diff --git a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/kg-knowledge-process-flow-template.json b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/kg-knowledge-process-flow-template.json index b55bdd3b8..9271fa9a7 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/kg-knowledge-process-flow-template.json +++ b/packages/dbgpt-serve/src/dbgpt_serve/flow/templates/zh/kg-knowledge-process-flow-template.json @@ -1,829 +1,872 @@ { - "flow": { - "uid": "5ffb9d22-f749-4338-8562-141d276b54c7", - "label": "知识图谱加工工作流", - "name": "knowledge_graph_process_workflow", - "flow_category": null, - "description": "知识图谱知识加工工作流", - "state": "initializing", - "error_message": "", - "source": "DBGPT-WEB", - "source_url": null, - "version": "0.1.1", - "define_type": "json", - "editable": false, - "user_name": null, - "sys_code": null, - "dag_id": null, - "gmt_created": "2024-12-16 17:51:31", - "gmt_modified": "2024-12-16 17:51:31", - "metadata": { - "triggers": [ - { - "trigger_type": "http" - } - ], - "sse_output": false, - "streaming_output": false, - "tags": {} - }, - "variables": null, - "authors": null, - "flow_data": { - "edges": [ - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "target_order": 0, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "source_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", - "type": "buttonedge" - }, - { - "source": "operator_knowledge_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", - "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - }, - { - "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "source_order": 0, - "target": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "target_order": 5, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", - "target_handle": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0|parameters|5", - "type": "buttonedge" - }, - { - "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "source_order": 0, - "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "target_order": 0, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", - "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", - "type": "buttonedge" - } - ], - "viewport": { - "x": 831.8128405437491, - "y": 421.4753242151554, - "zoom": 0.3846854569072972 + "flow": { + "uid": "cdc54643-3580-4336-b60f-98ffc2e8d02f", + "label": "Knowledge Graph Process Workflow", + "name": "knowledge_graph_process_workflow", + "flow_category": null, + "flow_data": { + "nodes": [ + { + "width": 320, + "height": 322, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "position": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识图谱算子", + "custom_label": null, + "name": "knowledge_graph_operator", + "description": "提取文档并持久化到图数据库中。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" }, - "nodes": [ - { - "width": 320, - "height": 323, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "position": { - "x": 6.722768991652174, - "y": -225.32501282124363, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": 6.722768991652174, - "y": -225.32501282124363, - "zoom": 0.0 - }, - "data": { - "label": "知识图谱算子", - "custom_label": null, - "name": "knowledge_graph_operator", - "description": "提取文档并持久化到图数据库中。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The text split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The assembled chunks, it has been persisted to graph store.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeGraphOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator", - "parameters": [ - { - "type_name": "KnowledgeGraphBase", - "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识图谱连接器", - "name": "graph_store", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "知识图谱。", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 321, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "position": { - "x": -812.1903428806644, - "y": -415.17234393736123, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -812.1903428806644, - "y": -415.17234393736123, - "zoom": 0.0 - }, - "data": { - "label": "Chunk Manager Operator", - "custom_label": null, - "name": "chunk_manager_operator", - "description": " Split Knowledge Documents into chunks.", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "knowledge", - "description": "The knowledge to be loaded.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "List", - "type_cls": "typing.List", - "label": "Chunks", - "custom_label": null, - "name": "chunks", - "description": "The split chunks by chunk manager.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": true, - "mappers": null - } - ], - "version": "v1", - "type_name": "ChunkManagerOperator", - "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator", - "parameters": [ - { - "type_name": "ChunkParameters", - "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", - "dynamic": false, - "dynamic_minimum": 0, - "label": "Chunk Split Parameters", - "name": "chunk_parameters", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "Chunk Split Parameters.", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 234, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "position": { - "x": -446.7662140064656, - "y": 116.76439313193941, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -446.7662140064656, - "y": 116.76439313193941, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraph", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "label": "内置知识图谱", - "custom_label": null, - "name": "builtin_knowledge_graph", - "description": "内置知识图谱。", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", - "dbgpt.rag.index.base.IndexStoreBase" - ], - "parameters": [ - { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dynamic": false, - "dynamic_minimum": 0, - "label": "内置知识图谱配置。", - "name": "config", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "内置知识图谱配置。", - "value": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 645, - "id": "resource_dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "position": { - "x": -915.1247640485547, - "y": 148.92845384162234, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -915.1247640485547, - "y": 148.92845384162234, - "zoom": 0.0 - }, - "data": { - "type_name": "BuiltinKnowledgeGraphConfig", - "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "label": "内置图配置", - "custom_label": null, - "name": "knowledge_graph_config", - "description": "知识图谱配置。", - "category": "knowledge_graph", - "category_label": "Knowledge Graph", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraphConfig", - "dbgpt.storage.knowledge_graph.base.KnowledgeGraphConfig", - "dbgpt.rag.index.base.IndexStoreConfig", - "pydantic.main.BaseModel" - ], - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "图名称", - "name": "name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "dbgpt_collection", - "placeholder": null, - "description": "图的名称,如果不设置,将使用默认名称。", - "value": "dbgpt_collection_V1", - "options": null - }, - { - "type_name": "Embeddings", - "type_cls": "dbgpt.core.interface.embeddings.Embeddings", - "dynamic": false, - "dynamic_minimum": 0, - "label": "嵌入函数", - "name": "embedding_fn", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "向量存储的嵌入函数,如果不设置,将使用默认嵌入函数。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "一次加载的最大块数", - "name": "max_chunks_once_load", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 10, - "placeholder": null, - "description": "一次加载的最大块数。如果文档较大,可以将此值设置为较大的数字以加快加载过程,默认值为 10。", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "最大线程数", - "name": "max_threads", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 1, - "placeholder": null, - "description": "使用的最大线程数,默认值为 1。如果设置为大于 1,请确保向量存储是线程安全的。", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识图谱类型", - "name": "graph_store_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "TuGraph", - "placeholder": null, - "description": "图存储类型。", - "value": "TuGraph", - "options": null - }, - { - "type_name": "LLMClient", - "type_cls": "dbgpt.core.interface.llm.LLMClient", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM 客户端", - "name": "llm_client", - "is_list": false, - "category": "resource", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "用于提取图三元组的 LLM 客户端。", - "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "LLM 模型名称", - "name": "model_name", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "LLM 模型名称。", - "value": "zhipu_proxyllm", - "options": null - } - ] - } - }, - { - "width": 320, - "height": 431, - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "position": { - "x": -1381.9120062303377, - "y": -370.57039313932444, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1381.9120062303377, - "y": -370.57039313932444, - "zoom": 0.0 - }, - "data": { - "label": "知识加载算子", - "custom_label": null, - "name": "knowledge_operator", - "description": "知识算子,可以从数据源创建知识。", - "category": "rag", - "category_label": "RAG", - "flow_type": "operator", - "icon": null, - "documentation_url": "https://github.com/openai/openai-python", - "id": "operator_knowledge_operator___$$___rag___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "map", - "inputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "knowledge datasource", - "custom_label": null, - "name": "knowledge datasource", - "description": "knowledge datasource, which can be a document, url, or text.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "outputs": [ - { - "type_name": "Knowledge", - "type_cls": "dbgpt.rag.knowledge.base.Knowledge", - "label": "Knowledge", - "custom_label": null, - "name": "Knowledge", - "description": "Knowledge object.", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "KnowledgeOperator", - "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "默认数据源", - "name": "datasource", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "默认数据源。", - "value": "../../docs/docs/awel/awel.md", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "知识类型", - "name": "knowledge_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "DOCUMENT", - "placeholder": null, - "description": "知识类型。", - "value": null, - "options": [ - { - "label": "DOCUMENT", - "name": "DOCUMENT", - "value": "DOCUMENT", - "children": null - }, - { - "label": "URL", - "name": "URL", - "value": "URL", - "children": null - }, - { - "label": "TEXT", - "name": "TEXT", - "value": "TEXT", - "children": null - } - ] - } - ] - } - }, - { - "width": 320, - "height": 602, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "position": { - "x": -2020.527087889374, - "y": -445.3470107479735, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -2020.527087889374, - "y": -445.3470107479735, - "zoom": 0.0 - }, - "data": { - "label": "字典 HTTP 触发器", - "custom_label": null, - "name": "dict_http_trigger", - "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", - "category": "trigger", - "category_label": "Trigger", - "flow_type": "operator", - "icon": null, - "documentation_url": null, - "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", - "tags": { - "ui_version": "flow2.0" - }, - "operator_type": "input", - "inputs": [], - "outputs": [ - { - "type_name": "dict", - "type_cls": "builtins.dict", - "label": "Request Body", - "custom_label": null, - "name": "request_body", - "description": "The request body of the API endpoint", - "dynamic": false, - "dynamic_minimum": 0, - "is_list": false, - "mappers": null - } - ], - "version": "v1", - "type_name": "DictHttpTrigger", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger", - "parameters": [ - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "API 端点", - "name": "endpoint", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": false, - "default": null, - "placeholder": null, - "description": "API 端点", - "value": "/rag/knowledge/kg/process", - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 方法", - "name": "methods", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": "POST", - "placeholder": null, - "description": "API 端点的方法", - "value": null, - "options": [ - { - "label": "HTTP Method PUT", - "name": "http_put", - "value": "PUT", - "children": null - }, - { - "label": "HTTP Method POST", - "name": "http_post", - "value": "POST", - "children": null - } - ] - }, - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "流式响应", - "name": "streaming_response", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": false, - "placeholder": null, - "description": "响应是否为流式", - "value": null, - "options": null - }, - { - "type_name": "BaseHttpBody", - "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 响应体", - "name": "http_response_body", - "is_list": false, - "category": "resource", - "resource_type": "class", - "optional": true, - "default": null, - "placeholder": null, - "description": "API 端点的响应体", - "value": null, - "options": null - }, - { - "type_name": "str", - "type_cls": "builtins.str", - "dynamic": false, - "dynamic_minimum": 0, - "label": "响应媒体类型", - "name": "response_media_type", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": null, - "placeholder": null, - "description": "响应媒体类型", - "value": null, - "options": null - }, - { - "type_name": "int", - "type_cls": "builtins.int", - "dynamic": false, - "dynamic_minimum": 0, - "label": "HTTP 状态码", - "name": "status_code", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": 200, - "placeholder": null, - "description": "HTTP 状态码", - "value": null, - "options": null - } - ] - } - }, - { - "width": 320, - "height": 272, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "position": { - "x": -1506.5067155518987, - "y": 313.0562898282468, - "zoom": 0.0 - }, - "type": "customNode", - "position_absolute": { - "x": -1506.5067155518987, - "y": 313.0562898282468, - "zoom": 0.0 - }, - "data": { - "type_name": "DefaultLLMClient", - "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", - "label": "默认 LLM 客户端", - "custom_label": null, - "name": "default_llm_client", - "description": "默认 LLM 客户端(连接到你的 DB-GPT 模型服务)", - "category": "llm_client", - "category_label": "LLM Client", - "flow_type": "resource", - "icon": null, - "documentation_url": null, - "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", - "tags": { - "ui_version": "flow2.0" - }, - "resource_type": "instance", - "parent_cls": [ - "dbgpt.model.cluster.client.DefaultLLMClient", - "dbgpt.core.interface.llm.LLMClient" - ], - "parameters": [ - { - "type_name": "bool", - "type_cls": "builtins.bool", - "dynamic": false, - "dynamic_minimum": 0, - "label": "自动转换消息", - "name": "auto_convert_message", - "is_list": false, - "category": "common", - "resource_type": "instance", - "optional": true, - "default": true, - "placeholder": null, - "description": "是否自动将 LLM 不支持的消息转换为兼容格式", - "value": null, - "options": null - } - ] - } - } + "parameters": [ + { + "type_name": "KnowledgeGraphBase", + "type_cls": "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dynamic": false, + "dynamic_minimum": 0, + "label": "知识图谱连接器", + "name": "graph_store", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "知识图谱。", + "options": null, + "value": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器分割的文本块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "片段", + "custom_label": null, + "name": "chunks", + "description": "已组装的块,已持久化到图存储中。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeGraphOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge_graph.KnowledgeGraphOperator" + }, + "position_absolute": { + "x": 796.5195731576282, + "y": 111.73735196916329, + "zoom": 0 + } + }, + { + "width": 320, + "height": 422, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "position": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "BuiltinKnowledgeGraph", + "type_cls": "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "label": "内置知识图谱", + "custom_label": null, + "name": "builtin_knowledge_graph", + "description": "内置知识图谱。", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "GraphStoreConfig", + "type_cls": "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Config", + "name": "config", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "graph store config.", + "options": null, + "value": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "Graph Store Name", + "name": "name", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "dbgpt", + "placeholder": null, + "description": "Graph Store Name", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "LLMClient", + "type_cls": "dbgpt.core.interface.llm.LLMClient", + "dynamic": false, + "dynamic_minimum": 0, + "label": "大语言模型客户端", + "name": "llm_client", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "用于提取图三元组的大语言模型客户端。", + "options": null, + "value": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "大语言模型名称", + "name": "llm_model", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "kg extract llm model name.", + "options": null, + "value": "deepseek-chat", + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph", + "dbgpt.storage.knowledge_graph.base.KnowledgeGraphBase", + "dbgpt.storage.base.IndexStoreBase" ] + }, + "position_absolute": { + "x": -200.32005170651587, + "y": -39.894408781624506, + "zoom": 0 + } + }, + { + "width": 320, + "height": 487, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "position": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "TuGraphStoreConfig", + "type_cls": "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "label": "TuGraph Graph Config", + "custom_label": null, + "name": "tugraph_config", + "description": "TuGraph config.", + "category": "knowledge_graph", + "category_label": "Knowledge Graph", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "host", + "name": "host", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "127.0.0.1", + "placeholder": null, + "description": "TuGraph host", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "port", + "name": "port", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "7687", + "placeholder": null, + "description": "TuGraph port", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "username", + "name": "username", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "admin", + "placeholder": null, + "description": "TuGraph username", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "password", + "name": "password", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "73@TuGraph", + "placeholder": null, + "description": "TuGraph password", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig", + "dbgpt.storage.graph_store.base.GraphStoreConfig", + "dbgpt.util.parameter_utils.BaseParameters", + "dbgpt.util.configure.manager.RegisterParameters" + ] + }, + "position_absolute": { + "x": -927.1566862476618, + "y": -377.6300177089023, + "zoom": 0 + } + }, + { + "width": 320, + "height": 271, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "position": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + }, + "type": "customNode", + "data": { + "type_name": "DefaultLLMClient", + "type_cls": "dbgpt.model.cluster.client.DefaultLLMClient", + "label": "默认大语言模型客户端", + "custom_label": null, + "name": "default_llm_client", + "description": "默认大语言模型客户端(连接到你的 DB-GPT 模型服务)", + "category": "llm_client", + "category_label": "LLM Client", + "flow_type": "resource", + "icon": null, + "documentation_url": null, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "自动转换消息", + "name": "auto_convert_message", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": true, + "placeholder": null, + "description": "是否自动将大语言模型不支持的消息转换为兼容格式", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "resource_type": "instance", + "parent_cls": [ + "dbgpt.model.cluster.client.DefaultLLMClient", + "dbgpt.core.interface.llm.LLMClient" + ] + }, + "position_absolute": { + "x": -872.4380440767798, + "y": 167.73244926088748, + "zoom": 0 + } + }, + { + "width": 320, + "height": 321, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "position": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "分块管理算子", + "custom_label": null, + "name": "chunk_manager_operator", + "description": "将知识文档拆分为分块。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "ChunkParameters", + "type_cls": "dbgpt_ext.rag.chunk_manager.ChunkParameters", + "dynamic": false, + "dynamic_minimum": 0, + "label": "分块拆分参数", + "name": "chunk_parameters", + "is_list": false, + "category": "resource", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "分块拆分参数。", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "knowledge", + "description": "要加载的知识。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "List", + "type_cls": "typing.List", + "label": "分块", + "custom_label": null, + "name": "chunks", + "description": "由分块管理器拆分的分块。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": true, + "mappers": null + } + ], + "version": "v1", + "type_name": "ChunkManagerOperator", + "type_cls": "dbgpt.rag.operators.chunk_manager.ChunkManagerOperator" + }, + "position_absolute": { + "x": -108.20100842346244, + "y": 516.1078044155024, + "zoom": 0 + } + }, + { + "width": 320, + "height": 431, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "position": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "知识加载算子", + "custom_label": null, + "name": "knowledge_operator", + "description": "知识算子,可从数据源创建知识。", + "category": "rag", + "category_label": "RAG", + "flow_type": "operator", + "icon": null, + "documentation_url": "https://github.com/openai/openai-python", + "id": "operator_knowledge_operator___$$___rag___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "默认数据源", + "name": "datasource", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "默认数据源。", + "options": null, + "value": "../../../../docs/docs/quickstart.md", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "知识类型", + "name": "knowledge_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "DOCUMENT", + "placeholder": null, + "description": "知识类型。", + "options": [ + { + "label": "DOCUMENT", + "name": "DOCUMENT", + "value": "DOCUMENT", + "children": null + }, + { + "label": "URL", + "name": "URL", + "value": "URL", + "children": null + }, + { + "label": "TEXT", + "name": "TEXT", + "value": "TEXT", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "map", + "inputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "知识数据源", + "custom_label": null, + "name": "knowledge datasource", + "description": "知识数据源,可以是文档、URL 或文本。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "outputs": [ + { + "type_name": "Knowledge", + "type_cls": "dbgpt.rag.knowledge.base.Knowledge", + "label": "知识", + "custom_label": null, + "name": "Knowledge", + "description": "知识对象。", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "KnowledgeOperator", + "type_cls": "dbgpt_ext.rag.operators.knowledge.KnowledgeOperator" + }, + "position_absolute": { + "x": -845.0787229913389, + "y": 683.9116404062069, + "zoom": 0 + } + }, + { + "width": 320, + "height": 602, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "position": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + }, + "type": "customNode", + "data": { + "label": "字典 HTTP 触发器", + "custom_label": null, + "name": "dict_http_trigger", + "description": "通过 HTTP 请求触发工作流,并将请求体解析为字典", + "category": "trigger", + "category_label": "Trigger", + "flow_type": "operator", + "icon": null, + "documentation_url": null, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "tags": { + "ui_version": "flow2.0" + }, + "parameters": [ + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "API 端点", + "name": "endpoint", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": false, + "default": null, + "placeholder": null, + "description": "该 API 端点", + "options": null, + "value": "/rag/kg/process", + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 方法", + "name": "methods", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": "POST", + "placeholder": null, + "description": "API 端点的方法", + "options": [ + { + "label": "HTTP Method PUT", + "name": "http_put", + "value": "PUT", + "children": null + }, + { + "label": "HTTP Method POST", + "name": "http_post", + "value": "POST", + "children": null + } + ], + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "bool", + "type_cls": "builtins.bool", + "dynamic": false, + "dynamic_minimum": 0, + "label": "流式响应", + "name": "streaming_response", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": false, + "placeholder": null, + "description": "响应是否为流式", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "BaseHttpBody", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.BaseHttpBody", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 响应体", + "name": "http_response_body", + "is_list": false, + "category": "resource", + "resource_type": "class", + "optional": true, + "default": null, + "placeholder": null, + "description": "API 端点的响应体", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "str", + "type_cls": "builtins.str", + "dynamic": false, + "dynamic_minimum": 0, + "label": "响应媒体类型", + "name": "response_media_type", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": null, + "placeholder": null, + "description": "响应媒体类型", + "options": null, + "value": null, + "alias": null, + "ui": null + }, + { + "type_name": "int", + "type_cls": "builtins.int", + "dynamic": false, + "dynamic_minimum": 0, + "label": "HTTP 状态码", + "name": "status_code", + "is_list": false, + "category": "common", + "resource_type": "instance", + "optional": true, + "default": 200, + "placeholder": null, + "description": "HTTP 状态码", + "options": null, + "value": null, + "alias": null, + "ui": null + } + ], + "operator_type": "input", + "inputs": [], + "outputs": [ + { + "type_name": "dict", + "type_cls": "builtins.dict", + "label": "请求体", + "custom_label": null, + "name": "request_body", + "description": "API 端点的请求体", + "dynamic": false, + "dynamic_minimum": 0, + "is_list": false, + "mappers": null + } + ], + "version": "v1", + "type_name": "DictHttpTrigger", + "type_cls": "dbgpt.core.awel.trigger.http_trigger.DictHttpTrigger" + }, + "position_absolute": { + "x": -1862.8454673697427, + "y": 71.06284809232952, + "zoom": 0 + } } - } + ], + "edges": [ + { + "source": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 0, + "id": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt_ext.storage.graph_store.tugraph_store.TuGraphStoreConfig_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|0", + "type": "buttonedge" + }, + { + "source": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0", + "source_order": 0, + "target": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "target_order": 2, + "id": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0", + "source_handle": "resource_dbgpt.model.cluster.client.DefaultLLMClient_0|outputs|0", + "target_handle": "resource_dbgpt_ext.storage.knowledge_graph.knowledge_graph.BuiltinKnowledgeGraph_0|parameters|2", + "type": "buttonedge" + }, + { + "source": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_chunk_manager_operator___$$___rag___$$___v1_0|operator_knowledge_graph_operator___$$___rag___$$___v1_0", + "source_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_graph_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_knowledge_operator___$$___rag___$$___v1_0", + "source_order": 0, + "target": "operator_chunk_manager_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_knowledge_operator___$$___rag___$$___v1_0|operator_chunk_manager_operator___$$___rag___$$___v1_0", + "source_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|outputs|0", + "target_handle": "operator_chunk_manager_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + }, + { + "source": "operator_dict_http_trigger___$$___trigger___$$___v1_0", + "source_order": 0, + "target": "operator_knowledge_operator___$$___rag___$$___v1_0", + "target_order": 0, + "id": "operator_dict_http_trigger___$$___trigger___$$___v1_0|operator_knowledge_operator___$$___rag___$$___v1_0", + "source_handle": "operator_dict_http_trigger___$$___trigger___$$___v1_0|outputs|0", + "target_handle": "operator_knowledge_operator___$$___rag___$$___v1_0|inputs|0", + "type": "buttonedge" + } + ], + "viewport": { + "x": 1147.3096968356867, + "y": 363.7692149963865, + "zoom": 0.5702862475657419 + } + }, + "description": "kg_process_workflow", + "state": "running", + "error_message": "", + "source": "DBGPT-WEB", + "source_url": null, + "version": "0.1.1", + "define_type": "json", + "editable": true, + "user_name": null, + "sys_code": null, + "dag_id": "flow_dag_kg_process_workflow_cdc54643-3580-4336-b60f-98ffc2e8d02f", + "gmt_created": "2025-03-23 15:08:37", + "gmt_modified": "2025-03-23 15:08:37", + "metadata": { + "sse_output": false, + "streaming_output": false, + "tags": {}, + "triggers": [ + { + "trigger_type": "http", + "path": "/api/v1/awel/trigger/rag/kg/process", + "methods": [ + "POST" + ], + "trigger_mode": "command" + } + ] + }, + "variables": null, + "authors": null + } } \ No newline at end of file From d095091525bacebf6be8c698f91f0a3e138dae65 Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Sun, 23 Mar 2025 19:17:43 +0800 Subject: [PATCH 2/3] fix:rag workflow error fix --- .../knowledge_graph/community_summary.py | 29 +++++++++++++++---- .../knowledge_graph/knowledge_graph.py | 3 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py index 8c29bb6a8..1bd45bd95 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py @@ -22,7 +22,6 @@ from dbgpt_ext.storage.knowledge_graph.community.community_store import Communit from dbgpt_ext.storage.knowledge_graph.knowledge_graph import ( GRAPH_PARAMETERS, BuiltinKnowledgeGraph, - BuiltinKnowledgeGraphConfig, ) logger = logging.getLogger(__name__) @@ -146,14 +145,34 @@ logger = logging.getLogger(__name__) description=_("Community Summary Knowledge Graph."), parameters=[ Parameter.build_from( - _("Community Summary Knowledge Graph Config."), + _("Graph Store Config"), "config", - BuiltinKnowledgeGraphConfig, - description=_("Community Summary Knowledge Graph Config."), + GraphStoreConfig, + description=_("graph store config."), + ), + Parameter.build_from( + _("Graph Store Name"), + "name", + str, + optional=True, + default="dbgpt", + description=_("Graph Store Name"), + ), + Parameter.build_from( + _("LLM Client"), + "llm_client", + LLMClient, + description=_("llm client for extract graph triplets."), + ), + Parameter.build_from( + _("LLM Model Name"), + "llm_model", + str, + description=_("kg extract llm model name."), optional=True, default=None, ), - ], + ] ) class CommunitySummaryKnowledgeGraph(BuiltinKnowledgeGraph): """Community summary knowledge graph class.""" diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py index c8396a718..3184af298 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py @@ -3,7 +3,6 @@ import asyncio import logging import os -from dataclasses import dataclass, field from typing import List, Optional, Any from dbgpt.core import Chunk, Embeddings, LLMClient @@ -11,7 +10,7 @@ from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.rag.transformer.keyword_extractor import KeywordExtractor from dbgpt.storage.graph_store.base import GraphStoreBase, GraphStoreConfig from dbgpt.storage.graph_store.graph import Graph -from dbgpt.storage.knowledge_graph.base import KnowledgeGraphBase, KnowledgeGraphConfig +from dbgpt.storage.knowledge_graph.base import KnowledgeGraphBase from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util.i18n_utils import _ from dbgpt_ext.rag.transformer.triplet_extractor import TripletExtractor From 4f2903a6b71f5370c816e357775b89b868f07da3 Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Sun, 23 Mar 2025 19:31:49 +0800 Subject: [PATCH 3/3] chore:fmt --- .../src/dbgpt_ext/storage/graph_store/tugraph_store.py | 4 ++-- .../dbgpt_ext/storage/knowledge_graph/community_summary.py | 3 +-- .../src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py | 3 +-- .../src/dbgpt_ext/storage/vector_store/chroma_store.py | 3 ++- .../src/dbgpt_ext/storage/vector_store/elastic_store.py | 3 ++- .../src/dbgpt_ext/storage/vector_store/milvus_store.py | 3 ++- .../src/dbgpt_ext/storage/vector_store/oceanbase_store.py | 3 ++- .../src/dbgpt_ext/storage/vector_store/pgvector_store.py | 3 ++- .../src/dbgpt_ext/storage/vector_store/weaviate_store.py | 3 ++- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py index 7560c3250..961b88ed0 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/graph_store/tugraph_store.py @@ -7,11 +7,11 @@ import os from dataclasses import dataclass, field from typing import List -from dbgpt.core.awel.flow import register_resource, ResourceCategory, Parameter +from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.graph_store.base import GraphStoreBase, GraphStoreConfig from dbgpt.storage.graph_store.graph import GraphElemType -from dbgpt_ext.datasource.conn_tugraph import TuGraphConnector from dbgpt.util.i18n_utils import _ +from dbgpt_ext.datasource.conn_tugraph import TuGraphConnector logger = logging.getLogger(__name__) diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py index 1bd45bd95..6871a2d4d 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/community_summary.py @@ -172,7 +172,7 @@ logger = logging.getLogger(__name__) optional=True, default=None, ), - ] + ], ) class CommunitySummaryKnowledgeGraph(BuiltinKnowledgeGraph): """Community summary knowledge graph class.""" @@ -304,7 +304,6 @@ class CommunitySummaryKnowledgeGraph(BuiltinKnowledgeGraph): """Get the knowledge graph config.""" return self._config - @property def embeddings(self) -> Embeddings: """Get the knowledge graph config.""" diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py index 3184af298..ad235c8e3 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/knowledge_graph/knowledge_graph.py @@ -3,7 +3,7 @@ import asyncio import logging import os -from typing import List, Optional, Any +from typing import Any, List, Optional from dbgpt.core import Chunk, Embeddings, LLMClient from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource @@ -147,7 +147,6 @@ GRAPH_PARAMETERS = [ optional=True, default=None, ), - ], ) class BuiltinKnowledgeGraph(KnowledgeGraphBase): diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py index 6d2918cc7..a518e87be 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/chroma_store.py @@ -12,8 +12,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util import string_utils diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py index aa8bd0559..cce3ea65e 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/elastic_store.py @@ -11,8 +11,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util import string_utils diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py index 48e045c3d..01203b4d9 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/milvus_store.py @@ -12,8 +12,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util import string_utils diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py index c1400fbd8..4abedd4a0 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/oceanbase_store.py @@ -16,8 +16,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import FilterOperator, MetadataFilters from dbgpt.util.i18n_utils import _ diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py index 22ec34eb7..01d266c44 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/pgvector_store.py @@ -8,8 +8,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util.i18n_utils import _ diff --git a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py index 74c798d45..e120a8421 100644 --- a/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py +++ b/packages/dbgpt-ext/src/dbgpt_ext/storage/vector_store/weaviate_store.py @@ -9,8 +9,9 @@ from dbgpt.core import Chunk, Embeddings from dbgpt.core.awel.flow import Parameter, ResourceCategory, register_resource from dbgpt.storage.vector_store.base import ( _COMMON_PARAMETERS, + _VECTOR_STORE_COMMON_PARAMETERS, VectorStoreBase, - VectorStoreConfig, _VECTOR_STORE_COMMON_PARAMETERS, + VectorStoreConfig, ) from dbgpt.storage.vector_store.filters import MetadataFilters from dbgpt.util.i18n_utils import _