![]() ![]() You can run any number of different operations at the same time, or several instances of the same operation. Streaming response with async streams (like ChatGPT) var text = "Write the world top 3 songs of Soul genre" Īwait foreach (string chunk in _client.For example, you can have several "copy" commands going simultaneously.ĭirect link to PDAs with Windows CE. String response = await _client.GetChatCompletions(new UserMessage(text), maxTokens: 80) Simple usage of the Chat Completions API (raw client) string text = "Who are you?" If you want to configure request parameters, you can do it in appsettings.json configuration or in ChatGPTFactory.Create or in ChatGPT.CreateChat methods. Response = await _chatService.GetNextMessageResponse(_prompt) ![]() Var chatService = await chatGpt.ContinueOrStartNewTopic() Public YourService(ChatGPTFactory chatGptFactory)ĬhatGPT chatGpt = await _chatGptFactory.Create(userId) Private readonly ChatGPTFactory _chatGptFactory Inject ChatGPTFactory to your service and use it to create ChatGPT instance:.Instead of options.UseSqlite("Data Source=chats.db") use your own db and connection string. ![]() Options => options.UseSqlite("Data Source=chats.db"))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |