Closed sainisanjay closed 8 months ago
The issue was with Pinecone index, are you using it?
Maybe te host is wrong. You must configure that in your .env
PINECONE_INDEX_NAME = "indexname" PINECONE_ENV = "emv" along with the Pinecone API Key
Also Make sure you added COHERE_API_KEY
@axiom-of-choice I updated the .env file:
## Index and Model Data
# EMBEDDING_MODEL_NAME = "sentence-transformers/all-MiniLM-L6-v2"
HF_EMBEDDING_MODEL_NAME = "sentence-transformers/stsb-xlm-r-multilingual"
PINECONE_INDEX_NAME = "test"
PINECONE_ENV = "gcp-starter"
COHERE_EMBEDDING_MODEL_NAME = ""
I am using Free Tier account in Pinecone.
Still getting error
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/saini/workspace/TNS-LLM-Chatbot/pages/main_page.py", line 101, in upload_file
parse(
File "/home/saini/workspace/TNS-LLM-Chatbot/src/data/cohere_parser.py", line 216, in parse
insert_embedded_documents(documents=documents, embeddings=embeddings, index=index, data_source=data_source)
File "/home/saini/workspace/TNS-LLM-Chatbot/src/data/cohere_parser.py", line 192, in insert_embedded_documents
index.upsert(vectors=zip(ids, embeds, metadatas))
File "/home/saini/anaconda3/envs/ml/lib/python3.9/site-packages/pinecone/core/utils/error_handling.py", line 25, in inner_func
raise PineconeProtocolError(f'Failed to connect; did you specify the correct index name?') from e
pinecone.core.exceptions.PineconeProtocolError: Failed to connect; did you specify the correct index name?
Error Logs error.log
I think the env is wrong. For some reason, the console of pinecone does not show the correct one. Could you try with something like this PINECONE_ENV = "us-central1-gcp-starter" (Matching yours)
@axiom-of-choice I am not really sure whats going on wrong. I followed your suggestion but still same error:
PINECONE_ENV = "us-central1-gcp-starter"
.env file:
Something weird is happening. If you take a look at your pinecone console, you can see that is actually a query activity in the exact moment you start the application and try to upload a document.
I'll try to find a fix and post it
Something weird is happening. If you take a look at your pinecone console, you can see that is actually a query activity in the exact moment you start the application and try to upload a document.
Right i can see it has query activity while i try to upload the file. But unfortunately i am not able to figure-out whats wrong. Still i am getting same error.
I'll try to find a fix and post it
Looking forward to have some fix.
@sainisanjay I found the error. It is in the .env file. You might need to change the following. Rename PINECONE_ENV to PINECONE_ENVIRONMENT Also, make sure this env variable has this value. COHERE_EMBEDDING_MODEL_NAME = "embed-multilingual-v2.0"
Let me know if this works so I close the issue. I also added a commit into Develop to fix this.
@axiom-of-choice I incorporated your suggestions but unfortunately error still persist: However, this time not the indexing error it is MaxRetryError.
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='chat-unknown.svc.us-central1-gcp-starter.pinecone.io', port=443): Max retries exceeded with url: /vectors/upsert (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8900fd96a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Error Logs: error.log
.env file
@sainisanjay The PINECONE_ENVIRONMENT value should be only "gcp-starter"
Thanks a lot @axiom-of-choice its working now. I am closing this issue now.
CohereConnectionError: HTTPSConnectionPool(host='api.cohere.ai', port=443): Max retries exceeded with url: /v1/embed (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f34adf03700>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
@axiom-of-choice Could you please help me on the issue? Is this is a API issue or something else? Error Logs: info.log
error.log
.csv file which i am loading
test.csv