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

partners: update pinecone client #28320

Merged
merged 13 commits into from
Dec 3, 2024

Conversation

aulorbe
Copy link
Contributor

@aulorbe aulorbe commented Nov 23, 2024

This PR updates the Pinecone client to 5.4.0, as well as its dependencies (pinecone-plugin-inference and pinecone-plugin-interface).

Note: pinecone-client is now simply called pinecone.

Question for reviewer(s): should this PR also update the pinecone dep in the root dir's poetry.lock file? Was unsure. (I don't believe so b/c it seems pinned to a lower version likely based on 3rd-party deps (e.g. Unstructured).)

--
TW: @audrey_sage_


@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 23, 2024
Copy link

vercel bot commented Nov 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 2:01am

Comment on lines 26 to 28
numpy = [
{ version = "^1", python = "<3.12" },
{ version = "^1.26.0", python = ">=3.12" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a structural change to make things cleaner

Copy link

@jhamon jhamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on, Audrey. There are a few small things I would address.

@@ -74,6 +74,7 @@ class PineconeVectorStore(VectorStore):
dimension=1536,
metric="cosine",
spec=ServerlessSpec(cloud="aws", region="us-east-1"),
deletion_protection="disabled", # Defaults to "enabled"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default behavior is deletion_protection="disabled" So this comment is incorrect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eek, silly oversight. Thank you!

@@ -21,15 +21,12 @@ disallow_untyped_defs = "True"
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
langchain-core = "^0.3.15"
pinecone-client = "^5.0.0"
pinecone = ">=5.4.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "^5.4.0". >=5.4.0 would include future breaking changes which may not be compatible.

Poetry docs have a nice explanation of how these various syntax elements in version numbers are interpreted. https://python-poetry.org/docs/dependency-specification/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thank you so much!

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 3, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 3, 2024
@efriis efriis merged commit 6b7e93d into langchain-ai:master Dec 3, 2024
33 checks passed
headers={
"Api-Key": self.pinecone_api_key.get_secret_value(),
"Content-Type": "application/json",
"X-Pinecone-API-Version": "2024-07",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably update this API version header while you're here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging. size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants