use newest langchain package names
Browse files- rag.py +3 -3
- requirements.txt +1 -2
rag.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
-
# rag.py (
|
| 2 |
from __future__ import annotations
|
| 3 |
import os, uuid, tempfile, requests, shutil, re
|
| 4 |
from pathlib import Path
|
| 5 |
from functools import lru_cache
|
| 6 |
from typing import List, Tuple
|
| 7 |
from datasets import load_dataset
|
| 8 |
-
from
|
| 9 |
from langchain_community.vectorstores import FAISS
|
| 10 |
from langchain_huggingface import HuggingFaceEmbeddings, HuggingFaceEndpoint
|
| 11 |
from langchain_core.prompts import PromptTemplate
|
| 12 |
-
from langchain.chains
|
| 13 |
from supabase import create_client
|
| 14 |
|
| 15 |
# ---------- config ----------
|
|
|
|
| 1 |
+
# rag.py (v4 – imports that actually exist today)
|
| 2 |
from __future__ import annotations
|
| 3 |
import os, uuid, tempfile, requests, shutil, re
|
| 4 |
from pathlib import Path
|
| 5 |
from functools import lru_cache
|
| 6 |
from typing import List, Tuple
|
| 7 |
from datasets import load_dataset
|
| 8 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
| 9 |
from langchain_community.vectorstores import FAISS
|
| 10 |
from langchain_huggingface import HuggingFaceEmbeddings, HuggingFaceEndpoint
|
| 11 |
from langchain_core.prompts import PromptTemplate
|
| 12 |
+
from langchain.chains import RetrievalQA
|
| 13 |
from supabase import create_client
|
| 14 |
|
| 15 |
# ---------- config ----------
|
requirements.txt
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
-
# requirements.txt (no pins = no missing wheels)
|
| 2 |
flask
|
| 3 |
-
langchain
|
| 4 |
langchain-community
|
| 5 |
langchain-huggingface
|
| 6 |
sentence-transformers
|
|
|
|
|
|
|
| 1 |
flask
|
| 2 |
+
langchain-core
|
| 3 |
langchain-community
|
| 4 |
langchain-huggingface
|
| 5 |
sentence-transformers
|