File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1111 metadata :
1212 labels :
1313 app : crapi-chatbot
14+ spec :
1415 containers :
1516 - name : crapi-chatbot
1617 image : crapi/crapi-chatbot:latest
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ kubectl apply -n crapi -f ./identity
1212kubectl apply -n crapi -f ./community
1313kubectl apply -n crapi -f ./workshop
1414kubectl apply -n crapi -f ./web
15+ kubectl apply -n crapi -f ./chatbot
Original file line number Diff line number Diff line change @@ -37,11 +37,10 @@ def document_loader():
3737 loader_cls = UnstructuredMarkdownLoader ,
3838 )
3939 documents = loader .load ()
40- app .logger .debug ("Loaded %s documents" , len (documents ))
40+ app .logger .debug ("Loaded %s documents in db " , len (documents ))
4141 text_splitter = CharacterTextSplitter (chunk_size = 1000 , chunk_overlap = 100 )
4242 texts = text_splitter .split_documents (documents )
4343 embeddings = get_embeddings ()
44- os .system ("rm -rf ./db" )
4544 db = Chroma .from_documents (texts , embeddings , persist_directory = "./db" )
4645 db .persist ()
4746 retriever = db .as_retriever (search_kwargs = {"k" : target_source_chunks })
You can’t perform that action at this time.
0 commit comments