Spaces:
Build error
Build error
Commit ·
6baca14
1
Parent(s): ba1913e
fix vectordb
Browse files- FuncOrg.py +1 -1
- Knowledge.py +1 -1
- requirements.txt +2 -2
FuncOrg.py
CHANGED
|
@@ -33,7 +33,7 @@ def pdf2anki(question: None, api: str, pdf: None, apkg_name: str) -> str:
|
|
| 33 |
if count == 0:
|
| 34 |
csv_name = geminiQA(pdf_path, model)
|
| 35 |
count += 1
|
| 36 |
-
if question !=
|
| 37 |
csv_name = userQA(pdf_path, question, model, api)
|
| 38 |
apkg_path = Convert(csv_name, apkg_name)
|
| 39 |
return apkg_path
|
|
|
|
| 33 |
if count == 0:
|
| 34 |
csv_name = geminiQA(pdf_path, model)
|
| 35 |
count += 1
|
| 36 |
+
if question != "":
|
| 37 |
csv_name = userQA(pdf_path, question, model, api)
|
| 38 |
apkg_path = Convert(csv_name, apkg_name)
|
| 39 |
return apkg_path
|
Knowledge.py
CHANGED
|
@@ -70,7 +70,7 @@ def Chain(question, contents, api):
|
|
| 70 |
answer = chain.invoke(question)
|
| 71 |
return answer
|
| 72 |
except:
|
| 73 |
-
time.sleep(
|
| 74 |
|
| 75 |
# 切割問題
|
| 76 |
def Cut(text):
|
|
|
|
| 70 |
answer = chain.invoke(question)
|
| 71 |
return answer
|
| 72 |
except:
|
| 73 |
+
time.sleep(5)
|
| 74 |
|
| 75 |
# 切割問題
|
| 76 |
def Cut(text):
|
requirements.txt
CHANGED
|
@@ -67,8 +67,8 @@ kiwisolver==1.4.5
|
|
| 67 |
kubernetes==29.0.0
|
| 68 |
langchain==0.2.2
|
| 69 |
langchain-community==0.2.3
|
| 70 |
-
langchain-core==0.
|
| 71 |
-
langchain-google-genai==1.0.
|
| 72 |
langchain-text-splitters==0.2.1
|
| 73 |
langsmith==0.1.74
|
| 74 |
markdown-it-py==3.0.0
|
|
|
|
| 67 |
kubernetes==29.0.0
|
| 68 |
langchain==0.2.2
|
| 69 |
langchain-community==0.2.3
|
| 70 |
+
langchain-core==0.1.52
|
| 71 |
+
langchain-google-genai==1.0.3
|
| 72 |
langchain-text-splitters==0.2.1
|
| 73 |
langsmith==0.1.74
|
| 74 |
markdown-it-py==3.0.0
|