From 042b09113c1163ca7a98e96105111d890ffbb4be Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Wed, 13 Mar 2024 10:51:57 +0100 Subject: [PATCH] ihp-openai: Added missing assistantMessage --- ihp-openai/IHP/OpenAI.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ihp-openai/IHP/OpenAI.hs b/ihp-openai/IHP/OpenAI.hs index 5652a44db..69f23f94d 100644 --- a/ihp-openai/IHP/OpenAI.hs +++ b/ihp-openai/IHP/OpenAI.hs @@ -62,6 +62,9 @@ userMessage content = Message { role = UserRole, content } systemMessage :: Text -> Message systemMessage content = Message { role = SystemRole, content } +assistantMessage :: Text -> Message +assistantMessage content = Message { role = AssistantRole, content } + newCompletionRequest :: CompletionRequest newCompletionRequest = CompletionRequest { prompt = ""