File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace Devlooped . Extensions . AI . Grok ;
66
7+ /// <summary>Client for interacting with the Grok service.</summary>
8+ /// <param name="apiKey">The API key used for authentication.</param>
9+ /// <param name="options">The options used to configure the client.</param>
710public class GrokClient ( string apiKey , GrokClientOptions options )
811{
912 static ConcurrentDictionary < ( Uri , string ) , GrpcChannel > channels = [ ] ;
1013
14+ /// <summary>Initializes a new instance of the <see cref="GrokClient"/> class with default options.</summary>
1115 public GrokClient ( string apiKey ) : this ( apiKey , new GrokClientOptions ( ) ) { }
1216
17+ /// <summary>Gets the API key used for authentication.</summary>
1318 public string ApiKey { get ; } = apiKey ;
1419
1520 /// <summary>Gets or sets the endpoint for the service.</summary>
Original file line number Diff line number Diff line change 1- using Microsoft . Extensions . AI ;
1+ using System . ComponentModel ;
2+ using Microsoft . Extensions . AI ;
23
34namespace Devlooped . Extensions . AI . Grok ;
45
6+ /// <summary>Provides extension methods for <see cref="GrokClient"/>.</summary>
7+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
58public static class GrokClientExtensions
69{
10+ /// <summary>Creates a new <see cref="IChatClient"/> from the specified <see cref="GrokClient"/> using the given model as the default.</summary>
711 public static IChatClient AsIChatClient ( this GrokClient client , string defaultModelId )
812 => new GrokChatClient ( client . Channel , client . Options , defaultModelId ) ;
913}
Original file line number Diff line number Diff line change 22
33namespace Devlooped . Extensions . AI . Grok ;
44
5+ /// <summary>Options for configuring the <see cref="GrokClient"/>.</summary>
56public class GrokClientOptions
67{
78 /// <summary> Gets or sets the service endpoint. </summary>
You can’t perform that action at this time.
0 commit comments