mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 22:14:05 +00:00
fix: avoid second error issue
This commit is contained in:
1 parent
458f2a3ff3
commit
636783ca8a
1 file changed
+2
-2
@@ -36,8 +36,8 @@ def call_openai_api(docs):
|
||||
store.index = None
|
||||
with open("faiss_store.pkl", "wb") as f:
|
||||
pickle.dump(store, f)
|
||||
print("Sleeping for 10 seconds and trying again")
|
||||
time.sleep(10)
|
||||
print("Sleeping for 60 seconds and trying again")
|
||||
time.sleep(60)
|
||||
faiss.write_index(store_index_bak, "docs.index")
|
||||
store.index = store_index_bak
|
||||
store.add_texts([i.page_content], metadatas=[i.metadata])
|
||||
|
||||
Reference in new issue
Block a user