cheshirecat-python-sdk 1.7.5__tar.gz → 1.7.6__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 (53) hide show
  1. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/PKG-INFO +1 -1
  2. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/auth.py +15 -3
  3. cheshirecat_python_sdk-1.7.6/cheshirecat_python_sdk/models/api/tokens.py +25 -0
  4. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/pyproject.toml +1 -1
  5. cheshirecat_python_sdk-1.7.5/cheshirecat_python_sdk/models/api/tokens.py +0 -6
  6. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/.gitignore +0 -0
  7. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/LICENSE +0 -0
  8. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/Makefile +0 -0
  9. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/README.md +0 -0
  10. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/__init__.py +0 -0
  11. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/builders/__init__.py +0 -0
  12. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/builders/base.py +0 -0
  13. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/builders/memory.py +0 -0
  14. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/builders/settings_input.py +0 -0
  15. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/builders/why.py +0 -0
  16. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/client.py +0 -0
  17. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/clients/__init__.py +0 -0
  18. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/clients/http_client.py +0 -0
  19. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/clients/websocket_client.py +0 -0
  20. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/configuration.py +0 -0
  21. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/__init__.py +0 -0
  22. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/admins.py +0 -0
  23. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/auth_handler.py +0 -0
  24. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/base.py +0 -0
  25. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/chunker.py +0 -0
  26. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/conversation.py +0 -0
  27. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/custom_endpoint.py +0 -0
  28. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/embedder.py +0 -0
  29. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/file_manager.py +0 -0
  30. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/health_check.py +0 -0
  31. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/large_language_model.py +0 -0
  32. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/memory.py +0 -0
  33. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/message.py +0 -0
  34. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/plugins.py +0 -0
  35. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/rabbit_hole.py +0 -0
  36. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/users.py +0 -0
  37. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/utils.py +0 -0
  38. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/endpoints/vector_database.py +0 -0
  39. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/enums.py +0 -0
  40. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/admins.py +0 -0
  41. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/conversations.py +0 -0
  42. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/factories.py +0 -0
  43. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/file_managers.py +0 -0
  44. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/memories.py +0 -0
  45. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/messages.py +0 -0
  46. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/nested/memories.py +0 -0
  47. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/nested/plugins.py +0 -0
  48. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/plugins.py +0 -0
  49. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/rabbit_holes.py +0 -0
  50. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/api/users.py +0 -0
  51. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/models/dtos.py +0 -0
  52. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/cheshirecat_python_sdk/utils.py +0 -0
  53. {cheshirecat_python_sdk-1.7.5 → cheshirecat_python_sdk-1.7.6}/requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cheshirecat-python-sdk
3
- Version: 1.7.5
3
+ Version: 1.7.6
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
@@ -1,7 +1,7 @@
1
1
  from typing import Any
2
2
 
3
3
  from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
4
- from cheshirecat_python_sdk.models.api.tokens import TokenOutput
4
+ from cheshirecat_python_sdk.models.api.tokens import TokenOutput, MeOutput
5
5
  from cheshirecat_python_sdk.utils import deserialize
6
6
 
7
7
 
@@ -10,7 +10,7 @@ class AuthEndpoint(AbstractEndpoint):
10
10
  super().__init__(client)
11
11
  self.prefix = "/auth"
12
12
 
13
- def token(self, username: str, password: str, agent_id: str | None = None) -> TokenOutput:
13
+ def token(self, username: str, password: str) -> TokenOutput:
14
14
  """
15
15
  This endpoint is used to get a token for the user. The token is used to authenticate the user in the system. When
16
16
  the token expires, the user must request a new token.
@@ -21,7 +21,6 @@ class AuthEndpoint(AbstractEndpoint):
21
21
  "username": username,
22
22
  "password": password,
23
23
  },
24
- headers={"X-Agent-ID": agent_id} if agent_id else None,
25
24
  )
26
25
  response.raise_for_status()
27
26
 
@@ -40,3 +39,16 @@ class AuthEndpoint(AbstractEndpoint):
40
39
  response.raise_for_status()
41
40
 
42
41
  return response.json()
42
+
43
+ def me(self, token: str) -> MeOutput:
44
+ """
45
+ This endpoint is used to get the current user information. The user information includes the list of agents
46
+ the user has access to. This endpoint requires authentication.
47
+ """
48
+ self.client.add_token(token)
49
+
50
+ response = self.get_http_client().get("/me")
51
+ response.raise_for_status()
52
+
53
+ result = deserialize(response.json(), MeOutput)
54
+ return result
@@ -0,0 +1,25 @@
1
+ from pydantic import BaseModel
2
+
3
+
4
+ class TokenOutput(BaseModel):
5
+ access_token: str
6
+ token_type: str | None = "bearer"
7
+
8
+
9
+ class User(BaseModel):
10
+ id: str
11
+ username: str
12
+ permissions: dict[str, list[str]]
13
+
14
+
15
+ class AgentMatch(BaseModel):
16
+ agent_id: str
17
+ agent_name: str
18
+ agent_description: str | None = None
19
+ user: User
20
+
21
+
22
+ class MeOutput(BaseModel):
23
+ success : bool
24
+ agents: list[AgentMatch]
25
+ auto_selected: bool
@@ -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.5"
4
+ version = "1.7.6"
5
5
  requires-python = ">=3.10"
6
6
  license = { file = "LICENSE" }
7
7
  authors = [
@@ -1,6 +0,0 @@
1
- from pydantic import BaseModel
2
-
3
-
4
- class TokenOutput(BaseModel):
5
- access_token: str
6
- token_type: str | None = "bearer"