-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from SanduniU/final-fixes
Fix the links in the README
- Loading branch information
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
Math+ +tutor | ||
## 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 = "<API key>" | ||
``` | ||
|
||
## Run the example | ||
|
||
Execute the following command to run the example: | ||
|
||
```bash | ||
bal run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
weather+ +assistant | ||
## 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 = "<API key>" | ||
``` | ||
|
||
## Run the example | ||
|
||
Execute the following command to run the example: | ||
|
||
```bash | ||
bal run | ||
``` |