You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the **Allie FlowKit Python** repository! This repository hosts Python functions similar to the [Allie FlowKit](https://github.com/ansys/allie-flowkit) and serves as a service to expose APIs for each individual external function added to it. These functions can be used to build Allie workflows, enabling a flexible and modular approach to creating and executing workflows with Allie.
3
+
Welcome to Allie FlowKit Python. This repository hosts Python functions similar to [Allie FlowKit](https://github.com/ansys/allie-flowkit) and provides a service for exposing APIs for each external function added to it. You can use these functions to build Allie workflows, enabling a flexible and modular approach to creating and executing workflows with Allie.
**Allie FlowKit Python** is designed to host the code for a Python service that exposes REST APIs for each external function added to it. These functions can be seamlessly integrated into Allie workflows and executed by the Allie Agent, making it easier for teams to customize and extend their workflow capabilities.
19
+
Allie FlowKit Python is designed to host the code for a Python service that exposes a REST API for each external function added to it. These functions can be seamlessly integrated into Allie workflows and executed by the Allie agent, making it easier for teams to customize and extend their workflow capabilities.
20
20
21
-
## Purpose
21
+
## Objectives
22
22
23
-
The main purpose of this repository is to:
24
-
1. Host Python functions similar to those in the [Allie FlowKit](https://github.com/ansys/allie-flowkit).
25
-
2. Provide a service that exposes these functions as REST APIs.
26
-
3. Enable the creation of custom Allie workflows using these functions.
27
-
4. Allow other teams to add their needed functions to support their specific Allie workflows.
23
+
Using Allie Flowkit Python lets you achieve these key objectives:
28
24
29
-
## How It Works
25
+
- Host Python functions similar to those in [Allie FlowKit](https://github.com/ansys/allie-flowkit).
26
+
- Provide a service that exposes these functions as REST APIs.
27
+
- Enable the creation of custom Allie workflows using these functions.
28
+
- Allow other teams to add their needed functions to support their specific Allie workflows.
30
29
31
-
1.**Function Integration:** External functions are added to this repository and exposed as REST APIs.
32
-
2.**Workflow Execution:** Allie workflows can include functions from Allie FlowKit Python.
33
-
3.**API Calls:** When an Allie workflow includes a function from Allie FlowKit Python, the Allie Agent calls the function via REST API with the required inputs.
34
-
4.**Function Execution:** The function is executed in Allie FlowKit Python, and the output is returned as the body of the REST response.
30
+
## How it works
35
31
36
-
## Getting Started
32
+
Allie Flowkit Python supports these actions:
33
+
34
+
1.**Function integration:** Add external functions to this repository and expose them as REST APIs.
35
+
2.**Workflow execution:** Include functions from Allie FlowKit Python in Allie workflows.
36
+
3.**API calls:** When an Allie workflow includes a function from Allie FlowKit Python, the Allie agent calls the function via a REST API with the required inputs.
37
+
4.**Function execution:** The function is executed in Allie FlowKit Python, and the output is returned as the body of the REST response.
38
+
39
+
## Getting started
37
40
38
41
### Prerequisites
39
42
40
-
- Python 3.7 or higher
43
+
- Python 3.7 or later
41
44
- pip (Python package installer)
42
-
- A running instance of the Allie Toolkit
45
+
- A running instance of the Allie Flowkit
43
46
44
47
### Installation
45
48
@@ -57,72 +60,73 @@ The main purpose of this repository is to:
You can specify the host, port, and number of workers as needed. The service exposes the functions as REST APIs on the specified port. The default is 8000.
66
67
67
-
3. Integrate these APIs into your Allie workflows as needed.
68
+
2. Integrate these APIs into your Allie workflows as needed.
68
69
69
-
## Adding Custom Functions
70
+
## Adding custom functions
70
71
71
-
1. **Create a New Function:**
72
+
1. **Create a function.**
72
73
- Add your functioncode as an endpoint to a new Python file in the `app/endpoints` directory.
73
-
Use the `app/endpoints/splitter.py` file and its endpoints as an example.
74
-
Be explicit about the input and output of the function, as this will be used by the Allie Agent to call the function.
74
+
- Use the `app/endpoints/splitter.py` file and its endpoints as an example.
75
+
- Be explicit about the input and output of the functionas they are used by the Allie agent
76
+
to call the function.
75
77
76
-
2. **Add the models for the function:**
78
+
2. **Add the models for the function.**
77
79
- Add the models forthe input and output of the functionin the `app/models` directory.
78
-
Use the `app/models/splitter.py` file its models as an example.
80
+
- Use the `app/models/splitter.py` file its models as an example.
79
81
80
-
2. **Add the endpoints to the service:**
81
-
- Import your module in the `app/app.py` file and add the router to the service.
Object containing the input data required for the function.
102
106
103
-
Returns
104
-
-------
105
-
CustomResponse
106
-
An object containing the output data of the function.
107
-
"""
108
-
# Your custom processing logic here
109
-
result = ...
110
-
return result
111
-
```
112
-
113
-
## Example Functions
107
+
Returns
108
+
-------
109
+
CustomResponse
110
+
Object containing the output data of the function.
111
+
"""
112
+
# Your custom processing logic here
113
+
result = ...
114
+
return result
115
+
```
116
+
117
+
## Example functions
114
118
115
119
The repository includes some standard functions prefilled by the Allie team. You can use these as references or starting points for adding your own custom functions.
116
120
117
121
## Contributing
118
122
119
-
We welcome contributions from all teams. To contribute:
123
+
We welcome contributions from all teams. To contribute, perform these steps:
120
124
121
125
1. Clone the repository.
122
-
2. Create a new branch for your feature or bug fix.
126
+
2. Create a branch for your feature or bug fix.
123
127
3. Commit your changes and push your branch to the repository.
124
128
4. Open a pull request to merge your changes into the main repository.
125
129
126
130
---
127
131
128
-
Thank you for using Allie FlowKit Python! We hope this repository helps you create powerful and flexible Allie workflows. Happy coding!
132
+
Thank you for using Allie FlowKit Python. We hope this repository helps you create powerful and flexible Allie workflows. Happy coding!
0 commit comments