I am trying to follow the tutorial given in this link , to visualise the RAG data using renumics-spotlight
package.
I’ve set the open API key using the step mentioned as
%env OPENAI_API_KEY="sk-proj-*****"
When running the code to add the documents to vector store(Chroma) in this case, I keep getting Authentication error
Code that is erroring :
import hashlib
import json
from langchain_core.documents import Document
def stable_hash(doc: Document) -> str:
"""
Stable hash document based on its metadata.
"""
return hashlib.sha1(json.dumps(doc.metadata, sort_keys=True).encode()).hexdigest()
split_ids = list(map(stable_hash, splits))
docs_vectorstore.add_documents(splits, ids=split_ids)
docs_vectorstore.persist()
And the full error can be found here link