Skip to content

Commit d6deba9

Browse files
committed
Add note on Smith example, cleanup logging example
1 parent 67c547f commit d6deba9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

readme.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ var options = new GrokChatOptions
3535
var response = await grok.GetResponseAsync(messages, options);
3636
```
3737

38+
> [!TIP]
39+
> `Env` is a helper class from [Smith](https://www.nuget.org/packages/Smith),
40+
> a higher level package typically used for `dotnet run program.cs` scenarios in
41+
> .NET 10. You will typically use `IConfiguration` for reading API keys.
42+
> This package does not depend on Smith.
43+
3844
Search can alternatively be configured using a regular `ChatOptions`
3945
and adding the `HostedWebSearchTool` to the tools collection, which
4046
sets the live search mode to `auto` like above:
@@ -123,9 +129,7 @@ and more.
123129
The chat pipeline logging is added similar to other pipeline extensions:
124130

125131
```csharp
126-
IChatClient client = new GrokClient(Env.Get("XAI_API_KEY")!)
127-
.GetChatClient("grok-3-mini")
128-
.AsIChatClient()
132+
IChatClient client = new GrokChatClient(Env.Get("XAI_API_KEY")!, "grok-3-mini")
129133
.AsBuilder()
130134
.UseOpenTelemetry()
131135
// other extensions...

0 commit comments

Comments
 (0)