This file contains hidden or 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
The TaskingAI Python client for creating and managing AI-driven applications.
The official TaskingAI Python client.
For more information, see the docs at [TaskingAI Documentation](https://docs.tasking.ai/)
## Prerequisites
The TaskingAI client is compatible with Python 3.8 and above.
## Installation
Install the latest released version using pip:
Use `pip` to install the TaskingAI Python client.
```shell
# Install the latest version
pip install taskingai
# Install a specific version
pip install taskingai==0.2.2
```
## Usage
### Initialization
Before you can use the TaskingAI SDK, you must have your TaskingAI project set up and running. For community version, visit [TaskingAI Community](https://www.github.com/taskingai/taskingai) to get started. For cloud version, visit [TaskingAI Cloud](https://www.tasking.ai) to sign up first.
You need to initialize the TaskingAI Python client with an API key you obtain from the TaskingAI console. You can set the API key as an environment variable or pass it directly to the `init` function.
#### Using environment variables (Recommended)
Set it as an environment variable on your local system, and the SDK will automatically load the key without passing the `api_key` parameter in the `init` function.
```shell
pip3 install taskingai
export TASKINGAI_API_KEY=$YOUR_API_KEY
```
When you run your Python script, the SDK will automatically pick up the API key from the environment variable.
```python
import taskingai
# taskingai.init()
# No need to initialize the SDK with the API key
```
#### Passing the API key directly
You can also specify an API key to the SDK by passing it as a parameter to the init function:
```python
import taskingai
taskingai.init(api_key="YOUR_API_KEY")
```
## Quickstart
If you use community version, you can set the base URL to the TaskingAI server by passing it to the `init` function:
Here's how you can quickly start building and managing AI-driven applications using the TaskingAI client.
Leverage TaskingAI's retrieval capabilities to store, manage, and extract information, making your applications smarter and more responsive.
TaskingAI offers comprehensive tools for the retrieval system, ranging from straightforward to intricate setups. Here is an example of how to create, add, retrieve, and delete a record in a collection:
```python
import taskingai
from taskingai.retrieval import *
# Create a collection for storing and retrieving data
Utilize TaskingAI's tools to create actions that enable your assistant to interact with external APIs and services, enriching the user experience.
The Tools module in TaskingAI is an essential suite designed to augment the capabilities of TaskingAI agents. Here is an example of how to create, run, and delete a tool action:
```python
import taskingai
from taskingai.tool import *
# Define a schema for the tool action
NUMBERS_API_SCHEMA = {
OPENAPI_SCHEMA = {
# Schema definition goes here
}
# Create a tool action based on the defined schema
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore: update examples and readme #40
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
chore: update examples and readme #40
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.