watcher-interpreter


Namewatcher-interpreter JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryRunning interpreter with watcher in command
upload_time2024-09-20 09:00:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords watcher seeed llm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Watcher Interpreter README

Welcome to the Watcher Interpreter, a command-line interface for interacting with your AI device. This tool allows you to configure your device, send commands, and interact with its functionalities.

## Setup

1. Install the Watcher package:

   ```bash
   pip install watcher-interpreter
   ```

2. Start the Watcher Interpreter:

   ```bash
   watcher-interpreter
   ```

   - tag: **setUser,setPwd,setEui FIRST!**

## Configuration Commands

Before using the device commands, you need to configure the necessary parameters.

- **setUser \<username\>**: Set the username (API key) for the device.

  ```sh
  > setUser 1ARRxxxMS250ZMZ2
  ```

- **setPwd \<password\>**: Set the password (API key) for the device.

  ```sh
  > setPwd 72Fxxxx6127A46FF89D95B8F7xxxxC1ACD54752706C344E1B02CD55Dxxxx2C1C
  ```

- **setEui \<eui\>**: Set the EUI of the device.

  ```sh
  > setEui 2xxxxx1C9627000xx
  ```

- **(optional)setBaseUrl \<url\>**: Set the base URL for the API.

  ```sh
  > setBaseUrl https://sensecap.seeed.cc/openapi/
  ```

## Device Commands

Once configured, you can use the following commands to interact with the device.

- **checkInfo**: Display the current configuration.

  ```sh
  > checkInfo
  ```

- **llm_chat \<words\>**: Send a chat message to the device.

  ```sh
  > llm_chat "Tell me a joke"
  Watcher:  {'data': {'tlid': 1726821849813, 'ctd': 1726821849813, 'tn': "Need a laugh? Here's a joke!", 'task_flow': [{'id': 6, 'type': 'chat', 'params': {'response': "Sure! Here's a classic one for you: Why don't skeletons fight each other? They don't have the guts! I hope that brought a smile to your face! Do you have a favorite joke you'd like to share?"}, 'wires': [[]]}]}, 'msg': '', 'code': '0'}
  ```

- **llm_task \<words\>**: Get a Task by message from the device.

  ```sh
  > llm_task Tell a joke when someone detected
  Task: <Task...JSON...too...long>
  ```

- **task_publish \<task\>**: Publish a task to the device.

  ```sh
  > llm_task Tell a joke when someone detected
  Task: <Task...JSON>
  > task_publish <Task...JSON>
  Watcher: {'code': '0', 'data': {}}
  ```

- **chat_publish \<words\>**: Send a message and publish it as a task.

  ```sh
  > chat_publish "Remind me about the meeting"
  # llm_task + task_publish
  Watcher: {'code': '0', 'data': {}}
  ```

- **chat \<words\>**: Chat with the device using a predefined task.

  ```sh
  > chat "What's the weather like today?"
  Watcher: The weather today is quite pleasant. ...
  ```

## Exiting the Program

- **exit**: Exit the Watcher Interpreter.

  ```sh
  > exit
  ```

## Additional Information

For developers, you can import the `watcher.sdk` module to interact with the device programmatically.

```python
import watcher.sdk

base_url = "https://sensecap.seeed.cc/openapi/"
# check https://sensecap-docs.seeed.cc/zh/httpapi_quickstart.html
user = "your api key ID"
pwd = "your api key secret"
# check your watcher 
eui = "your Watcher's EUI" 
result = watcher.sdk.llm_chat("why sky is blue?", base_url, user, pwd, eui)
print(result.get("data"))
```

## Support

For any issues or queries, please [New issue](https://github.com/Seeed-Projects/watcher-interpreter/issues)

## License

This software is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "watcher-interpreter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "watcher, seeed, llm",
    "author": null,
    "author_email": "luozhixin <zhixin.luo@seeed.cc>",
    "download_url": "https://files.pythonhosted.org/packages/1d/b6/cc3b00dd7ada49542112ffe3969d1fce5e8e39ad4b969a22239e156135a1/watcher_interpreter-0.0.1.tar.gz",
    "platform": null,
    "description": "# Watcher Interpreter README\n\nWelcome to the Watcher Interpreter, a command-line interface for interacting with your AI device. This tool allows you to configure your device, send commands, and interact with its functionalities.\n\n## Setup\n\n1. Install the Watcher package:\n\n   ```bash\n   pip install watcher-interpreter\n   ```\n\n2. Start the Watcher Interpreter:\n\n   ```bash\n   watcher-interpreter\n   ```\n\n   - tag: **setUser,setPwd,setEui FIRST!**\n\n## Configuration Commands\n\nBefore using the device commands, you need to configure the necessary parameters.\n\n- **setUser \\<username\\>**: Set the username (API key) for the device.\n\n  ```sh\n  > setUser 1ARRxxxMS250ZMZ2\n  ```\n\n- **setPwd \\<password\\>**: Set the password (API key) for the device.\n\n  ```sh\n  > setPwd 72Fxxxx6127A46FF89D95B8F7xxxxC1ACD54752706C344E1B02CD55Dxxxx2C1C\n  ```\n\n- **setEui \\<eui\\>**: Set the EUI of the device.\n\n  ```sh\n  > setEui 2xxxxx1C9627000xx\n  ```\n\n- **(optional)setBaseUrl \\<url\\>**: Set the base URL for the API.\n\n  ```sh\n  > setBaseUrl https://sensecap.seeed.cc/openapi/\n  ```\n\n## Device Commands\n\nOnce configured, you can use the following commands to interact with the device.\n\n- **checkInfo**: Display the current configuration.\n\n  ```sh\n  > checkInfo\n  ```\n\n- **llm_chat \\<words\\>**: Send a chat message to the device.\n\n  ```sh\n  > llm_chat \"Tell me a joke\"\n  Watcher:  {'data': {'tlid': 1726821849813, 'ctd': 1726821849813, 'tn': \"Need a laugh? Here's a joke!\", 'task_flow': [{'id': 6, 'type': 'chat', 'params': {'response': \"Sure! Here's a classic one for you: Why don't skeletons fight each other? They don't have the guts! I hope that brought a smile to your face! Do you have a favorite joke you'd like to share?\"}, 'wires': [[]]}]}, 'msg': '', 'code': '0'}\n  ```\n\n- **llm_task \\<words\\>**: Get a Task by message from the device.\n\n  ```sh\n  > llm_task Tell a joke when someone detected\n  Task: <Task...JSON...too...long>\n  ```\n\n- **task_publish \\<task\\>**: Publish a task to the device.\n\n  ```sh\n  > llm_task Tell a joke when someone detected\n  Task: <Task...JSON>\n  > task_publish <Task...JSON>\n  Watcher: {'code': '0', 'data': {}}\n  ```\n\n- **chat_publish \\<words\\>**: Send a message and publish it as a task.\n\n  ```sh\n  > chat_publish \"Remind me about the meeting\"\n  # llm_task + task_publish\n  Watcher: {'code': '0', 'data': {}}\n  ```\n\n- **chat \\<words\\>**: Chat with the device using a predefined task.\n\n  ```sh\n  > chat \"What's the weather like today?\"\n  Watcher: The weather today is quite pleasant. ...\n  ```\n\n## Exiting the Program\n\n- **exit**: Exit the Watcher Interpreter.\n\n  ```sh\n  > exit\n  ```\n\n## Additional Information\n\nFor developers, you can import the `watcher.sdk` module to interact with the device programmatically.\n\n```python\nimport watcher.sdk\n\nbase_url = \"https://sensecap.seeed.cc/openapi/\"\n# check https://sensecap-docs.seeed.cc/zh/httpapi_quickstart.html\nuser = \"your api key ID\"\npwd = \"your api key secret\"\n# check your watcher \neui = \"your Watcher's EUI\" \nresult = watcher.sdk.llm_chat(\"why sky is blue?\", base_url, user, pwd, eui)\nprint(result.get(\"data\"))\n```\n\n## Support\n\nFor any issues or queries, please [New issue](https://github.com/Seeed-Projects/watcher-interpreter/issues)\n\n## License\n\nThis software is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Running interpreter with watcher in command",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Seeed-Projects/watcher-interpreter",
        "Issues": "https://github.com/Seeed-Projects/watcher-interpreter/issues"
    },
    "split_keywords": [
        "watcher",
        " seeed",
        " llm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6cf97fbb34e59d9b70eb137aaf741a59231b4510ee2e3d1044014cd584291bdc",
                "md5": "b0d24092c836a9c072ff366b19e3e320",
                "sha256": "98063f5440196b9d21910403b7e739a40c10850d34b833b747e11143b95714e4"
            },
            "downloads": -1,
            "filename": "watcher_interpreter-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0d24092c836a9c072ff366b19e3e320",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6487,
            "upload_time": "2024-09-20T09:00:00",
            "upload_time_iso_8601": "2024-09-20T09:00:00.637284Z",
            "url": "https://files.pythonhosted.org/packages/6c/f9/7fbb34e59d9b70eb137aaf741a59231b4510ee2e3d1044014cd584291bdc/watcher_interpreter-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1db6cc3b00dd7ada49542112ffe3969d1fce5e8e39ad4b969a22239e156135a1",
                "md5": "0a1e5650a971c903fb9768372743447a",
                "sha256": "d3c928cf76eff55340875af7b9f3358ce9800cd638e50e3557b394876bf50c83"
            },
            "downloads": -1,
            "filename": "watcher_interpreter-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0a1e5650a971c903fb9768372743447a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5755,
            "upload_time": "2024-09-20T09:00:02",
            "upload_time_iso_8601": "2024-09-20T09:00:02.247984Z",
            "url": "https://files.pythonhosted.org/packages/1d/b6/cc3b00dd7ada49542112ffe3969d1fce5e8e39ad4b969a22239e156135a1/watcher_interpreter-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-20 09:00:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Seeed-Projects",
    "github_project": "watcher-interpreter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "watcher-interpreter"
}
        
Elapsed time: 3.86780s