Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:update awel embedding examples and delete unuseful code. #1073

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions dbgpt/app/component_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ def initialize_components(
system_app.register(DefaultExecutorFactory)
system_app.register_instance(controller)

# Register global default RAGGraphFactory
# from dbgpt.graph.graph_factory import DefaultRAGGraphFactory

# system_app.register(DefaultRAGGraphFactory)

from dbgpt.serve.agent.hub.controller import module_agent

system_app.register_instance(module_agent)
Expand Down
24 changes: 0 additions & 24 deletions dbgpt/app/knowledge/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,30 +497,6 @@ def get_document_chunks(self, request: ChunkQueryRequest):
res.page = request.page
return res

def async_knowledge_graph(self, chunk_docs, doc):
"""async document extract triplets and save into graph db
Args:
- chunk_docs: List[Document]
- doc: KnowledgeDocumentEntity
"""
logger.info(
f"async_knowledge_graph, doc:{doc.doc_name}, chunk_size:{len(chunk_docs)}, begin embedding to graph store"
)
try:
from dbgpt.rag.graph.graph_factory import RAGGraphFactory

rag_engine = CFG.SYSTEM_APP.get_component(
ComponentType.RAG_GRAPH_DEFAULT.value, RAGGraphFactory
).create()
rag_engine.knowledge_graph(chunk_docs)
doc.status = SyncStatus.FINISHED.name
doc.result = "document build graph success"
except Exception as e:
doc.status = SyncStatus.FAILED.name
doc.result = "document build graph failed" + str(e)
logger.error(f"document build graph failed:{doc.doc_name}, {str(e)}")
return knowledge_document_dao.update_knowledge_document(doc)

def async_doc_embedding(self, assembler, chunk_docs, doc):
"""async document embedding into vector db
Args:
Expand Down
148 changes: 0 additions & 148 deletions dbgpt/rag/graph/graph_engine.py

This file was deleted.

35 changes: 0 additions & 35 deletions dbgpt/rag/graph/graph_factory.py

This file was deleted.

Loading
Loading