Open sirio2013 opened 1 year ago
I finally Found it after days of search and struggle, it's actually a problem related to our local DNS configuration. Just change your local WIFI network DNS Configuration to Google's DNS servers: Preferred DNS server: 8.8.8.8 Alternate DNS server: 8.8.4.4
let me know if anyone needs more help with this.
Hello,
I have this code that is not working, even if I used the one in the documentation (https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/pinecone.html)
from langchain.document_loaders import TextLoader loader = TextLoader('cleaned_catalogue.txt') documents = loader.load()
from langchain.text_splitter import CharacterTextSplitter text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0) docs = text_splitter.split_documents(documents)
pinecone.init( api_key='my_secret_api_key', # find at app.pinecone.io environment='my_secret_env_key' # next to api key in console ) index_name = "ai-assistant-qa-products" # put in the name of your pinecone index here
from langchain.embeddings.openai import OpenAIEmbeddings embeddings = OpenAIEmbeddings(openai_api_key='my_secret_api_key')
from langchain.vectorstores import Pinecone docsearch = Pinecone.from_documents(docs, embeddings, index_name=index_name)
I receive a series of error: MaxRetryError: HTTPSConnectionPool(host='controller.223199e7-5017-4014-a9fc-3d141c00b38d.pinecone.io', port=443): Max retries exceeded with url: /databases (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002B559524F40>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))