please
Browse files
app.py
CHANGED
@@ -88,21 +88,9 @@ def get_vectorstore(text_chunks):
|
|
88 |
# OpenAI ์๋ฒ ๋ฉ ๋ชจ๋ธ์ ๋ก๋ํฉ๋๋ค. (Embedding models - Ada v2)
|
89 |
|
90 |
embeddings = OpenAIEmbeddings()
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
if not text_chunks or not text_chunks[0]:
|
95 |
-
return None
|
96 |
-
|
97 |
-
# ์ฒซ ๋ฒ์งธ ํ
์คํธ ์ฒญํฌ์ ๊ธธ์ด ํ์ธ
|
98 |
-
first_chunk_length = len(text_chunks[0])
|
99 |
-
|
100 |
-
# ์ฒซ ๋ฒ์งธ ํ
์คํธ ์ฒญํฌ๊ฐ ๋น์ด ์๋ ๊ฒฝ์ฐ์ ๋ํ ์ฒ๋ฆฌ
|
101 |
-
if first_chunk_length == 0:
|
102 |
-
return None
|
103 |
-
|
104 |
-
vectorstore = FAISS.from_documents(text_chunks, embeddings) # FAISS ๋ฒกํฐ ์คํ ์ด๋ฅผ ์์ฑํฉ๋๋ค.
|
105 |
-
return vectorstore # ์์ฑ๋ ๋ฒกํฐ ์คํ ์ด๋ฅผ ๋ฐํํฉ๋๋ค.
|
106 |
|
107 |
|
108 |
def get_conversation_chain(vectorstore):
|
|
|
88 |
# OpenAI ์๋ฒ ๋ฉ ๋ชจ๋ธ์ ๋ก๋ํฉ๋๋ค. (Embedding models - Ada v2)
|
89 |
|
90 |
embeddings = OpenAIEmbeddings()
|
91 |
+
vectorstore = FAISS.from_documents(text_chunks, embeddings) # FAISS ๋ฒกํฐ ์คํ ์ด๋ฅผ ์์ฑํฉ๋๋ค.
|
92 |
|
93 |
+
return vectorstore # ์์ฑ๋ ๋ฒกํฐ ์คํ ์ด๋ฅผ ๋ฐํํฉ๋๋ค.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
def get_conversation_chain(vectorstore):
|