Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't provide proxy setting pinecone #347

Open
usman-vecho opened this issue May 22, 2024 · 0 comments
Open

Can't provide proxy setting pinecone #347

usman-vecho opened this issue May 22, 2024 · 0 comments

Comments

@usman-vecho
Copy link

URLs have spaces as I am unable to post this thread with too many urls

Hi, I am trying to deploy small app on pythonanywhere,
let me explain with code,

from dotenv import load_dotenv
from pinecone import Pinecone
from langchain_openai import OpenAIEmbeddings
from langchain.vectorstores import Pinecone as PineconeVectorStore
load_dotenv()

pc = Pinecone(api_key=‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’,proxy_url=‘http://proxy/ . server : 3128’)
print(pc.list_indexes())
embeddings = OpenAIEmbeddings()

vectorstore_from_docs = PineconeVectorStore.from_existing_index(index_name=“michaeles”, embedding=embeddings)

I need to add prxy url to pinecone, and its totally possible by giving proxy_url to Pinecone, but when I execute PineconeVectorStore.from_existing_index() I get pinecone errors that are related to proxy, here are errors

:
HTTPSConnectionPool(host=‘api . pinecone . io’, port=443): Max retries exceeded with url: /indexes (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fb9c4385870>: Failed to establish a new connection: [Errno 111] Connection refused’))

as I remember in previous pinecone versions, we can provide proxy in url and then we can use these functions directly from pinecone rather than with langchain.vectorstores import Pinecone as PineconeVectorStore like below,
openapi_config = OpenApiConfiguration.get_default_copy()
openapi_config.proxy = “http:// proxy . server : 3128”

pinecone.init(
api_key=“xxxxxxxxxxxxxxxx”, # find at app.pinecone.io
environment=“us-west4-gcp-free”, # next to api key in console
openapi_config=openapi_config
)
index_name = “pf1”

docsearch = Pinecone.from_texts([t.page_content for t in texts], embeddings, index_name=index_name)

I want to do something like this above code that worked for me in the past.
can someone please help me with this, will downgrading pinecone will help?

@usman-vecho usman-vecho changed the title Cant provide proxy setting pinecone Can't provide proxy setting pinecone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant