![]() ![]() Add ChatGPT integration with EF to your DI container:ī(.Set the OpenAI API key or even host (optional) in your project user secrets, or the appsettings.json file (not safe):Īlso, you can specify OpenAI API key as environment variable ASPNETCORE_OpenAICredentials:ApiKey.If you don't want to use EF Core, you can install the package and implement your own storage for chat history, using IChatHistoryStorage interface. NET project with DI and persistence (EF Core) supporting is to install the NuGet package : Install-Package The easiest way to use ChatGPT service in your. Continue dialog with ChatGPT (message history)įirst, you need to create an OpenAI account and get an API key.Streaming response with async streams (like ChatGPT).Simple usage of the Chat Completions API (raw client).StructuredResponse module allows you to get structured responses from the API as C# object. 2023.11 UPD: GPT4Turbo and JSON mode support ![]() Also, the client supports streaming responses (like ChatGPT) via async streams. OpenAI Chat Completions API (ChatGPT) integration with DI and EF Core supporting. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |