Skip to content

Commit ff3648b

Browse files
authored
Fix DI example in README.md (#577)
1 parent 7a28178 commit ff3648b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ Register the `ChatClient` as a singleton in your `Program.cs`:
151151
builder.Services.AddSingleton<ChatClient>(serviceProvider =>
152152
{
153153
var apiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY");
154+
var model = "gpt-4o";
154155

155-
return new ChatClient(apiKey);
156+
return new ChatClient(model, apiKey);
156157
});
157158
```
158159

@@ -1095,4 +1096,4 @@ By default, the client classes will automatically retry the following errors up
10951096

10961097
### Observability
10971098

1098-
OpenAI .NET library supports experimental distributed tracing and metrics with OpenTelemetry. Check out [Observability with OpenTelemetry](./docs/observability.md) for more details.
1099+
OpenAI .NET library supports experimental distributed tracing and metrics with OpenTelemetry. Check out [Observability with OpenTelemetry](./docs/observability.md) for more details.

0 commit comments

Comments
 (0)