From f94935c1ecaedf81b80bcd3446ae30fe86bb8075 Mon Sep 17 00:00:00 2001 From: Nicola Date: Sun, 27 Aug 2023 18:07:20 +0200 Subject: [PATCH] Bump version to 1.0.2 for release --- cheshire_cat_api/__init__.py | 2 +- cheshire_cat_api/cat_client.py | 8 ++++++-- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cheshire_cat_api/__init__.py b/cheshire_cat_api/__init__.py index 55b89d2..bcdb7b3 100644 --- a/cheshire_cat_api/__init__.py +++ b/cheshire_cat_api/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.0.1" +__version__ = "1.0.2" from cheshire_cat_api.cat_client import CatClient from cheshire_cat_api.utils import Settings, WebSocketSettings diff --git a/cheshire_cat_api/cat_client.py b/cheshire_cat_api/cat_client.py index 9aac3d0..64cbb95 100644 --- a/cheshire_cat_api/cat_client.py +++ b/cheshire_cat_api/cat_client.py @@ -124,12 +124,16 @@ def on_ws_close(self, ws, close_status_code: int, msg: str): print(f"Connection closed: {msg}") - def send(self, message: str, prompt_settings: Dict = {}): + def send(self, message: str, prompt_settings=None, user_id="user", **kwargs): """Send a message to WebSocket server using a separate thread""" + if prompt_settings is None: + prompt_settings = {} if not self.is_closed: self._ws.send(json.dumps({ "text": message, - "prompt_settings": prompt_settings + "prompt_settings": prompt_settings, + "user_id": user_id, + **kwargs })) def close(self): diff --git a/pyproject.toml b/pyproject.toml index e662e41..549e2cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cheshire_cat_api" -version = "1.0.1" +version = "1.0.2" description = "😸 Cheshire-Cat API Client" authors = ["Chesire Cat AI"] maintainers = [