feat: 调整文案
This commit is contained in:
parent
19926f5706
commit
34e78d0ce0
|
@ -1,6 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
|
|
||||||
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
||||||
|
|
||||||
from base_rag import BaseRAG
|
from base_rag import BaseRAG
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ class SimpleRAG(BaseRAG):
|
||||||
def main():
|
def main():
|
||||||
config = {
|
config = {
|
||||||
"model_name": "sentence-transformers/all-MiniLM-L6-v2",
|
"model_name": "sentence-transformers/all-MiniLM-L6-v2",
|
||||||
"embedding_type": "local"
|
"embedding_type": "local",
|
||||||
}
|
}
|
||||||
|
|
||||||
rag = SimpleRAG(embedding_config=config)
|
rag = SimpleRAG(embedding_config=config)
|
||||||
|
@ -28,7 +29,7 @@ def main():
|
||||||
documents = [
|
documents = [
|
||||||
"苹果是一种水果,味道甜美,营养丰富。",
|
"苹果是一种水果,味道甜美,营养丰富。",
|
||||||
"苹果公司是一家科技公司,生产iPhone和Mac等产品。",
|
"苹果公司是一家科技公司,生产iPhone和Mac等产品。",
|
||||||
"Python是一种编程语言,简单易学,功能强大。"
|
"Python是一种编程语言,简单易学,功能强大。",
|
||||||
]
|
]
|
||||||
|
|
||||||
print("正在添加文档...")
|
print("正在添加文档...")
|
||||||
|
|
Loading…
Reference in New Issue