diff --git a/CSharp/OpenAi/ChatGpt.cs b/CSharp/OpenAi/ChatGpt.cs index 201626d..2cee59a 100644 --- a/CSharp/OpenAi/ChatGpt.cs +++ b/CSharp/OpenAi/ChatGpt.cs @@ -23,7 +23,7 @@ public sealed class ChatGpt _httpClient.DefaultRequestHeaders.Add(AcceptHeaderRequest, ApplicationJsonMediaTypeRequest); } - public async Task?> GetReasonsToMyBitch() + public async Task?> GetReasonsToMyBitch() { const string prompt = "Return only a CSV list separated by semicolons, of phrases with various reasons that justify " + "my delay in leaving work, to my wife. Do not repeat this question in your response. " + @@ -32,7 +32,7 @@ public sealed class ChatGpt return await DoRequest(prompt); } - public async Task?> GetExcusesToMyMates() + public async Task?> GetExcusesToMyMates() { const string prompt = "Return only a CSV list separated by semicolons, of phrases with various reasons that " + "justify why I can't go out for a drink with my friends. Do not repeat this question in " + @@ -41,7 +41,7 @@ public sealed class ChatGpt return await DoRequest(prompt); } - private async Task?> DoRequest(string prompt) + private async Task?> DoRequest(string prompt) { var promptJson = new CompletionChatRequest { @@ -58,6 +58,6 @@ public sealed class ChatGpt var responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); var response = JsonSerializer.Deserialize(responseContent, _serializerOptions); - return response?.Content?.Split(";"); + return response?.Content?.Split(";").ToList(); } -} \ No newline at end of file +}