Refactor: Migrate LangChain imports to langchain_community and update user password.

This commit is contained in:
Tony_at_EON-DEV
2026-02-10 11:17:12 +09:00
parent 640b464ccd
commit ef84ed359a
5 changed files with 8 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
import requests
from bs4 import BeautifulSoup
from langchain.embeddings import HuggingFaceEmbeddings
from langchain_community.embeddings import HuggingFaceEmbeddings
from vector_store.base import get_vector_store
from models.llm_loader import get_llm
from config.config import OFFLINE_MODE

View File

@@ -1,8 +1,8 @@
# models/embedding_loader.py
from config import EMBEDDING_ENGINE, EMBEDDING_MODEL_NAME
from langchain.embeddings import HuggingFaceEmbeddings
from langchain.embeddings import GPT4AllEmbeddings # Requires GPT4All installed
from langchain_community.embeddings import HuggingFaceEmbeddings
from langchain_community.embeddings import GPT4AllEmbeddings # Requires GPT4All installed
def get_embedding_model():
if EMBEDDING_ENGINE == "huggingface":

View File

@@ -1,8 +1,8 @@
# models/llm_loader.py
from config import LLM_ENGINE
from langchain.llms import Ollama, LlamaCpp
from langchain.chat_models import ChatOpenAI
from langchain_community.llms import Ollama, LlamaCpp
from langchain_community.chat_models import ChatOpenAI
def get_llm():
if LLM_ENGINE == "ollama":

View File

@@ -2,11 +2,13 @@
fastapi
uvicorn
pydantic
python-jose[cryptography]
# LangChain & embeddings
langchain
sentence-transformers
transformers
langchain-community
# Vector DBs
faiss-cpu

View File

@@ -1,7 +1,7 @@
{
"tony": {
"username": "tony",
"password": "50c99cd062ccf8bc87c54170e704de8c6e64235e1654278c2e742410a8315264",
"password": "fe0964aeaac3f69966f3bd848778c41c508f48c581641e7042dde2664c6cb763",
"tenant_id": "tenantA",
"roles": [
"admin"