|
1 | 1 | from apps.paper_reading import SurveyPaperReading |
2 | | -from apps.paper_reading.paper_reading_nodes import ProgressInfo, NameDesc |
3 | 2 | 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 |
5 | 4 | from utils.data_extractor import ( |
6 | 5 | GraphBuilder, |
7 | 6 | ) |
|
10 | 9 | from utils.profiler import profiler |
11 | 10 | from db import JsonFileStore |
12 | 11 | from graph.nodes.chain_node import BaseChainNode |
| 12 | +from graph.nodes.dag_node import ProgressInfo |
13 | 13 | from apps.text_generator import ReportGenerator |
14 | 14 | from models import set_llm_model, DefaultEmbedding, DEFAULT_LLM_MODEL_CONFIG |
15 | 15 |
|
| 16 | +from langchain_core.pydantic_v1 import BaseModel, Field, create_model |
16 | 17 | from threading import Thread |
17 | 18 | from flask import Flask, request, jsonify, send_file |
18 | 19 | from werkzeug.utils import secure_filename |
|
38 | 39 | DEFAULT_DATASET_ID = "0" |
39 | 40 |
|
40 | 41 |
|
| 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 | + |
41 | 47 | def list_files_in_folder(folder_path): |
42 | 48 | files = [] |
43 | 49 | if os.path.isdir(folder_path): |
|
0 commit comments