Skip to content

Commit

Permalink
Bump version to 1.0.2 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-corbellini committed Aug 27, 2023
1 parent ef7a367 commit f94935c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cheshire_cat_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions cheshire_cat_api/cat_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down

0 comments on commit f94935c

Please sign in to comment.