inoid commited on
Commit
72441d8
·
1 Parent(s): 435f122

Updare retrive creation

Browse files
Files changed (1) hide show
  1. seminar_edition_ai.py +7 -0
seminar_edition_ai.py CHANGED
@@ -166,6 +166,13 @@ def predictFromInit( sermonTopic, llmModelList = []):
166
  if answer != '':
167
  doc = Document(page_content="text", metadata = {"source": "local"})
168
 
 
 
 
 
 
 
 
169
  retriever = vectorstore.as_retriever(
170
  search_kwargs = {"k": 3}
171
  )
 
166
  if answer != '':
167
  doc = Document(page_content="text", metadata = {"source": "local"})
168
 
169
+ vectorstore = Chroma.from_documents(
170
+ documents=[doc],
171
+ embedding=embed_model,
172
+ persist_directory="chroma_db_dir_sermon", # Local mode with in-memory storage only
173
+ collection_name="sermon_lab_ai"
174
+ )
175
+
176
  retriever = vectorstore.as_retriever(
177
  search_kwargs = {"k": 3}
178
  )