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

Http consistency: Pinecone #1262

Merged

Conversation

SergeyMenshykh
Copy link
Member

@SergeyMenshykh SergeyMenshykh commented May 29, 2023

Description

This PR introduces the following changes:

  1. The PineconeClient class accepts a custom HTTP client, allowing the hosting application/client code to provide their own instances.

  2. A new extension method, WithPineconeMemoryStore, has been added to the KernelBuilder class. This method simplifies the registration of the Pinecone memory store, aligns the registration process with other connector registrations, and enforces the usage of an HTTP client and retry handlers configured in the SK SDK.

  3. The global static HttpHandlers class is removed because it goes against the agreed approach for the SK SDK's HTTP stack that assumes the usage of a custom HTTP client for fine-tuning instead of relying on global static variables.

Contribution Checklist

@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels May 29, 2023
@SergeyMenshykh SergeyMenshykh added the PR: ready for review All feedback addressed, ready for reviews label May 29, 2023
Copy link
Member

@dmytrostruk dmytrostruk left a comment

Choose a reason for hiding this comment

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

Should we add unit tests to verify HttpClient behavior and logic of new extension methods?

@SergeyMenshykh SergeyMenshykh added PR: paused PR temporarily parked and removed PR: ready for review All feedback addressed, ready for reviews labels May 30, 2023
@SergeyMenshykh
Copy link
Member Author

Should we add unit tests to verify HttpClient behavior and logic of new extension methods?

+1

@lemillermicrosoft lemillermicrosoft enabled auto-merge (squash) June 7, 2023 14:57
@lemillermicrosoft lemillermicrosoft merged commit b18138e into microsoft:main Jun 7, 2023
15 checks passed
@SergeyMenshykh SergeyMenshykh linked an issue Jun 20, 2023 that may be closed by this pull request
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### Description

This PR introduces the following changes:

1. The PineconeClient class accepts a custom HTTP client, allowing the
hosting application/client code to provide their own instances.

2. A new extension method, `WithPineconeMemoryStore`, has been added to
the `KernelBuilder` class. This method simplifies the registration of
the Pinecone memory store, aligns the registration process with other
connector registrations, and enforces the usage of an HTTP client and
retry handlers configured in the SK SDK.

3. The global static `HttpHandlers` class is removed because it goes
against the agreed approach for the SK SDK's HTTP stack that assumes the
usage of a custom HTTP client for fine-tuning instead of relying on
global static variables.

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: paused PR temporarily parked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Semantic Kernel needs a consistent story around HttpClient
3 participants