Replies: 1 comment
-
The error you're encountering is related to SSL certificate verification. Here are a few steps you can take to resolve this issue without disabling SSL verification entirely:
Here is an example of how you can adjust your code: from langchain_community.document_loaders.pdf import PyPDFLoader
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
import os
# Ensure the CA bundle path is correct
ca_bundle_path = "path/to/your/chain.pem"
os.environ['REQUEST_CA_BUNDLE'] = ca_bundle_path
embedding = NVIDIAEmbeddings(
base_url="https://ashish-embedqa-deployment-2/v1",
model="nv-embedqa-e5-v5",
model_type="passage",
verify=ca_bundle_path # Use custom CA bundle
)
pdf_files = [os.path.join("./data", file) for file in os.listdir("./data") if file.endswith('.pdf')]
loaders = [PyPDFLoader(pdf_file) for pdf_file in pdf_files]
docs = []
for loader in loaders:
docs.extend(loader.load())
text_splitter = RecursiveCharacterTextSplitter()
all_splits = text_splitter.split_documents(docs)
page_contents = [doc.page_content for doc in all_splits]
embedding.embed_documents(page_contents) Make sure to replace |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am getting below error.
requests.exceptions.SSLError: HTTPSConnectionPool(host='ashish-embedqa-deployment-2', port=443): Max retries exceeded with url: /v1//embeddings (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
System Info
pip freeze|grep -i langchain
langchain==0.2.6
langchain-community==0.2.6
langchain-core==0.2.11
langchain-milvus==0.1.1
langchain-nvidia-ai-endpoints==0.1.2
langchain-text-splitters==0.2.2
Beta Was this translation helpful? Give feedback.
All reactions