eljanmahammadli commited on
Commit
95168db
·
1 Parent(s): cfad98b

Added 5 times bigger embedding model all-mpnet-base-v2

Browse files
Files changed (1) hide show
  1. ai_generate.py +1 -1
ai_generate.py CHANGED
@@ -63,7 +63,7 @@ def load_llm(model: str, api_key: str, temperature: float = 1.0, max_length: int
63
  def create_db_with_langchain(path: list[str], url_content: dict):
64
  all_docs = []
65
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE, chunk_overlap=CHUNK_OVERLAP)
66
- embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
67
  if path:
68
  for file in path:
69
  loader = PyMuPDFLoader(file)
 
63
  def create_db_with_langchain(path: list[str], url_content: dict):
64
  all_docs = []
65
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE, chunk_overlap=CHUNK_OVERLAP)
66
+ embedding_function = SentenceTransformerEmbeddings(model_name="all-mpnet-base-v2")
67
  if path:
68
  for file in path:
69
  loader = PyMuPDFLoader(file)