diff --git a/README.md b/README.md index 41081ad..07ef7fa 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,19 @@ The `ballarinax/openai.assistants` connector allows developers to seamlessly int To use the OpenAI Connector, you must have access to the OpenAI API through a [OpenAI Platform account](https://platform.openai.com) and a project under it. If you do not have a OpenAI Platform account, you can sign up for one [here](https://platform.openai.com/signup). - 1. Open the [OpenAI Platform Dashboard](https://platform.openai.com). - 2. Navigate to Dashboard -> API keys -OpenAI Platform - +OpenAI Platform 3. Click on the "Create new secret key" button -OpenAI Platform - +OpenAI Platform 4. Fill the details and click on Create secret key -OpenAI Platform - +OpenAI Platform 5. Store the API key securely to use in your application -OpenAI Platform +OpenAI Platform ## Quickstart diff --git a/ballerina/Module.md b/ballerina/Module.md index 0d05583..5576d53 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -9,25 +9,20 @@ The `ballarinax/openai.assistants` connector allows developers to seamlessly int To use the OpenAI Connector, you must have access to the OpenAI API through a [OpenAI Platform account](https://platform.openai.com) and a project under it. If you do not have a OpenAI Platform account, you can sign up for one [here](https://platform.openai.com/signup). -#### Create a OpenAI API Key - 1. Open the [OpenAI Platform Dashboard](https://platform.openai.com). - 2. Navigate to Dashboard -> API keys -OpenAI Platform - +OpenAI Platform 3. Click on the "Create new secret key" button -OpenAI Platform - +OpenAI Platform 4. Fill the details and click on Create secret key -OpenAI Platform - +OpenAI Platform 5. Store the API key securely to use in your application -OpenAI Platform +OpenAI Platform + ## Quickstart diff --git a/ballerina/Package.md b/ballerina/Package.md index ff958d0..d8eeeb3 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -8,24 +8,20 @@ The `ballarinax/openai.assistants` connector allows developers to seamlessly int To use the OpenAI Connector, you must have access to the OpenAI API through a [OpenAI Platform account](https://platform.openai.com) and a project under it. If you do not have a OpenAI Platform account, you can sign up for one [here](https://platform.openai.com/signup). -#### Create a OpenAI API Key - 1. Open the [OpenAI Platform Dashboard](https://platform.openai.com). 2. Navigate to Dashboard -> API keys -OpenAI Platform - +OpenAI Platform 3. Click on the "Create new secret key" button -OpenAI Platform - +OpenAI Platform 4. Fill the details and click on Create secret key -OpenAI Platform - +OpenAI Platform 5. Store the API key securely to use in your application -OpenAI Platform +OpenAI Platform + ## Quickstart diff --git a/docs/setup/resources/api-key-dashboard.png b/docs/setup/resources/api-key-dashboard.png new file mode 100644 index 0000000..5239d1a Binary files /dev/null and b/docs/setup/resources/api-key-dashboard.png differ diff --git a/docs/setup/resources/create-new-secret-key.png b/docs/setup/resources/create-new-secret-key.png new file mode 100644 index 0000000..70daf70 Binary files /dev/null and b/docs/setup/resources/create-new-secret-key.png differ diff --git a/docs/setup/resources/navigate-api-key-dashboard.png b/docs/setup/resources/navigate-api-key-dashboard.png new file mode 100644 index 0000000..7b0d1bd Binary files /dev/null and b/docs/setup/resources/navigate-api-key-dashboard.png differ diff --git a/docs/setup/resources/saved-key.png b/docs/setup/resources/saved-key.png new file mode 100644 index 0000000..87aaf88 Binary files /dev/null and b/docs/setup/resources/saved-key.png differ diff --git a/examples/math-tutor-bot/main.bal b/examples/math-tutor-bot/main.bal index 79992e3..c98a886 100644 --- a/examples/math-tutor-bot/main.bal +++ b/examples/math-tutor-bot/main.bal @@ -21,17 +21,17 @@ import ballerinax/openai.assistants; // Define configuration and client setup configurable string token = ?; -final assistants:Client openaiAssistant = check new ({ - auth: { - token - } -}); - final map headers = { "OpenAI-Beta": ["assistants=v2"] }; public function main() returns error? { + // Define the client to interact with the OpenAI Assistants API + final assistants:Client openaiAssistant = check new ({ + auth: { + token + } + }); // Step 1: Create a new Math Assistant assistants:AssistantToolsCode codeTool = { 'type: "code_interpreter" diff --git a/examples/weather-assistant/main.bal b/examples/weather-assistant/main.bal index 69efdcd..37375dd 100644 --- a/examples/weather-assistant/main.bal +++ b/examples/weather-assistant/main.bal @@ -20,18 +20,17 @@ import ballerinax/openai.assistants; configurable string token = ?; -// Define the client to interact with the OpenAI Assistants API -final assistants:Client openaiAssistant = check new ({ - auth: { - token - } -}); - final map headers = { "OpenAI-Beta": ["assistants=v2"] }; public function main() returns error? { + // Define the client to interact with the OpenAI Assistants API + final assistants:Client openaiAssistant = check new ({ + auth: { + token + } + }); // Step 1: Create the weather assistant assistants:FunctionObject getTemperature = { name: "get_temperature",