File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 44
55namespace Microsoft . Extensions . DependencyInjection ;
66
7- /// <summary>Registration extensions for Grok gRPC clients.</summary>
7+ /// <summary>Registration extensions for xAI gRPC clients.</summary>
88[ EditorBrowsable ( EditorBrowsableState . Never ) ]
9- public static class GrokServiceCollectionExtensions
9+ public static class ProtocolServiceCollectionExtensions
1010{
1111 /// <summary>
12- /// Registers Grok gRPC clients with the specified API key.
12+ /// Registers xAI gRPC protocol clients with the specified API key.
1313 /// </summary>
14- public static IServiceCollection AddGrokClient ( this IServiceCollection services , string apiKey ,
14+ public static IServiceCollection AddxAIProtocol ( this IServiceCollection services , string apiKey ,
1515 Action < GrpcClientFactoryOptions > ? configureClient = null ,
1616 Action < IHttpClientBuilder > ? configureHttp = null )
1717 {
1818 var address = new Uri ( "https://api.x.ai/" ) ;
19-
2019 var builder = services . AddGrpcClient < Auth . AuthClient > ( options =>
2120 {
2221 options . Address = address ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class SanityChecks(ITestOutputHelper output)
1111 public async Task ListModelsAsync ( )
1212 {
1313 var services = new ServiceCollection ( )
14- . AddGrokClient ( Environment . GetEnvironmentVariable ( "XAI_API_KEY" ) ! )
14+ . AddxAIProtocol ( Environment . GetEnvironmentVariable ( "XAI_API_KEY" ) ! )
1515 . BuildServiceProvider ( ) ;
1616
1717 var client = services . GetRequiredService < Models . ModelsClient > ( ) ;
@@ -28,7 +28,7 @@ public async Task ListModelsAsync()
2828 public async Task ExecuteLocalFunctionWithWebSearch ( )
2929 {
3030 var services = new ServiceCollection ( )
31- . AddGrokClient ( Environment . GetEnvironmentVariable ( "XAI_API_KEY" ) ! )
31+ . AddxAIProtocol ( Environment . GetEnvironmentVariable ( "XAI_API_KEY" ) ! )
3232 . BuildServiceProvider ( ) ;
3333
3434 var client = services . GetRequiredService < Chat . ChatClient > ( ) ;
You can’t perform that action at this time.
0 commit comments