@ -0,0 +1,51 @@
|
||||
import asyncio
|
||||
|
||||
from utils.DocxUtil import get_docx_content_by_pandoc
|
||||
from utils.LightRagUtil import configure_logging, initialize_rag
|
||||
import os
|
||||
|
||||
# 数学
|
||||
KEMU = 'Math' # Chinese,Math,Chemistry
|
||||
|
||||
# 组装文件路径
|
||||
# WORKING_DIR = "./Topic/" + KEMU
|
||||
# docx_file = 'static/Txt/' + KEMU + '.docx'
|
||||
|
||||
WORKING_DIR = "./Topic/CESHI"
|
||||
docx_file = 'static/Txt/' + KEMU + '.docx'
|
||||
|
||||
async def main():
|
||||
# 注释掉或删除以下清理代码
|
||||
files_to_delete = [
|
||||
"graph_chunk_entity_relation.graphml",
|
||||
"kv_store_doc_status.json",
|
||||
"kv_store_full_docs.json",
|
||||
"kv_store_text_chunks.json",
|
||||
"vdb_chunks.json",
|
||||
"vdb_entities.json",
|
||||
"vdb_relationships.json",
|
||||
]
|
||||
|
||||
# 获取docx文件的内容
|
||||
content = get_docx_content_by_pandoc(docx_file)
|
||||
|
||||
# 删除文件
|
||||
# for file in files_to_delete:
|
||||
# file_path = os.path.join(WORKING_DIR, file)
|
||||
# if os.path.exists(file_path):
|
||||
# os.remove(file_path)
|
||||
# print(f"Deleting old file:: {file_path}")
|
||||
|
||||
try:
|
||||
rag = await initialize_rag(WORKING_DIR)
|
||||
await rag.ainsert(content)
|
||||
print("\nIndexing completed successfully!")
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
finally:
|
||||
await rag.finalize_storages()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
configure_logging()
|
||||
asyncio.run(main())
|
@ -0,0 +1,185 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
|
||||
<key id="d11" for="edge" attr.name="created_at" attr.type="long" />
|
||||
<key id="d10" for="edge" attr.name="file_path" attr.type="string" />
|
||||
<key id="d9" for="edge" attr.name="source_id" attr.type="string" />
|
||||
<key id="d8" for="edge" attr.name="keywords" attr.type="string" />
|
||||
<key id="d7" for="edge" attr.name="description" attr.type="string" />
|
||||
<key id="d6" for="edge" attr.name="weight" attr.type="double" />
|
||||
<key id="d5" for="node" attr.name="created_at" attr.type="long" />
|
||||
<key id="d4" for="node" attr.name="file_path" attr.type="string" />
|
||||
<key id="d3" for="node" attr.name="source_id" attr.type="string" />
|
||||
<key id="d2" for="node" attr.name="description" attr.type="string" />
|
||||
<key id="d1" for="node" attr.name="entity_type" attr.type="string" />
|
||||
<key id="d0" for="node" attr.name="entity_id" attr.type="string" />
|
||||
<graph edgedefault="undirected">
|
||||
<node id="Nitric Acid">
|
||||
<data key="d0">Nitric Acid</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Nitric acid (HNO₃) is a chemical compound involved in photodecomposition and reactions with iron oxide.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Iron Oxide">
|
||||
<data key="d0">Iron Oxide</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Iron oxide (FeO) reacts with nitric acid under heating to produce iron nitrate, water, and nitrogen dioxide.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Hydrogen">
|
||||
<data key="d0">Hydrogen</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Hydrogen (H₂) is a chemical element that reacts with oxygen in a combustion reaction to form water.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Oxygen">
|
||||
<data key="d0">Oxygen</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Oxygen (O₂) is a chemical element involved in combustion reactions, such as with hydrogen to form water.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Water">
|
||||
<data key="d0">Water</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Water (H₂O) is the product of the combustion reaction between hydrogen and oxygen.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Nitric Acid Photodecomposition">
|
||||
<data key="d0">Nitric Acid Photodecomposition</data>
|
||||
<data key="d1">event</data>
|
||||
<data key="d2">The chemical reaction where nitric acid decomposes under light to produce nitrogen dioxide, oxygen, and water.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Iron Oxide-Nitric Acid Reaction">
|
||||
<data key="d0">Iron Oxide-Nitric Acid Reaction</data>
|
||||
<data key="d1">event</data>
|
||||
<data key="d2">The chemical reaction where iron oxide reacts with nitric acid under heating to produce iron nitrate, water, and nitrogen dioxide.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Hydrogen-Oxygen Combustion">
|
||||
<data key="d0">Hydrogen-Oxygen Combustion</data>
|
||||
<data key="d1">event</data>
|
||||
<data key="d2">The chemical reaction where hydrogen burns with oxygen to produce water.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Nitrogen Dioxide">
|
||||
<data key="d0">Nitrogen Dioxide</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">NO₂ is a product of both nitric acid photodecomposition and iron oxide-nitric acid reactions.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Oxygen Gas">
|
||||
<data key="d0">Oxygen Gas</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">O₂ is produced in nitric acid photodecomposition and consumed in hydrogen-oxygen combustion.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<node id="Iron Nitrate">
|
||||
<data key="d0">Iron Nitrate</data>
|
||||
<data key="d1">category</data>
|
||||
<data key="d2">Fe(NO₃)₃ is produced in the reaction between iron oxide and nitric acid.</data>
|
||||
<data key="d3">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d4">unknown_source</data>
|
||||
<data key="d5">1752104774</data>
|
||||
</node>
|
||||
<edge source="Nitric Acid" target="Iron Oxide">
|
||||
<data key="d6">8.0</data>
|
||||
<data key="d7">Nitric acid reacts with iron oxide under heating to produce iron nitrate, water, and nitrogen dioxide.</data>
|
||||
<data key="d8">chemical reaction,heating</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Nitric Acid" target="Nitric Acid Photodecomposition">
|
||||
<data key="d6">9.0</data>
|
||||
<data key="d7">Nitric acid undergoes photodecomposition to produce nitrogen dioxide and oxygen.</data>
|
||||
<data key="d8">chemical decomposition,light reaction</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Iron Oxide" target="Iron Oxide-Nitric Acid Reaction">
|
||||
<data key="d6">8.0</data>
|
||||
<data key="d7">Iron oxide reacts with nitric acid under heating to form iron nitrate.</data>
|
||||
<data key="d8">acid-base reaction,thermal decomposition</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Hydrogen" target="Oxygen">
|
||||
<data key="d6">9.0</data>
|
||||
<data key="d7">Hydrogen and oxygen undergo a combustion reaction to form water.</data>
|
||||
<data key="d8">chemical reaction,combustion</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Hydrogen" target="Hydrogen-Oxygen Combustion">
|
||||
<data key="d6">10.0</data>
|
||||
<data key="d7">Hydrogen combusts with oxygen to form water.</data>
|
||||
<data key="d8">combustion,redox reaction</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Water" target="Hydrogen-Oxygen Combustion">
|
||||
<data key="d6">9.0</data>
|
||||
<data key="d7">Hydrogen-oxygen combustion produces water as the main product.</data>
|
||||
<data key="d8">chemical synthesis,exothermic reaction</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Nitric Acid Photodecomposition" target="Nitrogen Dioxide">
|
||||
<data key="d6">7.0</data>
|
||||
<data key="d7">Nitric acid photodecomposition produces nitrogen dioxide as a product.</data>
|
||||
<data key="d8">chemical product,gas evolution</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Nitric Acid Photodecomposition" target="Oxygen Gas">
|
||||
<data key="d6">8.0</data>
|
||||
<data key="d7">Nitric acid photodecomposition releases oxygen gas.</data>
|
||||
<data key="d8">decomposition product,gas production</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Iron Oxide-Nitric Acid Reaction" target="Nitrogen Dioxide">
|
||||
<data key="d6">7.0</data>
|
||||
<data key="d7">The reaction between iron oxide and nitric acid produces nitrogen dioxide.</data>
|
||||
<data key="d8">chemical byproduct,gas formation</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
<edge source="Iron Oxide-Nitric Acid Reaction" target="Iron Nitrate">
|
||||
<data key="d6">8.0</data>
|
||||
<data key="d7">The reaction produces iron nitrate as a main product.</data>
|
||||
<data key="d8">chemical synthesis,salt formation</data>
|
||||
<data key="d9">chunk-5fd997bf730fefbe622c9cec52b1d3db</data>
|
||||
<data key="d10">unknown_source</data>
|
||||
<data key="d11">1752104774</data>
|
||||
</edge>
|
||||
</graph>
|
||||
</graphml>
|
@ -0,0 +1,23 @@
|
||||
# routes/LoginController.py
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from utils.Database import *
|
||||
from auth.dependencies import get_current_user
|
||||
|
||||
# 创建一个路由实例,需要依赖get_current_user,登录后才能访问
|
||||
router = APIRouter(dependencies=[Depends(get_current_user)])
|
||||
|
||||
|
||||
@router.get("/getStageSubjectList")
|
||||
async def get_stage_subject_list():
|
||||
# 先查询学段list
|
||||
select_stage_sql: str = "select stage_id, stage_name from t_dm_stage where b_use = 1 order by sort_id;"
|
||||
stage_list = await find_by_sql(select_stage_sql, ())
|
||||
for stage in stage_list:
|
||||
# 再查询学科list
|
||||
select_subject_sql: str = "select subject_id, subject_name from t_dm_subject where stage_id = %s order by sort_id;"
|
||||
subject_list = await find_by_sql(select_subject_sql, (stage["stage_id"],))
|
||||
stage["subject_list"] = subject_list
|
||||
|
||||
return {"success": True, "message": "成功!", "data": stage_list}
|
@ -0,0 +1,13 @@
|
||||
# routes/LoginController.py
|
||||
|
||||
from fastapi import APIRouter, Request, Response, Depends
|
||||
|
||||
from auth.dependencies import get_current_user
|
||||
|
||||
# 创建一个路由实例,需要依赖get_current_user,登录后才能访问
|
||||
router = APIRouter(dependencies=[Depends(get_current_user)])
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def test(request: Request, response: Response):
|
||||
return {"success": True, "message": "成功!"}
|
@ -0,0 +1,12 @@
|
||||
# routes/LoginController.py
|
||||
|
||||
from fastapi import APIRouter, Request, Response, Depends
|
||||
from auth.dependencies import *
|
||||
|
||||
# 创建一个路由实例,需要依赖get_current_user,登录后才能访问
|
||||
router = APIRouter(dependencies=[Depends(get_current_user)])
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def test(request: Request, response: Response):
|
||||
return {"success": True, "message": "成功!"}
|
@ -0,0 +1,23 @@
|
||||
# routes/LoginController.py
|
||||
|
||||
from fastapi import APIRouter, Request
|
||||
|
||||
from utils.ParseRequest import *
|
||||
|
||||
# 创建一个路由实例
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/parse", response_model=dict)
|
||||
async def parse_query(request: Request):
|
||||
request_data = await parse_request_data(request)
|
||||
return request_data
|
||||
@router.post("/parse", response_model=dict)
|
||||
async def parse_form(request: Request):
|
||||
request_data = await parse_request_data(request)
|
||||
return request_data
|
||||
|
||||
@router.post("/parse_json", response_model=dict)
|
||||
async def parse_json(request: Request):
|
||||
request_data = await parse_request_data(request)
|
||||
return request_data
|
@ -0,0 +1,52 @@
|
||||
# routes/LoginController.py
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from utils.ParseRequest import *
|
||||
from auth.dependencies import *
|
||||
from utils.Database import *
|
||||
|
||||
# 创建一个路由实例,需要依赖get_current_user,登录后才能访问
|
||||
router = APIRouter(dependencies=[Depends(get_current_user)])
|
||||
|
||||
|
||||
@router.get("/list")
|
||||
async def list(request: Request):
|
||||
# 获取参数
|
||||
person_id = await get_request_str_param(request, "person_id", True, True)
|
||||
stage_id = await get_request_num_param(request, "stage_id", False, True, -1)
|
||||
subject_id = await get_request_num_param(request, "subject_id", False, True, -1)
|
||||
page_number = await get_request_num_param(request, "page_number", False, True,1)
|
||||
page_size = await get_request_num_param(request, "page_size", False, True, 10)
|
||||
theme_name = await get_request_str_param(request, "theme_name", False, True)
|
||||
|
||||
print(stage_id, person_id, subject_id, page_number, page_size, theme_name)
|
||||
|
||||
# 拼接查询SQL语句
|
||||
select_theme_sql: str = " SELECT * FROM t_ai_teaching_model_theme WHERE is_deleted = 0 and person_id = '" + person_id + "'"
|
||||
if stage_id != -1:
|
||||
select_theme_sql += " and stage_id = " + stage_id
|
||||
if subject_id != -1:
|
||||
select_theme_sql += " and subject_id = " + subject_id
|
||||
if theme_name != "":
|
||||
select_theme_sql += " and theme_name = '" + theme_name + "'"
|
||||
select_theme_sql += " ORDER BY create_time DESC"
|
||||
|
||||
# 查询主题列表
|
||||
page = await get_page_data_by_sql(select_theme_sql, page_number, page_size)
|
||||
|
||||
return {"success": True, "message": "查询成功!", "data": page}
|
||||
|
||||
|
||||
@router.post("/save")
|
||||
async def save(request: Request):
|
||||
# 获取参数
|
||||
id = await get_request_num_param(request, "id", False, True, 0)
|
||||
theme_name = await get_request_str_param(request, "theme_name", True, True)
|
||||
theme_icon = await get_request_str_param(request, "theme_icon", False, True)
|
||||
stage_id = await get_request_num_param(request, "stage_id", True, True, None)
|
||||
subject_id = await get_request_num_param(request, "subject_id", True, True, None)
|
||||
person_id = await get_request_str_param(request, "person_id", True, True)
|
||||
bureau_id = await get_request_str_param(request, "bureau_id", True, True)
|
||||
# 业务逻辑处理
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
# dependencies.py
|
||||
|
||||
from fastapi import Request, HTTPException, status, Header
|
||||
from utils.JwtUtil import *
|
||||
|
||||
async def get_current_user(token: str = Header(None, description="Authorization token")):
|
||||
if token is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="未提供令牌,请登录后使用!",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
token = token.split(" ")[1] if token.startswith("Bearer ") else token
|
||||
payload = verify_token(token)
|
||||
if payload is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="无法验证凭据,请登录后使用!",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
user_id = payload.get("user_id")
|
||||
identity_id = payload.get("identity_id")
|
||||
if user_id is None or identity_id is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="无法验证用户,请重新登录后使用!",
|
||||
headers={"WWW-Authenticate": "Bearer"},
|
||||
)
|
||||
return user_id
|
@ -0,0 +1,35 @@
|
||||
# 大模型 【DeepSeek深度求索官方】
|
||||
#LLM_API_KEY = "sk-44ae895eeb614aa1a9c6460579e322f1"
|
||||
#LLM_BASE_URL = "https://api.deepseek.com"
|
||||
#LLM_MODEL_NAME = "deepseek-chat"
|
||||
|
||||
# 阿里云提供的大模型服务
|
||||
LLM_API_KEY="sk-f6da0c787eff4b0389e4ad03a35a911f"
|
||||
LLM_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
||||
#LLM_MODEL_NAME = "qwen-plus" # 不要使用通义千问,会导致化学方程式不正确!
|
||||
LLM_MODEL_NAME = "deepseek-v3"
|
||||
|
||||
EMBED_MODEL_NAME = "BAAI/bge-m3"
|
||||
EMBED_API_KEY = "sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl"
|
||||
EMBED_BASE_URL = "https://api.siliconflow.cn/v1"
|
||||
EMBED_DIM = 1024
|
||||
EMBED_MAX_TOKEN_SIZE = 8192
|
||||
|
||||
|
||||
NEO4J_URI = "bolt://localhost:7687"
|
||||
NEO4J_USERNAME = "neo4j"
|
||||
NEO4J_PASSWORD = "DsideaL147258369"
|
||||
|
||||
|
||||
# MYSQL配置信息
|
||||
MYSQL_HOST = "127.0.0.1"
|
||||
MYSQL_PORT = 22066
|
||||
MYSQL_USER = "root"
|
||||
MYSQL_PASSWORD = "DsideaL147258369"
|
||||
MYSQL_DB_NAME = "base_db"
|
||||
MYSQL_POOL_SIZE = 200
|
||||
|
||||
# JWT配置信息
|
||||
JWT_SECRET_KEY = "ZXZnZWVr5b+r5LmQ5L2g55qE5Ye66KGM"
|
||||
ALGORITHM = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES = 300000 # 访问令牌过期时间(分钟)
|
After Width: | Height: | Size: 76 KiB |
@ -0,0 +1,30 @@
|
||||
# 添加Anaconda的TUNA镜像
|
||||
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
|
||||
|
||||
# 设置搜索时显示通道地址
|
||||
conda config --set show_channel_urls yes
|
||||
|
||||
# 创建虚拟环境
|
||||
conda create -n rag python=3.10
|
||||
|
||||
# 查看当前存在哪些虚拟环境
|
||||
conda env list
|
||||
conda info -e
|
||||
|
||||
# 查看安装了哪些包
|
||||
conda list
|
||||
|
||||
# 激活虚拟环境
|
||||
conda activate rag
|
||||
|
||||
# 对虚拟环境中安装额外的包
|
||||
conda install -n rag $package_name
|
||||
|
||||
# 删除虚拟环境
|
||||
conda remove -n rag --all
|
||||
|
||||
# 删除环境中的某个包
|
||||
conda remove --name rag $package_name
|
||||
|
||||
# 恢复默认镜像
|
||||
conda config --remove-key channels
|
@ -0,0 +1,5 @@
|
||||
https://github.com/jgm/pandoc/releases/tag/3.7.0.2
|
||||
https://objects.githubusercontent.com/github-production-release-asset-2e65be/571770/92882bf5-3b76-4345-b08a-9d9badc74957?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250626%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250626T231242Z&X-Amz-Expires=1800&X-Amz-Signature=55493529bc6e5a3779e95bcdd9f33cf09477d3e47f9a441b9412b5b193d788db&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dpandoc-3.7.0.2-windows-x86_64.msi&response-content-type=application%2Foctet-stream
|
||||
|
||||
|
||||
pandoc -f docx -t markdown -o c:/aaa.md D:\dsWork\dsProject\dsRag\static\Txt\化学方程式_CHEMISTRY_1.docx
|
@ -0,0 +1,25 @@
|
||||
#### 一、官网
|
||||
```cmd
|
||||
https://github.com/HKUDS/LightRAG
|
||||
```
|
||||
|
||||
#### 二、环境配置
|
||||
|
||||
```cmd
|
||||
# 删除虚拟环境
|
||||
conda remove -n py310 --all
|
||||
|
||||
# 创建虚拟环境
|
||||
conda create -n py310 python=3.10
|
||||
|
||||
# 查看当前存在哪些虚拟环境
|
||||
conda env list
|
||||
|
||||
# 激活虚拟环境
|
||||
conda activate py310
|
||||
|
||||
# 安装lightrag
|
||||
pip install "lightrag-hku[api]"
|
||||
```
|
||||
|
||||
####
|
@ -0,0 +1,10 @@
|
||||
# routes/__init__.py
|
||||
from api.controller.LoginController import router as login_router
|
||||
from api.controller.DocumentController import router as document_router
|
||||
from api.controller.ThemeController import router as theme_router
|
||||
from api.controller.QuestionController import router as question_router
|
||||
from api.controller.TestController import router as test_router
|
||||
from api.controller.DmController import router as dm_router
|
||||
|
||||
# 导出所有路由
|
||||
__all__ = ["login_router", "document_router", "theme_router", "question_router", "dm_router", "test_router"]
|
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 236 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 195 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 460 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 234 KiB |