From 8ccbfce4e640a0bafe735260b5cda5076c8285d9 Mon Sep 17 00:00:00 2001 From: "B.T. Franklin" Date: Sat, 15 Jul 2023 21:38:04 -0700 Subject: [PATCH] Added a note emphasizing that API keys should not be hard-coded. --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6bfe72c..9d28dad 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,13 @@ Import the `CleverBird` package: import CleverBird ``` -Initialize an `OpenAIAPIConnection` with your API key: +Initialize an `OpenAIAPIConnection` with your API key. Please note that API keys should always be loaded from environment variables, and not hard-coded into your source. After you have loaded your API key, pass it to the initializer of the connection: ```swift -let openAIAPIConnection = OpenAIAPIConnection(apiKey: "your_api_key_here") +let openAIAPIConnection = OpenAIAPIConnection(apiKey: ) ``` -Create a `ChatThread` instance with the connection, and -add system, user, or assistant messages to the chat thread: +Create a `ChatThread` instance with the connection, and add system, user, or assistant messages to the chat thread: ```swift let chatThread = ChatThread(connection: openAIAPIConnection)