77using System . Net . Http ;
88using System . Threading ;
99using System . Threading . Tasks ;
10+ using Soenneker . SemanticKernel . Pool . Abstract ;
1011
1112namespace Soenneker . SemanticKernel . Pool . Gemini ;
1213
@@ -30,7 +31,7 @@ public static class KernelPoolGeminiExtension
3031 /// <param name="tokensPerDay">Optional maximum number of tokens allowed per day.</param>
3132 /// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
3233 /// <returns>A <see cref="ValueTask"/> representing the asynchronous registration operation.</returns>
33- public static ValueTask RegisterGemini ( this KernelPoolManager pool , string key , string modelId , string apiKey , string endpoint , IHttpClientCache httpClientCache , int ? rps ,
34+ public static ValueTask RegisterGemini ( this IKernelPoolManager pool , string key , string modelId , string apiKey , string endpoint , IHttpClientCache httpClientCache , int ? rps ,
3435 int ? rpm , int ? rpd , int ? tokensPerDay = null , CancellationToken cancellationToken = default )
3536 {
3637 var options = new SemanticKernelOptions
@@ -67,7 +68,7 @@ public static ValueTask RegisterGemini(this KernelPoolManager pool, string key,
6768 /// <param name="httpClientCache">The HTTP client cache to remove the associated client from.</param>
6869 /// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
6970 /// <returns>A <see cref="ValueTask"/> representing the asynchronous unregistration operation.</returns>
70- public static async ValueTask UnregisterGemini ( this KernelPoolManager pool , string key , IHttpClientCache httpClientCache , CancellationToken cancellationToken = default )
71+ public static async ValueTask UnregisterGemini ( this IKernelPoolManager pool , string key , IHttpClientCache httpClientCache , CancellationToken cancellationToken = default )
7172 {
7273 await pool . Unregister ( key , cancellationToken ) . NoSync ( ) ;
7374 await httpClientCache . Remove ( $ "gemini:{ key } ", cancellationToken ) . NoSync ( ) ;
0 commit comments