Update localKB_construct.py
Browse files- localKB_construct.py +3 -1
localKB_construct.py
CHANGED
@@ -65,7 +65,9 @@ def construct_index(directory_path):
|
|
65 |
|
66 |
## 好像work了,2023.09.22, 注意这里的写法有调整。
|
67 |
# prompt_helper = PromptHelper(max_input_s≈ize, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
|
68 |
-
prompt_helper = PromptHelper(max_input_size, num_outputs, chunk_overlap_ratio= 0.1, chunk_size_limit=chunk_size_limit)
|
|
|
|
|
69 |
service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper)
|
70 |
|
71 |
## 如果是txt文件,那么需要用如下命令。注意与PDF文件的区别。
|
|
|
65 |
|
66 |
## 好像work了,2023.09.22, 注意这里的写法有调整。
|
67 |
# prompt_helper = PromptHelper(max_input_s≈ize, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
|
68 |
+
# prompt_helper = PromptHelper(max_input_size, num_outputs, chunk_overlap_ratio= 0.1, chunk_size_limit=chunk_size_limit)
|
69 |
+
prompt_helper = PromptHelper(max_input_size, num_outputs, chunk_size_limit=chunk_size_limit)
|
70 |
+
|
71 |
service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper)
|
72 |
|
73 |
## 如果是txt文件,那么需要用如下命令。注意与PDF文件的区别。
|