cheshirecat-python-sdk 1.7.1__tar.gz → 1.7.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/PKG-INFO +1 -1
  2. cheshirecat_python_sdk-1.7.3/cheshirecat_python_sdk/endpoints/health_check.py +22 -0
  3. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/message.py +7 -7
  4. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/messages.py +8 -1
  5. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/pyproject.toml +1 -1
  6. cheshirecat_python_sdk-1.7.1/cheshirecat_python_sdk/endpoints/health_check.py +0 -12
  7. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/.gitignore +0 -0
  8. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/LICENSE +0 -0
  9. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/Makefile +0 -0
  10. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/README.md +0 -0
  11. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/__init__.py +0 -0
  12. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/builders/__init__.py +0 -0
  13. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/builders/base.py +0 -0
  14. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/builders/memory.py +0 -0
  15. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/builders/settings_input.py +0 -0
  16. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/builders/why.py +0 -0
  17. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/client.py +0 -0
  18. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/clients/__init__.py +0 -0
  19. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/clients/http_client.py +0 -0
  20. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/clients/websocket_client.py +0 -0
  21. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/configuration.py +0 -0
  22. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/__init__.py +0 -0
  23. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/admins.py +0 -0
  24. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/auth_handler.py +0 -0
  25. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/base.py +0 -0
  26. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/chunker.py +0 -0
  27. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/conversation.py +0 -0
  28. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/custom_endpoint.py +0 -0
  29. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/embedder.py +0 -0
  30. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/file_manager.py +0 -0
  31. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/large_language_model.py +0 -0
  32. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/memory.py +0 -0
  33. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/plugins.py +0 -0
  34. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/rabbit_hole.py +0 -0
  35. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/users.py +0 -0
  36. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/utils.py +0 -0
  37. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/endpoints/vector_database.py +0 -0
  38. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/enums.py +0 -0
  39. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/admins.py +0 -0
  40. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/conversations.py +0 -0
  41. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/factories.py +0 -0
  42. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/file_managers.py +0 -0
  43. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/memories.py +0 -0
  44. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/nested/memories.py +0 -0
  45. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/nested/plugins.py +0 -0
  46. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/plugins.py +0 -0
  47. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/rabbit_holes.py +0 -0
  48. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/tokens.py +0 -0
  49. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/api/users.py +0 -0
  50. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/models/dtos.py +0 -0
  51. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/cheshirecat_python_sdk/utils.py +0 -0
  52. {cheshirecat_python_sdk-1.7.1 → cheshirecat_python_sdk-1.7.3}/requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cheshirecat-python-sdk
3
- Version: 1.7.1
3
+ Version: 1.7.3
4
4
  Summary: Python SDK for the Cloud-ready fork of the Cheshire Cat
5
5
  Project-URL: Repository, https://github.com/matteocacciola/cheshirecat-python-sdk
6
6
  Project-URL: Documentation, https://github.com/matteocacciola/cheshirecat-python-sdk#README
@@ -0,0 +1,22 @@
1
+ from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
2
+
3
+ class HealthCheckEndpoint(AbstractEndpoint):
4
+ def liveness(self):
5
+ """
6
+ This endpoint is used to check if the server is running.
7
+ :return: dict, the status of the server.
8
+ """
9
+ response = self.get_http_session().get("/health/liveness")
10
+ response.raise_for_status()
11
+
12
+ return response.json()
13
+
14
+ def readiness(self):
15
+ """
16
+ This endpoint is used to check if the server is running.
17
+ :return: dict, the status of the server.
18
+ """
19
+ response = self.get_http_session().get("/health/readiness")
20
+ response.raise_for_status()
21
+
22
+ return response.json()
@@ -2,7 +2,7 @@ from typing import Callable
2
2
  import json
3
3
 
4
4
  from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
5
- from cheshirecat_python_sdk.models.api.messages import MessageOutput
5
+ from cheshirecat_python_sdk.models.api.messages import ChatOutput
6
6
  from cheshirecat_python_sdk.models.dtos import Message
7
7
  from cheshirecat_python_sdk.utils import deserialize
8
8
 
@@ -14,19 +14,19 @@ class MessageEndpoint(AbstractEndpoint):
14
14
  agent_id: str,
15
15
  user_id: str,
16
16
  chat_id: str | None = None,
17
- ) -> MessageOutput:
17
+ ) -> ChatOutput:
18
18
  """
19
19
  This endpoint sends a message to the agent identified by the agentId parameter. The message is sent via HTTP.
20
20
  :param message: Message object, the message to send
21
21
  :param agent_id: the agent id
22
22
  :param user_id: the user id
23
23
  :param chat_id: the chat id (optional)
24
- :return: MessageOutput object
24
+ :return: ChatOutput object
25
25
  """
26
26
  return self.post_json(
27
27
  '/message',
28
28
  agent_id,
29
- output_class=MessageOutput,
29
+ output_class=ChatOutput,
30
30
  payload=message.model_dump(),
31
31
  user_id=user_id,
32
32
  chat_id=chat_id,
@@ -39,7 +39,7 @@ class MessageEndpoint(AbstractEndpoint):
39
39
  user_id: str,
40
40
  chat_id: str | None = None,
41
41
  callback: Callable[[str], None] | None = None
42
- ) -> MessageOutput:
42
+ ) -> ChatOutput:
43
43
  """
44
44
  This endpoint sends a message to the agent identified by the agentId parameter. The message is sent via WebSocket.
45
45
  :param message: Message object, the message to send
@@ -47,7 +47,7 @@ class MessageEndpoint(AbstractEndpoint):
47
47
  :param user_id: the user id
48
48
  :param chat_id: the chat id
49
49
  :param callback: callable, a callback function that will be called for each message received
50
- :return: MessageOutput object
50
+ :return: ChatOutput object
51
51
  """
52
52
  try:
53
53
  json_data = json.dumps(message.model_dump())
@@ -74,4 +74,4 @@ class MessageEndpoint(AbstractEndpoint):
74
74
  raise Exception(f"WebSocket error: {str(e)}")
75
75
 
76
76
  await client.close()
77
- return deserialize(json.loads(response), MessageOutput)
77
+ return deserialize(json.loads(response), ChatOutput)
@@ -1,4 +1,4 @@
1
- from pydantic import Field
1
+ from pydantic import Field, BaseModel
2
2
 
3
3
  from cheshirecat_python_sdk.models.dtos import MessageBase, Why
4
4
 
@@ -12,3 +12,10 @@ class MessageOutput(MessageBase):
12
12
  def __init__(self, **data):
13
13
  super().__init__(**data)
14
14
  self.content = self.text
15
+
16
+
17
+ class ChatOutput(BaseModel):
18
+ agent_id: str
19
+ user_id: str
20
+ chat_id: str
21
+ message: MessageOutput
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "cheshirecat-python-sdk"
3
3
  description = "Python SDK for the Cloud-ready fork of the Cheshire Cat"
4
- version = "1.7.1"
4
+ version = "1.7.3"
5
5
  requires-python = ">=3.10"
6
6
  license = { file = "LICENSE" }
7
7
  authors = [
@@ -1,12 +0,0 @@
1
- from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
2
-
3
- class HealthCheckEndpoint(AbstractEndpoint):
4
- def home(self):
5
- """
6
- This endpoint is used to check if the server is running.
7
- :return: dict, the status of the server.
8
- """
9
- response = self.get_http_session().get("/")
10
- response.raise_for_status()
11
-
12
- return response.json()