File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ def get_response(query: str) -> str:
137
137
return (
138
138
'Something wrong in docGPT...\n '
139
139
'1. If you are using gpt4free model, '
140
- 'try to select the different provider.\n '
140
+ 'try to select the different provider. '
141
+ '(Or wait a moment, maybe there have something wrong in gpt4free)\n '
141
142
'2. If you are using openai model, '
142
143
'check your usage for openai api key.'
143
144
)
@@ -151,6 +152,7 @@ def get_response(query: str) -> str:
151
152
with doc_container :
152
153
docs = upload_and_process_pdf ()
153
154
model = create_doc_gpt (docs )
155
+ del docs
154
156
st .write ('---' )
155
157
156
158
if 'response' not in st .session_state :
Original file line number Diff line number Diff line change @@ -148,7 +148,12 @@ def _embeddings(self):
148
148
# If have openai api
149
149
embeddings = OpenAIEmbeddings ()
150
150
except :
151
- embeddings = HuggingFaceEmbeddings ()
151
+ embeddings = HuggingFaceEmbeddings (
152
+ model_name = (
153
+ 'sentence-transformers/'
154
+ 'multi-qa-MiniLM-L6-cos-v1'
155
+ )
156
+ )
152
157
153
158
db = FAISS .from_documents (
154
159
documents = self .docs ,
You can’t perform that action at this time.
0 commit comments