diff --git a/Pinpoint.Plugin.OpenAI/OpenAIPlugin.cs b/Pinpoint.Plugin.OpenAI/OpenAIPlugin.cs index 76400a8..560f149 100644 --- a/Pinpoint.Plugin.OpenAI/OpenAIPlugin.cs +++ b/Pinpoint.Plugin.OpenAI/OpenAIPlugin.cs @@ -51,9 +51,9 @@ public async IAsyncEnumerable Process(Query query, [Enumera yield return new TitleOpenAIResult(); var userPrompt = query.RawQuery[1..]; - var chatPrompts = new List + var chatPrompts = new List { - new("user", userPrompt), + new(Role.User, userPrompt), }; var resp = await _client.ChatEndpoint.GetCompletionAsync(new ChatRequest(chatPrompts), ct); if (resp is null) diff --git a/Pinpoint.Plugin.OpenAI/Pinpoint.Plugin.OpenAI.csproj b/Pinpoint.Plugin.OpenAI/Pinpoint.Plugin.OpenAI.csproj index f5d9503..1d86c67 100644 --- a/Pinpoint.Plugin.OpenAI/Pinpoint.Plugin.OpenAI.csproj +++ b/Pinpoint.Plugin.OpenAI/Pinpoint.Plugin.OpenAI.csproj @@ -12,7 +12,7 @@ - +