inoid commited on
Commit
435f122
·
1 Parent(s): 2d1e5c5

Updare retrive creation

Browse files
Files changed (1) hide show
  1. seminar_edition_ai.py +6 -1
seminar_edition_ai.py CHANGED
@@ -278,13 +278,18 @@ def predictArgumentQuestionBuild(questionAnswer, llmModelList = []):
278
  )
279
  global retriever
280
  global HISTORY_ANSWER
 
 
 
 
 
281
 
282
  if retriever == None:
283
  doc = Document(page_content="text", metadata={"source": "local"})
284
 
285
  vectorstore = Chroma.from_documents(
286
  documents=[doc],
287
- embedding=embed_model,
288
  persist_directory="chroma_db_dir_sermon", # Local mode with in-memory storage only
289
  collection_name="sermon_lab_ai"
290
  )
 
278
  )
279
  global retriever
280
  global HISTORY_ANSWER
281
+ global embed_model
282
+
283
+ if embed_model == None:
284
+ llmBuilder = GeminiLLM()
285
+ embed_model = llmBuilder.getEmbeddingsModel()
286
 
287
  if retriever == None:
288
  doc = Document(page_content="text", metadata={"source": "local"})
289
 
290
  vectorstore = Chroma.from_documents(
291
  documents=[doc],
292
+ embedding = embed_model,
293
  persist_directory="chroma_db_dir_sermon", # Local mode with in-memory storage only
294
  collection_name="sermon_lab_ai"
295
  )