cheshirecat-python-sdk 1.2.1__py3-none-any.whl → 1.8.4__py3-none-any.whl

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 (49) hide show
  1. cheshirecat_python_sdk/__init__.py +0 -1
  2. cheshirecat_python_sdk/builders/__init__.py +1 -1
  3. cheshirecat_python_sdk/builders/memory.py +1 -32
  4. cheshirecat_python_sdk/builders/why.py +8 -14
  5. cheshirecat_python_sdk/client.py +35 -5
  6. cheshirecat_python_sdk/clients/http_client.py +21 -7
  7. cheshirecat_python_sdk/clients/websocket_client.py +21 -15
  8. cheshirecat_python_sdk/configuration.py +1 -1
  9. cheshirecat_python_sdk/endpoints/__init__.py +7 -1
  10. cheshirecat_python_sdk/endpoints/admins.py +33 -145
  11. cheshirecat_python_sdk/endpoints/agentic_workflow.py +52 -0
  12. cheshirecat_python_sdk/endpoints/auth.py +54 -0
  13. cheshirecat_python_sdk/endpoints/auth_handler.py +8 -8
  14. cheshirecat_python_sdk/endpoints/base.py +53 -19
  15. cheshirecat_python_sdk/endpoints/chunker.py +8 -8
  16. cheshirecat_python_sdk/endpoints/conversation.py +83 -0
  17. cheshirecat_python_sdk/endpoints/custom_endpoint.py +57 -0
  18. cheshirecat_python_sdk/endpoints/embedder.py +4 -4
  19. cheshirecat_python_sdk/endpoints/file_manager.py +65 -8
  20. cheshirecat_python_sdk/endpoints/health_check.py +22 -0
  21. cheshirecat_python_sdk/endpoints/large_language_model.py +8 -8
  22. cheshirecat_python_sdk/endpoints/memory.py +101 -146
  23. cheshirecat_python_sdk/endpoints/message.py +29 -13
  24. cheshirecat_python_sdk/endpoints/plugins.py +31 -26
  25. cheshirecat_python_sdk/endpoints/rabbit_hole.py +53 -23
  26. cheshirecat_python_sdk/endpoints/users.py +35 -56
  27. cheshirecat_python_sdk/endpoints/utils.py +71 -0
  28. cheshirecat_python_sdk/endpoints/vector_database.py +52 -0
  29. cheshirecat_python_sdk/enums.py +0 -11
  30. cheshirecat_python_sdk/models/api/admins.py +5 -7
  31. cheshirecat_python_sdk/models/api/conversations.py +24 -0
  32. cheshirecat_python_sdk/models/api/factories.py +6 -0
  33. cheshirecat_python_sdk/models/api/file_managers.py +18 -0
  34. cheshirecat_python_sdk/models/api/memories.py +2 -10
  35. cheshirecat_python_sdk/models/api/messages.py +8 -6
  36. cheshirecat_python_sdk/models/api/nested/memories.py +5 -5
  37. cheshirecat_python_sdk/models/api/nested/plugins.py +8 -2
  38. cheshirecat_python_sdk/models/api/plugins.py +30 -22
  39. cheshirecat_python_sdk/models/api/tokens.py +19 -0
  40. cheshirecat_python_sdk/models/api/users.py +4 -1
  41. cheshirecat_python_sdk/models/dtos.py +14 -18
  42. cheshirecat_python_sdk/utils.py +2 -1
  43. {cheshirecat_python_sdk-1.2.1.dist-info → cheshirecat_python_sdk-1.8.4.dist-info}/METADATA +12 -10
  44. cheshirecat_python_sdk-1.8.4.dist-info/RECORD +50 -0
  45. {cheshirecat_python_sdk-1.2.1.dist-info → cheshirecat_python_sdk-1.8.4.dist-info}/WHEEL +1 -1
  46. cheshirecat_python_sdk/endpoints/settings.py +0 -63
  47. cheshirecat_python_sdk/models/api/settings.py +0 -22
  48. cheshirecat_python_sdk-1.2.1.dist-info/RECORD +0 -43
  49. {cheshirecat_python_sdk-1.2.1.dist-info → cheshirecat_python_sdk-1.8.4.dist-info}/licenses/LICENSE +0 -0
@@ -4,8 +4,8 @@ from pydantic import BaseModel
4
4
 
5
5
  class PropertySettingsOutput(BaseModel):
6
6
  default: Any
7
- title: str
8
- type: str
7
+ title: str | None = None
8
+ type: str | None = None
9
9
  extra: Dict[str, Any] | None = None
10
10
 
11
11
 
@@ -19,3 +19,9 @@ class PluginSettingsOutput(BaseModel):
19
19
  name: str
20
20
  value: Dict[str, Any]
21
21
  scheme: PluginSchemaSettings | None = None
22
+
23
+ def __init__(self, /, **data: Any) -> None:
24
+ # if tags is a list, convert it to a comma-separated string
25
+ if "scheme" in data and isinstance(data["scheme"], Dict) and not data["scheme"]:
26
+ data["scheme"] = None
27
+ super().__init__(**data)
@@ -1,4 +1,4 @@
1
- from typing import List
1
+ from typing import List, Any, Dict
2
2
  from pydantic import BaseModel, Field
3
3
 
4
4
  from cheshirecat_python_sdk.models.api.nested.plugins import PluginSettingsOutput
@@ -31,18 +31,20 @@ class EndpointOutput(BaseModel):
31
31
  class PluginItemOutput(BaseModel):
32
32
  id: str
33
33
  name: str
34
- description: str
35
- author_name: str
36
- author_url: str
37
- plugin_url: str
38
- tags: str
39
- thumb: str
40
- version: str
41
- active: bool
42
- hooks: List[HookOutput]
43
- tools: List[ToolOutput]
44
- forms: List[FormOutput]
45
- endpoints: List[EndpointOutput]
34
+ description: str | None = None
35
+ author_name: str | None = None
36
+ author_url: str | None = None
37
+ plugin_url: str | None = None
38
+ tags: str | None = None
39
+ thumb: str | None = None
40
+ version: str | None = None
41
+ local_info: Dict = Field(default_factory=dict)
42
+
43
+ def __init__(self, /, **data: Any) -> None:
44
+ # if tags is a list, convert it to a comma-separated string
45
+ if "tags" in data and isinstance(data["tags"], list):
46
+ data["tags"] = ", ".join(data["tags"])
47
+ super().__init__(**data)
46
48
 
47
49
 
48
50
  class PluginCollectionOutput(BaseModel):
@@ -52,16 +54,22 @@ class PluginCollectionOutput(BaseModel):
52
54
 
53
55
 
54
56
  class PluginItemRegistryOutput(BaseModel):
55
- id: str
57
+ id: str | None = None
56
58
  name: str
57
- description: str
58
- author_name: str
59
- author_url: str
60
- plugin_url: str
61
- tags: str
62
- thumb: str
63
- version: str
64
- url: str
59
+ description: str | None = None
60
+ author_name: str | None = None
61
+ author_url: str | None = None
62
+ plugin_url: str | None = None
63
+ tags: str | None = None
64
+ thumb: str | None = None
65
+ version: str | None = None
66
+ url: str | None = None
67
+
68
+ def __init__(self, /, **data: Any) -> None:
69
+ # if tags is a list, convert it to a comma-separated string
70
+ if "tags" in data and isinstance(data["tags"], list):
71
+ data["tags"] = ", ".join(data["tags"])
72
+ super().__init__(**data)
65
73
 
66
74
 
67
75
  class PluginsSettingsOutput(BaseModel):
@@ -4,3 +4,22 @@ from pydantic import BaseModel
4
4
  class TokenOutput(BaseModel):
5
5
  access_token: str
6
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
+ created_at: float | None = None
14
+ updated_at: float | None = None
15
+
16
+
17
+ class AgentMatch(BaseModel):
18
+ agent_name: str
19
+ user: User
20
+
21
+
22
+ class MeOutput(BaseModel):
23
+ success : bool
24
+ agents: list[AgentMatch]
25
+ auto_selected: bool
@@ -1,8 +1,11 @@
1
- from typing import Dict, List
1
+ from typing import Dict, List, Any
2
2
  from pydantic import BaseModel
3
3
 
4
4
 
5
5
  class UserOutput(BaseModel):
6
6
  username: str
7
7
  permissions: Dict[str, List[str]]
8
+ metadata: Dict[str, Any] | None = None
8
9
  id: str
10
+ created_at: float | None = None
11
+ updated_at: float | None = None
@@ -1,18 +1,5 @@
1
1
  from typing import Dict, List, Any
2
- from pydantic import BaseModel, Field
3
-
4
-
5
- class AgentOutput(BaseModel):
6
- output: str | None = None
7
- intermediate_steps: List[Dict[str, Any]] | None = Field(default_factory=list)
8
- return_direct: bool = False
9
- with_llm_error: bool = False
10
-
11
-
12
- class Memory(BaseModel):
13
- episodic: Dict[str, Any] | None = Field(default_factory=dict)
14
- declarative: Dict[str, Any] | None = Field(default_factory=dict)
15
- procedural: Dict[str, Any] | None = Field(default_factory=dict)
2
+ from pydantic import BaseModel, Field, model_validator
16
3
 
17
4
 
18
5
  class MemoryPoint(BaseModel):
@@ -26,7 +13,7 @@ class MessageBase(BaseModel):
26
13
 
27
14
 
28
15
  class Message(MessageBase):
29
- additional_fields: Dict[str, Any] | None = None
16
+ metadata: Dict[str, Any] | None = None
30
17
 
31
18
 
32
19
  class SettingInput(BaseModel):
@@ -37,6 +24,15 @@ class SettingInput(BaseModel):
37
24
 
38
25
  class Why(BaseModel):
39
26
  input: str | None = None
40
- intermediate_steps: Dict[str, Any] | None = Field(default_factory=dict)
41
- memory: Memory = Field(default_factory=Memory)
42
- model_interactions: Dict[str, Any] | None = Field(default_factory=dict)
27
+ intermediate_steps: List | None = Field(default_factory=list)
28
+ memory: List | None = Field(default_factory=list)
29
+
30
+
31
+ class FilterSource(BaseModel):
32
+ source: str | None = None
33
+ hash: str | None = None
34
+
35
+ @model_validator(mode="after")
36
+ def validate_source_or_hash(self):
37
+ assert self.source or self.hash, "Either source or hash must be provided"
38
+ return self
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from typing import Dict, Type, TypeVar, BinaryIO, Tuple
2
3
  import magic
3
4
 
@@ -16,4 +17,4 @@ def file_attributes(filename: str, file: BinaryIO) -> Tuple[str, BinaryIO, str]:
16
17
 
17
18
  file.seek(current_pos)
18
19
 
19
- return filename, file, content_type
20
+ return os.path.basename(filename), file, content_type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cheshirecat-python-sdk
3
- Version: 1.2.1
3
+ Version: 1.8.4
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
@@ -683,7 +683,7 @@ License: GNU GENERAL PUBLIC LICENSE
683
683
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
684
684
  License-File: LICENSE
685
685
  Keywords: Cheshire-Cat,LLM,OpenAPI,OpenSource,RAG
686
- Classifier: Development Status :: 3 - Alpha
686
+ Classifier: Development Status :: 5 - Production/Stable
687
687
  Classifier: Framework :: FastAPI
688
688
  Classifier: Programming Language :: Python :: 3
689
689
  Classifier: Programming Language :: Python :: 3.10
@@ -739,8 +739,10 @@ notification_closure = lambda message: None # handle websocket notification, lik
739
739
 
740
740
  # result is the result of the message
741
741
  result = cheshire_cat_client.message.send_websocket_message(
742
- Message("Hello world!", 'user', []), # message body
743
- notification_closure # websocket notification closure handle
742
+ Message(text="Hello world!"), # message body
743
+ "agent", # agent ID
744
+ "user", # user ID
745
+ callback=notification_closure # websocket notification closure handle
744
746
  )
745
747
  ```
746
748
 
@@ -755,26 +757,26 @@ cheshire_cat_client = CheshireCatClient(configuration)
755
757
 
756
758
  # file
757
759
  file = "path/to/file"
758
- result = asyncio.run(cheshire_cat_client.rabbit_hole.post_file(file))
760
+ result = asyncio.run(cheshire_cat_client.rabbit_hole.post_file(file, "agent"))
759
761
 
760
762
  # url
761
763
  url = "https://www.google.com"
762
- result = asyncio.run(cheshire_cat_client.rabbit_hole.post_web(url))
764
+ result = asyncio.run(cheshire_cat_client.rabbit_hole.post_web(url, "agent"))
763
765
  ```
764
766
 
765
767
  Memory management utilities:
766
768
 
767
769
  ```python
768
- from cheshirecat_python_sdk import Collection, CheshireCatClient, Configuration, Message
770
+ from cheshirecat_python_sdk import CheshireCatClient, Configuration, Message
769
771
 
770
772
  configuration = Configuration(host="localhost", port=1865, auth_key="test", secure_connection=False)
771
773
  cheshire_cat_client = CheshireCatClient(configuration)
772
774
 
773
- cheshire_cat_client.memory.get_memory_collections() # get number of vectors in the working memory
774
- cheshire_cat_client.memory.get_memory_recall("HELLO") # recall memories by text
775
+ cheshire_cat_client.memory.get_memory_collections("agent") # get number of vectors in the working memory
776
+ cheshire_cat_client.memory.get_memory_recall("HELLO", "agent", "user") # recall memories by text
775
777
 
776
778
  url = "https://www.google.com"
777
779
 
778
780
  # delete memory points by metadata, like this example delete by source
779
- cheshire_cat_client.memory.delete_memory_points_by_metadata(Collection.DECLARATIVE, {"source": url})
781
+ cheshire_cat_client.memory.delete_memory_points_by_metadata("declarative", "agent", {"source": url})
780
782
  ```
@@ -0,0 +1,50 @@
1
+ cheshirecat_python_sdk/__init__.py,sha256=59esRUsh_6xPlfoCz-gQYQdDgp2xbaINYWyDcTJlvys,284
2
+ cheshirecat_python_sdk/client.py,sha256=J9sX8FxtE6bkwshDq5AHycG1bqHEOeqZlfr9g1mb13I,2960
3
+ cheshirecat_python_sdk/configuration.py,sha256=7uXebZGzCuJdpgOeN5l1YXkWVIrTk4apxvjPKZFcJTE,283
4
+ cheshirecat_python_sdk/enums.py,sha256=qJyhl5D_oDMHqNcIivr9pTxNrZY6XkX7lGgGydk22TY,665
5
+ cheshirecat_python_sdk/utils.py,sha256=2pcSCREOuIAUi5El5ou2rCm-VtmzyGVd3YHcKrFHgBM,458
6
+ cheshirecat_python_sdk/builders/__init__.py,sha256=MEgXtw52hpQSTZ_EGOuS6WbbuXpIJGKmnYYImyoIM-s,208
7
+ cheshirecat_python_sdk/builders/base.py,sha256=YyE0pLp2iYyIFQVD1hLDeR8Wg578ebzoEEEtX9G8KZw,216
8
+ cheshirecat_python_sdk/builders/memory.py,sha256=UqznTdPcrcmWO1WqHcpQ0AoMe-ucWrViUjR6lsvzKEM,640
9
+ cheshirecat_python_sdk/builders/settings_input.py,sha256=EvaCDmmYOtHWUwCgG-nWonkY6UF6g1blytBwAmH477I,762
10
+ cheshirecat_python_sdk/builders/why.py,sha256=mz58CpjCm5nf7hDXhLqi9o5uRAaGbSHyM5v2pNTX2HU,993
11
+ cheshirecat_python_sdk/clients/__init__.py,sha256=i4Hqux9vihFRbXVK48yJ1k9gm4JeCHnfPgosizQZv-g,135
12
+ cheshirecat_python_sdk/clients/http_client.py,sha256=LnP0kr-kHRCwC-BZiysj1Zg-T3b3yuLd81wOctfcBTg,2319
13
+ cheshirecat_python_sdk/clients/websocket_client.py,sha256=xNjkLSEZhpHzRqIZL21V0oG3srAGFaqYveMqlma2gvI,1932
14
+ cheshirecat_python_sdk/endpoints/__init__.py,sha256=N8_vA7D304QCcaP-nhz039xkykRsBc-79COL_Ge19AY,1333
15
+ cheshirecat_python_sdk/endpoints/admins.py,sha256=b4YpHO-Xqkd-PQxvQcXYAUmQkrTLTvEjf5R9pals-50,4116
16
+ cheshirecat_python_sdk/endpoints/agentic_workflow.py,sha256=u0D9t7nGWcSPXUOeTmu1-madnWLlB7dlLP8hlP9yTJ4,2197
17
+ cheshirecat_python_sdk/endpoints/auth.py,sha256=_22fLGznoxo2pybcQGgcsHCpLoq76P6RplmSMMgajEQ,2031
18
+ cheshirecat_python_sdk/endpoints/auth_handler.py,sha256=Jfi7E7L3SIzJyECbJnUenIyl6xxkJlyC31AHpAlmqSs,2117
19
+ cheshirecat_python_sdk/endpoints/base.py,sha256=0X2EQxRGqR6VG5gXE5XKcscmQ7rNM9de61GBrQlKD90,4210
20
+ cheshirecat_python_sdk/endpoints/chunker.py,sha256=bgp-2gQpKt7W_B46eEb-KFRkd4eZJH0euwsf3N0jfC8,1979
21
+ cheshirecat_python_sdk/endpoints/conversation.py,sha256=jG1z7ivdD53H8JZe7WZWihoBWy2_-W951SwKXmnpmTk,3282
22
+ cheshirecat_python_sdk/endpoints/custom_endpoint.py,sha256=HVRQMqA5JfPr87gHtWpYcsXsE-TA-coXLcvsPKabqds,2791
23
+ cheshirecat_python_sdk/endpoints/embedder.py,sha256=4B2yc3KBThKGreq_KPTTCsxt2Ekktw_muZ5gBfxrrwY,1741
24
+ cheshirecat_python_sdk/endpoints/file_manager.py,sha256=U4kc2oR3UszK0EKzYnES_RkgF1zhaPINAW_3X2WgX7A,4614
25
+ cheshirecat_python_sdk/endpoints/health_check.py,sha256=qv_5imbN39PqPyuBvlNoSqXqAvTvPv7UXI4zcfH8tlg,710
26
+ cheshirecat_python_sdk/endpoints/large_language_model.py,sha256=SS787ZKMZQ7KQNvl7a7rfBCm6s1j3ifDfWQcrM4tn-k,2109
27
+ cheshirecat_python_sdk/endpoints/memory.py,sha256=dgfoyjZH0gL3kln31gFJ42JHfL-S-oZHmEUzBmab3bw,10446
28
+ cheshirecat_python_sdk/endpoints/message.py,sha256=QTUSUJcj52VhfnX9hdjsD2aLeFC43O4eU8ld5lRvITU,2607
29
+ cheshirecat_python_sdk/endpoints/plugins.py,sha256=FasjwNY2UVv7zfg9lvXEj2ATefPDOPQpJXzQ2BbQIYI,3474
30
+ cheshirecat_python_sdk/endpoints/rabbit_hole.py,sha256=KjF5IRG6ghGEji-Js5try-9FhmWsuiM5v04jA68VoVY,7316
31
+ cheshirecat_python_sdk/endpoints/users.py,sha256=ySpFi9ILyoT44fnAz8p4LSGTaEAMWv3RBWq72Hv73mI,5803
32
+ cheshirecat_python_sdk/endpoints/utils.py,sha256=yKGrFRpu6ItLnBEuc98093LbXqGYaGdgCLiWuLQJVno,2551
33
+ cheshirecat_python_sdk/endpoints/vector_database.py,sha256=Xu6zcopjZgcFVVmyN547piiqFcaTUtF35X0QxQHycXQ,2149
34
+ cheshirecat_python_sdk/models/dtos.py,sha256=0N6Auv43Gifo0ptdZxMZXAB6QGk8NNbcf8vQGm8HClo,869
35
+ cheshirecat_python_sdk/models/api/admins.py,sha256=sIX4NdEntjORgVACsqkBkzte4zwD6w35BdPRRG0D7uo,661
36
+ cheshirecat_python_sdk/models/api/conversations.py,sha256=Ej8677MLBqZEME1lZFd4UhHokdja762zYNjV9ZaEg-I,505
37
+ cheshirecat_python_sdk/models/api/factories.py,sha256=_NWz0nKhaVYEbaphxe2YZGznDIUiMKb-xqA1xymME5A,594
38
+ cheshirecat_python_sdk/models/api/file_managers.py,sha256=V0ZBjQWmYM1t0Qpfp3W2NDI_tScOtORB0i5YMEpTiRU,301
39
+ cheshirecat_python_sdk/models/api/memories.py,sha256=4rqFuFNzNbmwIG1KGiSyfnv40nds5g7fSkov3drj0cc,948
40
+ cheshirecat_python_sdk/models/api/messages.py,sha256=PDojYuXUDXSek8nkg8QKoVdAJ2NMmhV4iWvbhOrekEE,441
41
+ cheshirecat_python_sdk/models/api/plugins.py,sha256=uX8SYbcTxQSxv1IaVChEBd3rr6kc83rwq3IILnmq5EE,1996
42
+ cheshirecat_python_sdk/models/api/rabbit_holes.py,sha256=01FcPSIG6nq9WJhL_rQopLMSD81CU9lfP-t0xtf35Gw,285
43
+ cheshirecat_python_sdk/models/api/tokens.py,sha256=GavSaCq0-SRWjvLtDgrYBOdUELd7VoVXlykmIBT23ds,455
44
+ cheshirecat_python_sdk/models/api/users.py,sha256=_T3-8hfmlZK9cZcqBTbNMYS74yEnDrRACRQn9PNCEiQ,280
45
+ cheshirecat_python_sdk/models/api/nested/memories.py,sha256=ddGDsmZa2refElM0sGz9QfKHGk50wsTpkwN5qDC5bF4,946
46
+ cheshirecat_python_sdk/models/api/nested/plugins.py,sha256=7vrwgXh0csaUn11YKY_OWnGEnD8Fu_ewKxt024VOBEs,738
47
+ cheshirecat_python_sdk-1.8.4.dist-info/METADATA,sha256=f5sjZkDGm4AXlxsMLbEjOEEgD2Pyke2NMqM7zi0Ag_4,44136
48
+ cheshirecat_python_sdk-1.8.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
49
+ cheshirecat_python_sdk-1.8.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
+ cheshirecat_python_sdk-1.8.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,63 +0,0 @@
1
- from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
2
- from cheshirecat_python_sdk.models.api.settings import SettingsOutputCollection, SettingOutputItem
3
-
4
-
5
- class SettingsEndpoint(AbstractEndpoint):
6
- def __init__(self, client: "CheshireCatClient"):
7
- super().__init__(client)
8
- self.prefix = "/settings"
9
-
10
- def get_settings(self, agent_id: str | None = None) -> SettingsOutputCollection:
11
- """
12
- This endpoint returns the settings of the agent identified by the agent_id parameter (multi-agent installations)
13
- You can omit the agent_id parameter in a single-agent installation. In this case, the settings of the default
14
- agent are returned.
15
- :param agent_id: The id of the agent to get settings for (optional)
16
- :return: SettingsOutputCollection, the settings of the agent
17
- """
18
- return self.get(self.prefix, SettingsOutputCollection, agent_id)
19
-
20
- def post_setting(self, values: dict, agent_id: str | None = None) -> SettingOutputItem:
21
- """
22
- This method creates a new setting for the agent identified by the agent_id parameter (multi-agent installations).
23
- You can omit the agent_id parameter in a single-agent installation. In this case, the setting is created for the
24
- default agent.
25
- :param values: The values of the setting to create
26
- :param agent_id: The id of the agent to create the setting for (optional)
27
- :return: SettingOutputItem, the created setting
28
- """
29
- return self.post_json(self.prefix, SettingOutputItem, values, agent_id)
30
-
31
- def get_setting(self, setting_id: str, agent_id: str | None = None) -> SettingOutputItem:
32
- """
33
- This endpoint returns the setting identified by the setting_id parameter. The setting must belong to the agent
34
- identified by the agent_id parameter (multi-agent installations). You can omit the agent_id parameter in a
35
- single-agent installation. In this case, the setting is looked up in the default agent.
36
- :param setting_id: The id of the setting to get
37
- :param agent_id: The id of the agent to get the setting for (optional)
38
- :return: SettingOutputItem, the setting
39
- """
40
- return self.get(self.format_url(setting_id), SettingOutputItem, agent_id)
41
-
42
- def put_setting(self, setting_id: str, values: dict, agent_id: str | None = None) -> SettingOutputItem:
43
- """
44
- This method updates the setting identified by the setting_id parameter. The setting must belong to the agent
45
- identified by the agent_id parameter (multi-agent installations). You can omit the agent_id parameter in a
46
- single-agent installation. In this case, the setting is updated in the default agent.
47
- :param setting_id: The id of the setting to update
48
- :param values: The values to update the setting with
49
- :param agent_id: The id of the agent to update the setting for (optional)
50
- :return: SettingOutputItem, the updated setting
51
- """
52
- return self.put(self.format_url(setting_id), SettingOutputItem, values, agent_id)
53
-
54
- def delete_setting(self, setting_id: str, agent_id: str | None = None) -> SettingOutputItem:
55
- """
56
- This endpoint deletes the setting identified by the setting_id parameter. The setting must belong to the agent
57
- identified by the agent_id parameter (multi-agent installations). You can omit the agent_id parameter in a
58
- single-agent installation. In this case, the setting is deleted from the default agent.
59
- :param setting_id: The id of the setting to delete
60
- :param agent_id: The id of the agent to delete the setting for (optional)
61
- :return: SettingOutputItem, the deleted setting
62
- """
63
- return self.delete(self.format_url(setting_id), SettingOutputItem, agent_id)
@@ -1,22 +0,0 @@
1
- from typing import Dict, List, Any
2
- from pydantic import BaseModel
3
-
4
-
5
- class SettingDeleteOutput(BaseModel):
6
- deleted: bool
7
-
8
-
9
- class SettingOutput(BaseModel):
10
- name: str
11
- value: Dict[str, Any]
12
- category: str
13
- setting_id: str
14
- updated_at: int | str
15
-
16
-
17
- class SettingOutputItem(BaseModel):
18
- setting: SettingOutput
19
-
20
-
21
- class SettingsOutputCollection(BaseModel):
22
- settings: List[SettingOutput]
@@ -1,43 +0,0 @@
1
- cheshirecat_python_sdk/__init__.py,sha256=dbIrMND_Am64kqSbUyw8kCHIkOLxzOjecC4HZ2eIEJc,342
2
- cheshirecat_python_sdk/client.py,sha256=8YW6d1L60esh2KdBboHHIcM5tSnnXVJq2hBv47CX-ec,2330
3
- cheshirecat_python_sdk/configuration.py,sha256=BHbdIipAqR-NJZsBXKqjz8sSAMckM5FODjwCQHDJS8g,274
4
- cheshirecat_python_sdk/enums.py,sha256=PP05PxaF3W4vbgB_rbmmoBUYWjIgaPcne2eecC0MINo,843
5
- cheshirecat_python_sdk/utils.py,sha256=RYnKEVcvH1-jHMSiZVtY1ODue2QT3-EoACJKxa4KlXk,430
6
- cheshirecat_python_sdk/builders/__init__.py,sha256=sFzhmAPkKY2-9CGw5838S-2CMBosK4yCuTi9KmyetEo,223
7
- cheshirecat_python_sdk/builders/base.py,sha256=YyE0pLp2iYyIFQVD1hLDeR8Wg578ebzoEEEtX9G8KZw,216
8
- cheshirecat_python_sdk/builders/memory.py,sha256=WPRzkH4dRYDHM9GJGwjW87TxOZERWCsi8e6HgPZFXNw,1542
9
- cheshirecat_python_sdk/builders/settings_input.py,sha256=EvaCDmmYOtHWUwCgG-nWonkY6UF6g1blytBwAmH477I,762
10
- cheshirecat_python_sdk/builders/why.py,sha256=9B-MXc1CNcvJMzBBa5DzQmY7vUHEpJZekv6CwZ0Ec5Q,1304
11
- cheshirecat_python_sdk/clients/__init__.py,sha256=i4Hqux9vihFRbXVK48yJ1k9gm4JeCHnfPgosizQZv-g,135
12
- cheshirecat_python_sdk/clients/http_client.py,sha256=-lJeO4XfW4bjPZbN-s5n0-fCqo4Cmz7PAg8zNiustfo,1952
13
- cheshirecat_python_sdk/clients/websocket_client.py,sha256=w8wlLjoy1eEznX24uD3rS3eReuzR9WJ327faWap93Ck,1769
14
- cheshirecat_python_sdk/endpoints/__init__.py,sha256=jexTC4YZGsxOGdEMg5G4QsGPks0bSzluXgZMnC2woyk,873
15
- cheshirecat_python_sdk/endpoints/admins.py,sha256=8zBJns-cTmOr6ZvyHDn2y4XtYJXfjlF9U_jn1HVl1ns,8576
16
- cheshirecat_python_sdk/endpoints/auth_handler.py,sha256=cZGIP99XCkYog8c8pOOoHbSF49A3Vcy0GlVGJh7adqE,2112
17
- cheshirecat_python_sdk/endpoints/base.py,sha256=d2THB7kAE1DxJNNpLw6_wFCeyzI5OYNb7WVsGOztz3U,3249
18
- cheshirecat_python_sdk/endpoints/chunker.py,sha256=yBcaH-0KOkD57pUEH114R8IyON3ZHxSvARCFhXBcfzs,1974
19
- cheshirecat_python_sdk/endpoints/embedder.py,sha256=MB6NaD_P_Bb0tOOTfA9DoO6Vj2nDxcQA-loGKwLvhRI,1694
20
- cheshirecat_python_sdk/endpoints/file_manager.py,sha256=YrkVhegM8zEDOqdpNM59TtElrh3E_fJOhdpLpQRL4us,2122
21
- cheshirecat_python_sdk/endpoints/large_language_model.py,sha256=4PCkShirfSM9T9NsO_VW8JCDar-CcRsbpJQjM7Mb70Q,2104
22
- cheshirecat_python_sdk/endpoints/memory.py,sha256=a6XFtn3pW9pi3QC6I1wczmiqvjOlCpzwVscbIkFYJWM,14079
23
- cheshirecat_python_sdk/endpoints/message.py,sha256=YHyuolsaC0zmAYh9onMXuFNBv7iSgKsI7Ys8h2CloSg,2516
24
- cheshirecat_python_sdk/endpoints/plugins.py,sha256=adyntT0N7ktTqDwp91wBZmxeAOmCOd5So9eja5LaJh4,3713
25
- cheshirecat_python_sdk/endpoints/rabbit_hole.py,sha256=zalY1eQb6Wro5UNVY_sLCf5zRN1KdEAFb6Qv-XlGSM0,6474
26
- cheshirecat_python_sdk/endpoints/settings.py,sha256=4LVChK2faB4_EJx5ee3Bplf-yIJHoj2tfjAPyVVUXxw,3840
27
- cheshirecat_python_sdk/endpoints/users.py,sha256=BIbd302LEmudnjLGwMnOiOD4tsXQE2ifb1-7PPlErxA,7331
28
- cheshirecat_python_sdk/models/dtos.py,sha256=FlZah3z58lwgoy4k9xWlT_dWUWOWT4RXxYGwUYGRgSk,1116
29
- cheshirecat_python_sdk/models/api/admins.py,sha256=DMDKu2zZmx5vaXSE77Z7USCwR193UgCrD2R6jo7Yt0s,709
30
- cheshirecat_python_sdk/models/api/factories.py,sha256=Io6pxF-4RsNDdYvg0rnB0Tm3iQrUtLvUL4OvyVVte-A,321
31
- cheshirecat_python_sdk/models/api/memories.py,sha256=93tcoileuDmist3X1AgzeNNl20SCc6pWMMu3bEC3HuA,1093
32
- cheshirecat_python_sdk/models/api/messages.py,sha256=BKqNivGKYv0j2W1epmZL56Nnf04BErFAJ8F3JveDwNo,482
33
- cheshirecat_python_sdk/models/api/plugins.py,sha256=TmehBJJ2cyDqAtZtZZKdCyIAbRTRucQa27eHcy0q8v8,1321
34
- cheshirecat_python_sdk/models/api/rabbit_holes.py,sha256=01FcPSIG6nq9WJhL_rQopLMSD81CU9lfP-t0xtf35Gw,285
35
- cheshirecat_python_sdk/models/api/settings.py,sha256=whivLS3tH0FJ7j4QbRP8XkVDdR5TTC2qzT7vZghzs1o,406
36
- cheshirecat_python_sdk/models/api/tokens.py,sha256=5vzQqmcYWg593U1cTnnmLPZMNkgNNY5egQBQTE-NDoE,123
37
- cheshirecat_python_sdk/models/api/users.py,sha256=2l86y6ol0R0823gGl4bmc1TzGP4ZyvTm9AR8riKiatA,160
38
- cheshirecat_python_sdk/models/api/nested/memories.py,sha256=Yxhg9qingrVWwnI6hwdVhj0gG1U-rFqUX6Juzwt8h7w,864
39
- cheshirecat_python_sdk/models/api/nested/plugins.py,sha256=EJ0bCC41ttG4ni_hUaFx229iBcucZflduk2jF4IxTg8,437
40
- cheshirecat_python_sdk-1.2.1.dist-info/METADATA,sha256=BYjDdowLsUxmcKQsit9GCkPWKlUcYgUI807mxpzHIQk,44046
41
- cheshirecat_python_sdk-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
- cheshirecat_python_sdk-1.2.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
43
- cheshirecat_python_sdk-1.2.1.dist-info/RECORD,,