You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Project has proven to be incredibly helpful and effective. However, I am encountering an issue with the feed address recognition feature. When I attempt to import my desired feed address, the system fails to recognize it, and I receive the following error message: "TypeError: expected string or bytes-like object, got 'NoneType'".
To resolve this problem and continue using the project effectively, I was wondering if there might be an alternative method for achieving my goal. Specifically, I am interested in uploading a batch of text document from my local machine as vectors to Pinecone and subsequently querying it. Could you please provide guidance on how to accomplish this task, or suggest any other solutions that may address the issue at hand?
Thank you for your time and support.
The text was updated successfully, but these errors were encountered:
Hi, glad you find it useful. Feedparser only works with RSS feeds. To use local text documents, you can iterate over those files in the folder, read every file and create the embedding. Something like:
importosimportopenai# Set up the OpenAI APIopenai.api_key="your_api_key"# Define a function to get embeddings for given textdefget_embedding(text):
# create embedding here with OpenAIreturnembedding# Define the folder path containing the text filesfolder_path="path/to/your/text/files"# Iterate over all text files in the folderforfile_nameinos.listdir(folder_path):
iffile_name.endswith(".txt"):
file_path=os.path.join(folder_path, file_name)
# Read the content of the filewithopen(file_path, "r", encoding="utf-8") asfile:
content=file.read()
# Get the embedding using the OpenAI APIembedding=get_embedding(content)
# upload to pinecone
...
This Project has proven to be incredibly helpful and effective. However, I am encountering an issue with the feed address recognition feature. When I attempt to import my desired feed address, the system fails to recognize it, and I receive the following error message: "TypeError: expected string or bytes-like object, got 'NoneType'".
To resolve this problem and continue using the project effectively, I was wondering if there might be an alternative method for achieving my goal. Specifically, I am interested in uploading a batch of text document from my local machine as vectors to Pinecone and subsequently querying it. Could you please provide guidance on how to accomplish this task, or suggest any other solutions that may address the issue at hand?
Thank you for your time and support.
The text was updated successfully, but these errors were encountered: