Waflon commited on
Commit
7bae9f3
1 Parent(s): 62a3b5b

Update modelo.py

Browse files
Files changed (1) hide show
  1. modelo.py +2 -2
modelo.py CHANGED
@@ -4,7 +4,7 @@ from langchain.chains.combine_documents.stuff import StuffDocumentsChain
4
  from langchain.chains import RetrievalQA
5
  from langchain.text_splitter import RecursiveCharacterTextSplitter
6
  from langchain_openai import ChatOpenAI
7
- from langchain_community.vectorstores import FAISS
8
  from langchain_community.document_loaders import HuggingFaceDatasetLoader
9
  from langchain_community.embeddings import HuggingFaceEmbeddings
10
 
@@ -26,7 +26,7 @@ def get_chain():
26
  data = loader.load()
27
 
28
  #Dividir en chucks, esto es super importante
29
- text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=150)
30
 
31
  docs = text_splitter.split_documents(data)
32
  #DB y retriever
 
4
  from langchain.chains import RetrievalQA
5
  from langchain.text_splitter import RecursiveCharacterTextSplitter
6
  from langchain_openai import ChatOpenAI
7
+ from langchain_community.vectorstores import FAISS #Facebook AI Similarity Search
8
  from langchain_community.document_loaders import HuggingFaceDatasetLoader
9
  from langchain_community.embeddings import HuggingFaceEmbeddings
10
 
 
26
  data = loader.load()
27
 
28
  #Dividir en chucks, esto es super importante
29
+ text_splitter = RecursiveCharacterTextSplitter(chunk_size=128, chunk_overlap=32)
30
 
31
  docs = text_splitter.split_documents(data)
32
  #DB y retriever