diff --git a/README.md b/README.md index ecbd446..61b45e5 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ bal run ## Examples -The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-openai.assistants/tree/main/examples/), covering the following use cases: +The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples), covering the following use cases: 1. [Math tutor bot](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples/Math-tutor-bot) - Create an assistant to solve mathematical problems with step-by-step solutions and interactive guidance. diff --git a/ballerina/Module.md b/ballerina/Module.md index 5421c60..cb76874 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -99,7 +99,7 @@ bal run ## Examples -The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-openai-assistants/tree/main/examples/), covering the following use cases: +The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples), covering the following use cases: 1. [Math tutor bot](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples/Math-tutor-bot) - Create an assistant to solve mathematical problems with step-by-step solutions and interactive guidance. diff --git a/ballerina/Package.md b/ballerina/Package.md index 049ce09..edb4360 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -97,7 +97,7 @@ bal run ## Examples -The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-openai-assistants/tree/main/examples/), covering the following use cases: +The `OpenAI Assistants` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples), covering the following use cases: 1. [Math tutor bot](https://github.com/ballerina-platform/module-ballerinax-openai.assistants/tree/main/examples/Math-tutor-bot) - Create an assistant to solve mathematical problems with step-by-step solutions and interactive guidance. diff --git a/examples/Math-tutor-bot/.github/README.md b/examples/Math-tutor-bot/.github/README.md index 7df726f..8b1f013 120000 --- a/examples/Math-tutor-bot/.github/README.md +++ b/examples/Math-tutor-bot/.github/README.md @@ -1 +1,24 @@ -Math+ +tutor \ No newline at end of file +## Math tutor bot +This use case demonstrates how the OpenAI Assistants API `OpenAI-Beta: assistants=v2` can be utilized to create a Math Tutor Bot using Ballerina. The example showcases a series of steps that involve creating an assistant designed to help users with mathematical problems. This includes defining functions for solving and explaining math problems, starting a conversation, sending a math problem as a message, initiating a run to process the problem, and retrieving the assistant's step-by-step response. The example highlights the integration of function calls and real-time interaction to provide accurate and detailed solutions for various mathematical queries. + +## Prerequisites + +### 1. Generate a API key + +Refer to the [Setup guide](https://central.ballerina.io/ballerinax/openai.assistants/latest#setup-guide) to obtain the API key. + +### 2. Configuration + +Create a `Config.toml` file in the example's root directory as follows: + +```bash +token = "" +``` + +## Run the example + +Execute the following command to run the example: + +```bash +bal run +``` \ No newline at end of file diff --git a/examples/Weather-assistant/.github/README.md b/examples/Weather-assistant/.github/README.md index f5cb5ff..a4c316e 120000 --- a/examples/Weather-assistant/.github/README.md +++ b/examples/Weather-assistant/.github/README.md @@ -1 +1,25 @@ -weather+ +assistant \ No newline at end of file +## Weather assistant + +This example demonstrates how the OpenAI Assistants API `OpenAI-Beta: assistants=v2` can be used to create a Weather Assistant capable of providing weather information such as temperature and rain probability. The example covers the complete workflow: creating the assistant, defining the functions for retrieving temperature and rain probability, starting a conversation, sending a weather-related query, initiating a run to process the query, and finally handling the assistant's function calls. The approach ensures that the assistant responds with accurate weather details, making it suitable for real-time weather inquiries and forecasting scenarios. + +## Prerequisites + +### 1. Generate an API key + +Refer to the [Setup guide](https://central.ballerina.io/ballerinax/openai.assistants/latest#setup-guide) to obtain the API key. + +### 2. Configuration + +Create a `Config.toml` file in the example's root directory as follows: + +```bash +token = "" +``` + +## Run the example + +Execute the following command to run the example: + +```bash +bal run +``` \ No newline at end of file