I was following this langchain tutorial, and I have done the setup as asked.
When trying to run the following line of code -
vectara = vectorstore.from_documents(documents, embedding=None)
,
I am getting the error as stated in the title.
Here is entire code snippet -
import os
import getpass
OPENAI_API_KEY = "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"
VECTARA_API_KEY = "zqt_X"
VECTARA_CUSTOMER_ID = "3X9"
VECTARA_CORPUS_ID = "1"
os.environ["VECTARA_CUSTOMER_ID"] = VECTARA_CUSTOMER_ID
os.environ["VECTARA_CORPUS_ID"] = VECTARA_CORPUS_ID
os.environ["VECTARA_API_KEY"] = VECTARA_API_KEY
from langchain.chains import ConversationalRetrievalChain
from langchain_community.vectorstores import Vectara
vectorstore = Vectara(
vectara_customer_id = VECTARA_CUSTOMER_ID,
vectara_corpus_id = VECTARA_CORPUS_ID,
vectara_api_key = VECTARA_API_KEY
)
from langchain_community.document_loaders import TextLoader
loader = TextLoader("corpus_1.txt")
documents = loader.load()
vectara = vectorstore.from_documents(documents, embedding=None)
Error: No permissions to add document to Vectara.
Check your corpus ID, customer ID and API key.