Skip to content

Commit 86d3f5f

Browse files
authored
Merge pull request #694 from GraphScope/dag-inspector
refactor(graphy): Provide a common DAGInspector abstract
2 parents 9df9fa3 + c0f6f8a commit 86d3f5f

File tree

12 files changed

+688
-596
lines changed

12 files changed

+688
-596
lines changed

python/graphy/apps/demo_app.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from apps.paper_reading import SurveyPaperReading
2-
from apps.paper_reading.paper_reading_nodes import ProgressInfo, NameDesc
32
from workflow import ThreadPoolWorkflowExecutor
4-
from config import WF_UPLOADS_DIR, WF_OUTPUT_DIR, WF_DATA_DIR, WF_VECTDB_DIR
3+
from config import WF_UPLOADS_DIR, WF_OUTPUT_DIR, WF_DATA_DIR
54
from utils.data_extractor import (
65
GraphBuilder,
76
)
@@ -10,9 +9,11 @@
109
from utils.profiler import profiler
1110
from db import JsonFileStore
1211
from graph.nodes.chain_node import BaseChainNode
12+
from graph.nodes.dag_node import ProgressInfo
1313
from apps.text_generator import ReportGenerator
1414
from models import set_llm_model, DefaultEmbedding, DEFAULT_LLM_MODEL_CONFIG
1515

16+
from langchain_core.pydantic_v1 import BaseModel, Field, create_model
1617
from threading import Thread
1718
from flask import Flask, request, jsonify, send_file
1819
from werkzeug.utils import secure_filename
@@ -38,6 +39,11 @@
3839
DEFAULT_DATASET_ID = "0"
3940

4041

42+
class NameDesc(BaseModel):
43+
name: str = Field(description=("A short name that describes the given content."))
44+
description: str = Field(description="A detailed description of the content.")
45+
46+
4147
def list_files_in_folder(folder_path):
4248
files = []
4349
if os.path.isdir(folder_path):

python/graphy/apps/paper_reading/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77
PaperNavigateArxivEdge,
88
PaperNavigateScholarEdge,
99
)
10-
from .paper_reading_nodes import (
11-
PaperInspector,
12-
PaperExtractor,
13-
)
10+
from .paper_reading_nodes import PaperInspector
1411
from .survey_paper_reading import SurveyPaperReading
1512

1613
__all__ = [
1714
"PaperNavigateEdge",
1815
"PaperNavigateArxivEdge",
1916
"PaperNavigateScholarEdge",
2017
"PaperInspector",
21-
"PaperExtractor",
2218
"SurveyPaperReading",
2319
]

0 commit comments

Comments
 (0)