Skip to content

Commit

Permalink
[Feat] Helpful error when incorrectly instantiating Index client
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Nov 15, 2024
1 parent d6cb346 commit 28695f3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 295 deletions.
4 changes: 2 additions & 2 deletions pinecone/control/pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from pinecone.models import ServerlessSpec, PodSpec, IndexModel, IndexList, CollectionList
from .langchain_import_warnings import _build_langchain_attribute_error_message

from pinecone.data import Index
from pinecone.data import _Index

from pinecone_plugin_interface import load_and_install as install_plugins

Expand Down Expand Up @@ -788,7 +788,7 @@ def Index(self, name: str = "", host: str = "", **kwargs):
# Otherwise, get host url from describe_index using the index name
index_host = self.index_host_store.get_host(self.index_api, self.config, name)

return Index(
return _Index(
host=index_host,
api_key=api_key,
pool_threads=pt,
Expand Down
Loading

0 comments on commit 28695f3

Please sign in to comment.