Skip to main content

accobot

FanoLabs Accobot module for Python3

Installation

Current stable release (0.1.1)

$ pip install fanolabsaccobot

Common Usage

We suggest you load the module via require, pending the stabalizing of es modules in node:

from fanolabsaccobot import Accobot

class Chatbot:

    def __init__(self):
        self.client = Accobot(`url`, `userName`, `password`, `scope`)

    def __call__(self, senderId, text, language):
        return self.client.chat(senderId, text, language)

def main():
    returnObj = Chatbot()(`senderId`, `text`, `language`)
    print(returnObj)

if __name__ == '__main__':
    main()

Note: url、userName、password、scope should set to the specific correct configuration.

API

chat(senderId,text,language)

  • senderId A string representing the user for chatting with accobot

  • text A string representing the user input content

  • language A string representing the language for the user input content, allowed languages to 'cantonese, mandarin, english-usa'

  • Returns:

    Note: successful response

    {
        "content": [{
            "text": "你好,請您使用語音描述一下您想要報告的事故。您可以報告以下事故類型:水管爆裂,車輛故障,山泥傾瀉,洪水泛濫,塌樹,氣體洩漏,緊急維修以及交通事故。(例如: xxx路口因為交通意外,道路嚴重阻塞。)"
        }],
        "status": 200
    }
    

    Note: Error handling

    {
        "status": 500,
        "error_msg": {
            "to": "https://fano_ms_bre:8080/bre?user_id=test_henry",
            "status": "error",
            "error_msg": "BRE Error: 'NoneType' object is not subscriptable"
        },
        "statusText": "Internal Server Error"
    }
    

License

MIT

Metadata

Release files for fanolabsaccobot 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fanolabsaccobot 0.1.1
File Size Uploaded Provenance Actions
fanolabsaccobot-0.1.1.tar.gz 3.2 kB Without provenance Details for fanolabsaccobot-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fanolabsaccobot 0.1.1
File Interpreter ABI Platform Actions
fanolabsaccobot-0.1.1-py3-none-any.whl Python 3 none any Details for fanolabsaccobot-0.1.1-py3-none-any.whl

Total release size: 7.2 kB

Release files / fanolabsaccobot-0.1.1.tar.gz

Download URL fanolabsaccobot-0.1.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
71fedc60621be02deb7d94ddfab9a082d1d8d13ccbf9e4d3332b3cdc16567996
BLAKE2b-256 checksum
How to use checksums
e0fb4034be12133fa67531d96271a8aeeeb1160f8dc3a54ee0a79c1809f9a736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Release files / fanolabsaccobot-0.1.1-py3-none-any.whl

Download URL fanolabsaccobot-0.1.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3a9c392bf858d7f5623c5fd781654890b58985f03e4107d025c0e86cfc4ae5e
BLAKE2b-256 checksum
How to use checksums
6ce646718c209b5e91ede94ea310d0ee9e5a1ffd0ff8dca7ade8c20c7a1e9d30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

Security for fanolabsaccobot 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page