mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-05-15 21:48:14 +02:00
fix deprecated refs
This commit is contained in:
@@ -32,5 +32,7 @@ jobs:
|
||||
pip install accelerate
|
||||
pip install optimum[exporters,onnxruntime]
|
||||
pip install faiss-cpu
|
||||
pip install hf_xet
|
||||
|
||||
python -m tests.llm.llm_rag
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ from typing import List
|
||||
import numpy as np
|
||||
|
||||
# LangChain imports
|
||||
from langchain_community.llms import HuggingFacePipeline
|
||||
from langchain_community.embeddings import HuggingFaceEmbeddings
|
||||
from langchain_huggingface import HuggingFacePipeline
|
||||
from langchain_huggingface import HuggingFaceEmbeddings
|
||||
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
||||
from langchain_community.vectorstores import FAISS
|
||||
from langchain.chains import RetrievalQA
|
||||
@@ -160,7 +160,7 @@ def ask_rag(question: str):
|
||||
print(f"\nQuestion: {question}")
|
||||
|
||||
# Get response from the chain
|
||||
response = qa_chain({"query": question})
|
||||
response = qa_chain.invoke({"query": question})
|
||||
|
||||
# Print the answer
|
||||
print("\nAnswer:")
|
||||
|
||||
Reference in New Issue
Block a user