Intents ⛺
Intents is a Python framework to define and operate Conversational Agents with a simple, code-first approach. Intents comes with built-in support for Dialogflow ES and experimental Alexa and Snips connectors. Its main benefits are:
- Agents are Python projects. You will develop with autocomplete, static type checking and everything you are already used to.
- Versioning and CI. Agents can be versioned on Git, and programmatically deployed just like software.
- Human-friendly Connectors. Intents are classes, predictions are their instances. Support can be extended beyond Dialogflow by implementing custom connectors.
A detailed view of the available features can be found in STATUS.md. Also, check out the Projects page to keep track of recent developments.
Install
pip install intents
Usage
Intents are defined like standard Python dataclasses:
@dataclass
class HelloIntent(Intent):
"""A little docstring for my Intent class"""
user_name: Sys.Person = "Guido"
MyAgent.register(HelloIntent)
Their language resources are stored in separate YAML files:
utterances:
- Hi! My name is $user_name{Guido}
- Hello there, I'm $user_name{Mario}
responses:
default:
- text:
- Hi $user_name
- Hello $user_name, this is Bot!
Agents can be uploaded as Dialogflow ES projects directly from code:
df = DialogflowEsConnector('/path/to/service-account.json', MyAgent)
df.upload() # You will find it in your Dialogflow Console
Intents will act transparently as a prediction client:
predicted = df.predict("Hi there, my name is Mario")
predicted.intent # HelloIntent(user_name="Mario")
predicted.intent.user_name # "Mario"
predicted.fulfillment_text # "Hello Mario, this is Bot!"
For a complete working example, check out the included Example Agent. Also, Intents documentation is published at https://intents.readthedocs.io/ 📚
Disclaimer
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Dialogflow. The names Dialogflow, Google, as well as related names, marks, emblems and images are registered trademarks of their respective owners.
Metadata
Release files for intents 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| intents-0.3.0.tar.gz | 109.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| intents-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 250.1 kB
Release files / intents-0.3.0.tar.gz
| Download URL | intents-0.3.0.tar.gz |
|---|---|
| Size | 109.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
711d1081819dc07ab457961e5c847cae2c7be6de4cbe1e4aa8560127fe2a2ccf
|
|
BLAKE2b-256 checksum How to use checksums |
d1cfc50e584f1cd753a67c07d4bf523f8d45f8477ec71e8b95ce787974fe55f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.8 Linux/5.4.0-84-generic
|
Release files / intents-0.3.0-py3-none-any.whl
| Download URL | intents-0.3.0-py3-none-any.whl |
|---|---|
| Size | 140.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be417a541dff1a7738006853ecfe83b587a6724cfd51a3d8f24e2fb669df4c4c
|
|
BLAKE2b-256 checksum How to use checksums |
f690b702ebccf4bcf2876ba3c4c4a256602da0e7bff79aa8662de40f8f924332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.8 Linux/5.4.0-84-generic
|