mikail-bitik commited on
Commit
cefe798
·
1 Parent(s): a619fe4

embedding model was changed from Gemini to one of the Huggingface models

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. ingestion.py +2 -3
  3. requirements.txt +2 -2
README.md CHANGED
@@ -27,7 +27,7 @@ This project implements a **Corrective Retrieval-Augmented Generation (CRAG)** s
27
 
28
  * **Orchestration**: LangGraph
29
  * **LLM**: DeepSeek (via `DeepSeek-V3` / `deepseek-chat`)
30
- * **Embeddings**: Google Gemini (`models/text-embedding-004`)
31
  * **Vector Database**: ChromaDB
32
  * **Web Search**: Tavily Search API
33
  * **UI**: Streamlit
@@ -54,7 +54,7 @@ Verify the application directly on the web:
54
  Create a `.env` file in the root directory and add your API keys:
55
  ```env
56
  DEEPSEEK_API_KEY=your_deepseek_key
57
- GOOGLE_API_KEY=your_google_key
58
  TAVILY_API_KEY=your_tavily_key
59
  LANGCHAIN_API_KEY=your_langchain_key # Optional: for LangSmith tracing
60
  LANGCHAIN_TRACING_V2=true # Optional
 
27
 
28
  * **Orchestration**: LangGraph
29
  * **LLM**: DeepSeek (via `DeepSeek-V3` / `deepseek-chat`)
30
+ * **Embeddings**: Hugging Face (`sentence-transformers/all-MiniLM-L6-v2`)
31
  * **Vector Database**: ChromaDB
32
  * **Web Search**: Tavily Search API
33
  * **UI**: Streamlit
 
54
  Create a `.env` file in the root directory and add your API keys:
55
  ```env
56
  DEEPSEEK_API_KEY=your_deepseek_key
57
+ HF_TOKEN=your_huggingface_token #for using embedding models from huggingface
58
  TAVILY_API_KEY=your_tavily_key
59
  LANGCHAIN_API_KEY=your_langchain_key # Optional: for LangSmith tracing
60
  LANGCHAIN_TRACING_V2=true # Optional
ingestion.py CHANGED
@@ -2,8 +2,7 @@ from dotenv import load_dotenv
2
  from langchain_text_splitters import RecursiveCharacterTextSplitter
3
  from langchain_community.document_loaders import WebBaseLoader
4
  from langchain_community.vectorstores import Chroma
5
- from langchain_community.embeddings import OllamaEmbeddings
6
- from langchain_google_genai import GoogleGenerativeAIEmbeddings
7
 
8
  load_dotenv()
9
 
@@ -24,7 +23,7 @@ text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
24
  splits = text_splitter.split_documents(docs_list)
25
 
26
  #embedding = OllamaEmbeddings(model="nomic-embed-text")
27
- embedding = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
28
 
29
  vectorstore = Chroma.from_documents(
30
  documents=splits,
 
2
  from langchain_text_splitters import RecursiveCharacterTextSplitter
3
  from langchain_community.document_loaders import WebBaseLoader
4
  from langchain_community.vectorstores import Chroma
5
+ from langchain_huggingface import HuggingFaceEndpointEmbeddings
 
6
 
7
  load_dotenv()
8
 
 
23
  splits = text_splitter.split_documents(docs_list)
24
 
25
  #embedding = OllamaEmbeddings(model="nomic-embed-text")
26
+ embedding = HuggingFaceEndpointEmbeddings(model="sentence-transformers/all-MiniLM-L6-v2")
27
 
28
  vectorstore = Chroma.from_documents(
29
  documents=splits,
requirements.txt CHANGED
@@ -10,5 +10,5 @@ pytest>=8.2.2
10
  langchain-deepseek
11
  pydantic
12
  langchain_text_splitters
13
- langchain-google-genai #for embedding
14
- streamlit
 
10
  langchain-deepseek
11
  pydantic
12
  langchain_text_splitters
13
+ streamlit
14
+ langchain-huggingface #for embedding