Skip to content

Commit fa791e2

Browse files
committed
rename
1 parent d401b63 commit fa791e2

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/KernelPoolGeminiExtension.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Soenneker.SemanticKernel.Pool.Gemini;
1414
/// <summary>
1515
/// Provides Gemini-specific registration extensions for KernelPoolManager, enabling integration with local LLMs via Semantic Kernel.
1616
/// </summary>
17-
public static class KernelPoolGeminiExtension
17+
public static class SemanticKernelPoolGeminiExtension
1818
{
1919
/// <summary>
2020
/// Registers a Gemini model in the kernel pool with optional rate and token limits.
@@ -31,7 +31,7 @@ public static class KernelPoolGeminiExtension
3131
/// <param name="tokensPerDay">Optional maximum number of tokens allowed per day.</param>
3232
/// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
3333
/// <returns>A <see cref="ValueTask"/> representing the asynchronous registration operation.</returns>
34-
public static ValueTask RegisterGemini(this IKernelPoolManager pool, string key, string modelId, string apiKey, string endpoint, IHttpClientCache httpClientCache, int? rps,
34+
public static ValueTask RegisterGemini(this ISemanticKernelPool pool, string key, string modelId, string apiKey, string endpoint, IHttpClientCache httpClientCache, int? rps,
3535
int? rpm, int? rpd, int? tokensPerDay = null, CancellationToken cancellationToken = default)
3636
{
3737
var options = new SemanticKernelOptions
@@ -47,12 +47,11 @@ public static ValueTask RegisterGemini(this IKernelPoolManager pool, string key,
4747
{
4848
HttpClient httpClient = await httpClientCache.Get($"gemini:{modelId}", () => new HttpClientOptions
4949
{
50-
Timeout = TimeSpan.FromSeconds(600),
51-
BaseAddress = opts.Endpoint
52-
}, cancellationToken);
50+
Timeout = TimeSpan.FromSeconds(300)
51+
}, cancellationToken).NoSync();
5352

5453
#pragma warning disable SKEXP0070
55-
return Kernel.CreateBuilder().AddGoogleAIGeminiChatCompletion(modelId: opts.ModelId!, apiKey, httpClient: httpClient);
54+
return Kernel.CreateBuilder().AddGoogleAIGeminiChatCompletion(modelId: opts.ModelId!, opts.ApiKey!, httpClient: httpClient);
5655
#pragma warning restore SKEXP0070
5756
}
5857
};
@@ -68,7 +67,7 @@ public static ValueTask RegisterGemini(this IKernelPoolManager pool, string key,
6867
/// <param name="httpClientCache">The HTTP client cache to remove the associated client from.</param>
6968
/// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
7069
/// <returns>A <see cref="ValueTask"/> representing the asynchronous unregistration operation.</returns>
71-
public static async ValueTask UnregisterGemini(this IKernelPoolManager pool, string key, IHttpClientCache httpClientCache, CancellationToken cancellationToken = default)
70+
public static async ValueTask UnregisterGemini(this ISemanticKernelPool pool, string key, IHttpClientCache httpClientCache, CancellationToken cancellationToken = default)
7271
{
7372
await pool.Unregister(key, cancellationToken).NoSync();
7473
await httpClientCache.Remove($"gemini:{key}", cancellationToken).NoSync();

src/Soenneker.SemanticKernel.Pool.Gemini.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
<ItemGroup>
4545
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Google" Version="1.51.0-alpha" />
46-
<PackageReference Include="Soenneker.SemanticKernel.Pool" Version="3.0.8" />
46+
<PackageReference Include="Soenneker.SemanticKernel.Pool" Version="3.0.10" />
4747
<PackageReference Include="Soenneker.Utils.HttpClientCache" Version="3.0.1692" />
4848
</ItemGroup>
4949
</Project>

test/Soenneker.SemanticKernel.Pool.Gemini.Tests/Soenneker.SemanticKernel.Pool.Gemini.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<PrivateAssets>all</PrivateAssets>
2626
</PackageReference>
2727
<PackageReference Include="Soenneker.Utils.Test" Version="3.0.283" />
28-
<PackageReference Include="Soenneker.Tests.FixturedUnit" Version="3.0.1842" />
28+
<PackageReference Include="Soenneker.Tests.FixturedUnit" Version="3.0.1843" />
2929
<PackageReference Include="xUnit.v3" Version="2.0.2" />
3030
</ItemGroup>
3131

0 commit comments

Comments
 (0)