Skip to content

Commit

Permalink
Documentation update (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva authored Apr 10, 2023
2 parents d6b440f + af6ef22 commit 6749f2a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ Response streaming works by returning an [IAsyncEnumerable](https://learn.micros

![](https://raw.githubusercontent.com/marcominerva/ChatGptNet/master/assets/ChatGptApiStreaming.gif)

The library is 100% compatible also with Blazor WebAssembly applications:

![](https://raw.githubusercontent.com/marcominerva/ChatGptNet/master/assets/ChatGptBlazor.WasmStreaming.gif)

Check the [Samples folder](https://github.com/marcominerva/ChatGptNet/tree/master/samples) for more information about the different implementations.

**Changing the assistant's behavior**

ChatGPT supports messages with the _system_ role to influence how the assistant should behave. For example, we can tell to ChatGPT something like that:
Expand Down
Binary file removed assets/ChatGptApiStreaming.mp4
Binary file not shown.
Binary file added assets/ChatGptBlazor.WasmStreaming.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/ChatGptConsoleStreaming.mp4
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ChatGptNet/ChatGptServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public static IServiceCollection AddChatGpt(this IServiceCollection services, Ac
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(setupAction);

var options = new ChatGptOptions();
services.AddScoped(provider =>
{
var options = new ChatGptOptions();
setupAction.Invoke(provider, options);
return options;
});
Expand Down

0 comments on commit 6749f2a

Please sign in to comment.