https://github.com/alissonpelizaro/fulfillment-helper-client
This repository contains an example client that demonstrates the usage of the assistant-fulfillment-helper library.
https://github.com/alissonpelizaro/fulfillment-helper-client
asterisk call click-to-call
Last synced: about 2 months ago
JSON representation
This repository contains an example client that demonstrates the usage of the assistant-fulfillment-helper library.
- Host: GitHub
- URL: https://github.com/alissonpelizaro/fulfillment-helper-client
- Owner: alissonpelizaro
- Created: 2022-12-27T17:45:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-15T14:39:32.000Z (almost 2 years ago)
- Last Synced: 2025-02-09T04:43:47.857Z (3 months ago)
- Topics: asterisk, call, click-to-call
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Assistant Fulfillment Helper Client Example
_Author: Alisson Pelizaro_This repository contains an example client that demonstrates the usage of the `assistant-fulfillment-helper` library. The `assistant-fulfillment-helper` library simplifies the creation of webhooks for intent nodes in the TOTVS Assistant platform. With just a few lines of code, you can create custom business rules within your own server infrastructure.
## Prerequisites
- Python 3.7 or higher.
## Getting Started
1. Clone this repository to your local machine.
2. Install the required dependencies using the following command:
```
pip install -r requirements.txt
```
3. Run the example client using the command:
```
python my_app.py
```
## PurposeThe purpose of this client example is to demonstrate how to integrate and utilize the `assistant-fulfillment-helper` library to create a custom webhook server for intent nodes in the TOTVS Assistant platform. By following the example code in `main.py`, you can understand how to:
- Set up a FulfillmentHelper instance.
- Define intent callbacks using the `@fh.intent()` decorator.
- Handle intent-specific logic and return responses using `FulfillmentHelperResponse`.
- Start a local server to handle webhook requests from the Assistant.## Usage
1. Install the required packages by following the prerequisites above.
2. Import the `FulfillmentHelper` class from the `assistant_fulfillment_helper` module.
3. Instantiate the `FulfillmentHelper` class and define intent callbacks using the `@fh.intent()` decorator.
4. Implement your custom business logic within the callback functions.
5. Run the example client and access the local server's endpoint to test the webhook locally.
## Additional Information
For more information on the `assistant-fulfillment-helper` library and its usage, please refer to the [official documentation](https://pypi.org/project/assistant-fulfillment-helper/).
## License
This example client is provided under the [MIT License](LICENSE).