Skip to content

Commit cd2283f

Browse files
committed
improved OpenAI API example
1 parent 6c5101b commit cd2283f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

OpenAiApiClient/GenText.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import System.Environment (getEnv)
77
import qualified Data.Text as T
88
import Data.Maybe (fromMaybe)
99

10+
-- example derived from the openai-client library documentation
11+
1012
completionRequestToString :: String -> IO String
1113
completionRequestToString prompt = do
1214
manager <- newManager tlsManagerSettings

OpenAiApiClient/OpenAiApiClient.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: Please see README.md
55
homepage: https://github.com/mark-watson/haskell_tutorial_cookbook_examples
66
license: Apache-2.0
77
license-file: ../APACHE_LICENSE-2.0.txt
8-
author: Mark watson
9-
copyright: 2023 Mark Watson
8+
author: Mark watson and the author of OpenAI Client library Alexander Thiemann
9+
copyright: 2024 Mark Watson
1010
category: Web
1111
build-type: Simple
1212
cabal-version: >=1.10

0 commit comments

Comments
 (0)