diff --git a/dsRagAnything/.idea/misc.xml b/dsRagAnything/.idea/misc.xml
index ddf22936..7e2a34c9 100644
--- a/dsRagAnything/.idea/misc.xml
+++ b/dsRagAnything/.idea/misc.xml
@@ -4,4 +4,7 @@
+
+
+
\ No newline at end of file
diff --git a/dsRagAnything/Doc/文档.txt b/dsRagAnything/Doc/文档.txt
index 866a995d..6469478b 100644
--- a/dsRagAnything/Doc/文档.txt
+++ b/dsRagAnything/Doc/文档.txt
@@ -41,3 +41,11 @@ python examples/text_format_test.py --check-reportlab --file dummy
# MinerU
https://github.com/opendatalab/MinerU/blob/master/README_zh-CN.md
+
+# 硅基流动的视觉模型
+https://cloud.siliconflow.cn/sft-b86b3myzge/models?tags=%E8%A7%86%E8%A7%89
+# 免费的模型
+
+# 调用地址
+https://api.siliconflow.cn/v1/chat/completions
+model:GLM-4.1V-9B-Thinking
\ No newline at end of file
diff --git a/dsRagAnything/Tools/T2_End_to_End.py b/dsRagAnything/Tools/T2_End_to_End.py
index 769e526b..7f085825 100644
--- a/dsRagAnything/Tools/T2_End_to_End.py
+++ b/dsRagAnything/Tools/T2_End_to_End.py
@@ -6,17 +6,17 @@ from lightrag.utils import EmbeddingFunc
async def main():
# Initialize RAGAnything
rag = RAGAnything(
- working_dir="./rag_storage",
llm_model_func=lambda prompt, system_prompt=None, history_messages=[], **kwargs: openai_complete_if_cache(
- "gpt-4o-mini",
+ "deepseek-chat",
prompt,
system_prompt=system_prompt,
history_messages=history_messages,
- api_key="your-api-key",
+ api_key="sk-44ae895eeb614aa1a9c6460579e322f1",
+ base_url="https://api.deepseek.com"
**kwargs,
),
vision_model_func=lambda prompt, system_prompt=None, history_messages=[], image_data=None, **kwargs: openai_complete_if_cache(
- "gpt-4o",
+ "GLM-4.1V-9B-Thinking",
"",
system_prompt=None,
history_messages=[],
@@ -27,14 +27,16 @@ async def main():
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image_data}"}}
]} if image_data else {"role": "user", "content": prompt}
],
- api_key="your-api-key",
+ api_key="sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl",
+ base_url='https://api.siliconflow.cn/v1/chat/completions'
**kwargs,
) if image_data else openai_complete_if_cache(
- "gpt-4o-mini",
+ "GLM-4.1V-9B-Thinking",
prompt,
system_prompt=system_prompt,
history_messages=history_messages,
- api_key="your-api-key",
+ api_key="sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl",
+ base_url='https://api.siliconflow.cn/v1/chat/completions'
**kwargs,
),
embedding_func=EmbeddingFunc(
@@ -42,16 +44,16 @@ async def main():
max_token_size=8192,
func=lambda texts: openai_embed(
texts,
- model="text-embedding-3-large",
- api_key=api_key,
- base_url=base_url,
+ model="BAAI/bge-m3",
+ api_key="sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl",
+ base_url="https://api.siliconflow.cn/v1/embeddings",
),
),
)
# Process a document
await rag.process_document_complete(
- file_path="path/to/your/document.pdf",
+ file_path="../Txt/黄琬乔2023蓝桥杯省赛准考证.pdf",
output_dir="./output",
parse_method="auto"
)
@@ -59,22 +61,22 @@ async def main():
# Query the processed content
# Pure text query - for basic knowledge base search
text_result = await rag.aquery(
- "What are the main findings shown in the figures and tables?",
+ "这篇文档中说了什么内容?",
mode="hybrid"
)
print("Text query result:", text_result)
- # Multimodal query with specific multimodal content
- multimodal_result = await rag.aquery_with_multimodal(
- "Explain this formula and its relevance to the document content",
- multimodal_content=[{
- "type": "equation",
- "latex": "P(d|q) = \\frac{P(q|d) \\cdot P(d)}{P(q)}",
- "equation_caption": "Document relevance probability"
- }],
- mode="hybrid"
-)
- print("Multimodal query result:", multimodal_result)
+# # Multimodal query with specific multimodal content
+# multimodal_result = await rag.aquery_with_multimodal(
+# "Explain this formula and its relevance to the document content",
+# multimodal_content=[{
+# "type": "equation",
+# "latex": "P(d|q) = \\frac{P(q|d) \\cdot P(d)}{P(q)}",
+# "equation_caption": "Document relevance probability"
+# }],
+# mode="hybrid"
+# )
+# print("Multimodal query result:", multimodal_result)
if __name__ == "__main__":
asyncio.run(main())
\ No newline at end of file
diff --git a/dsRagAnything/Tools/output/黄琬乔2023蓝桥杯省赛准考证/auto/images/4463c70fb5f0b6083da95d04f4d0404245d5bbbc47b6d92d91e9f8a001041608.jpg b/dsRagAnything/Tools/output/黄琬乔2023蓝桥杯省赛准考证/auto/images/4463c70fb5f0b6083da95d04f4d0404245d5bbbc47b6d92d91e9f8a001041608.jpg
new file mode 100644
index 00000000..ee86d3ce
Binary files /dev/null and b/dsRagAnything/Tools/output/黄琬乔2023蓝桥杯省赛准考证/auto/images/4463c70fb5f0b6083da95d04f4d0404245d5bbbc47b6d92d91e9f8a001041608.jpg differ
diff --git a/dsRagAnything/Txt/黄琬乔2023蓝桥杯省赛准考证.pdf b/dsRagAnything/Txt/黄琬乔2023蓝桥杯省赛准考证.pdf
new file mode 100644
index 00000000..82a2db25
Binary files /dev/null and b/dsRagAnything/Txt/黄琬乔2023蓝桥杯省赛准考证.pdf differ
diff --git a/dsRagAnything/raganything/__pycache__/mineru_parser.cpython-310.pyc b/dsRagAnything/raganything/__pycache__/mineru_parser.cpython-310.pyc
index 40d50fda..e61979ca 100644
Binary files a/dsRagAnything/raganything/__pycache__/mineru_parser.cpython-310.pyc and b/dsRagAnything/raganything/__pycache__/mineru_parser.cpython-310.pyc differ
diff --git a/dsRagAnything/raganything/mineru_parser.py b/dsRagAnything/raganything/mineru_parser.py
index ccd10adf..b217dfb5 100644
--- a/dsRagAnything/raganything/mineru_parser.py
+++ b/dsRagAnything/raganything/mineru_parser.py
@@ -112,7 +112,7 @@ class MineruParser:
cmd.extend(["-d", device])
try:
- print("转换命令:" + cmd)
+ #print("转换命令:" + cmd)
result = subprocess.run(
cmd,
capture_output=True,