cheshirecat-python-sdk 1.7.11__py3-none-any.whl → 1.8.1__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.
@@ -1,3 +1,3 @@
1
- from cheshirecat_python_sdk.builders.memory import MemoryBuilder, MemoryPointBuilder
1
+ from cheshirecat_python_sdk.builders.memory import MemoryPointBuilder
2
2
  from cheshirecat_python_sdk.builders.settings_input import SettingInputBuilder
3
3
  from cheshirecat_python_sdk.builders.why import WhyBuilder
@@ -1,26 +1,7 @@
1
1
  from typing import Dict, Any
2
2
 
3
3
  from cheshirecat_python_sdk.builders.base import BaseBuilder
4
- from cheshirecat_python_sdk.models.dtos import Memory, MemoryPoint
5
-
6
-
7
- class MemoryBuilder(BaseBuilder):
8
- def __init__(self):
9
- self.declarative: Dict[str, Any] | None = None
10
-
11
- @staticmethod
12
- def create():
13
- return MemoryBuilder()
14
-
15
- def set_declarative(self, declarative: Dict[str, Any] | None = None):
16
- self.declarative = declarative or {}
17
- return self
18
-
19
- def build(self):
20
- memory = Memory()
21
- memory.declarative = self.declarative
22
-
23
- return memory
4
+ from cheshirecat_python_sdk.models.dtos import MemoryPoint
24
5
 
25
6
 
26
7
  class MemoryPointBuilder(BaseBuilder):
@@ -1,14 +1,14 @@
1
- from typing import Dict, Any
1
+ from typing import List
2
2
 
3
3
  from cheshirecat_python_sdk.builders.base import BaseBuilder
4
- from cheshirecat_python_sdk.models.dtos import Memory, Why
4
+ from cheshirecat_python_sdk.models.dtos import Why
5
5
 
6
6
 
7
7
  class WhyBuilder(BaseBuilder):
8
8
  def __init__(self):
9
9
  self.input: str | None = None
10
- self.intermediate_steps: Dict[str, Any] | None = None
11
- self.memory: Memory | None = None
10
+ self.intermediate_steps: List | None = []
11
+ self.memory: List | None = []
12
12
 
13
13
  @staticmethod
14
14
  def create() -> "WhyBuilder":
@@ -18,12 +18,12 @@ class WhyBuilder(BaseBuilder):
18
18
  self.input = input
19
19
  return self
20
20
 
21
- def set_intermediate_steps(self, intermediate_steps: Dict[str, Any] | None = None) -> "WhyBuilder":
22
- self.intermediate_steps = intermediate_steps
21
+ def set_intermediate_steps(self, intermediate_steps: List | None = None) -> "WhyBuilder":
22
+ self.intermediate_steps = intermediate_steps or []
23
23
  return self
24
24
 
25
- def set_memory(self, memory: Memory) -> "WhyBuilder":
26
- self.memory = memory
25
+ def set_memory(self, memory: List | None = None) -> "WhyBuilder":
26
+ self.memory = memory or []
27
27
  return self
28
28
 
29
29
  def build(self) -> Why:
@@ -18,6 +18,7 @@ from cheshirecat_python_sdk.endpoints import (
18
18
  UtilsEndpoint,
19
19
  VectorDatabaseEndpoint,
20
20
  HealthCheckEndpoint,
21
+ AgenticWorkflowEndpoint,
21
22
  )
22
23
 
23
24
 
@@ -64,6 +65,10 @@ class CheshireCatClient:
64
65
  def auth_handler(self):
65
66
  return AuthHandlerEndpoint(self)
66
67
 
68
+ @property
69
+ def agentic_workflow(self):
70
+ return AgenticWorkflowEndpoint(self)
71
+
67
72
  @property
68
73
  def chunker(self):
69
74
  return ChunkerEndpoint(self)
@@ -1,4 +1,5 @@
1
1
  from cheshirecat_python_sdk.endpoints.admins import AdminsEndpoint
2
+ from cheshirecat_python_sdk.endpoints.agentic_workflow import AgenticWorkflowEndpoint
2
3
  from cheshirecat_python_sdk.endpoints.auth import AuthEndpoint
3
4
  from cheshirecat_python_sdk.endpoints.auth_handler import AuthHandlerEndpoint
4
5
  from cheshirecat_python_sdk.endpoints.chunker import ChunkerEndpoint
@@ -0,0 +1,52 @@
1
+ from typing import Dict, Any
2
+
3
+ from cheshirecat_python_sdk.endpoints.base import AbstractEndpoint
4
+ from cheshirecat_python_sdk.models.api.factories import FactoryObjectSettingsOutput, FactoryObjectSettingOutput
5
+
6
+
7
+ class AgenticWorkflowEndpoint(AbstractEndpoint):
8
+ def __init__(self, client: "CheshireCatClient"):
9
+ super().__init__(client)
10
+ self.prefix = "/agentic_workflow"
11
+
12
+ def get_agentic_workflows_settings(self, agent_id: str) -> FactoryObjectSettingsOutput:
13
+ """
14
+ Get all agentic workflow settings for the agent with the given ID.
15
+ :param agent_id: The ID of the agent.
16
+ :return: FactoryObjectSettingsOutput, containing the settings for all agentic workflows.
17
+ """
18
+ return self.get(
19
+ self.format_url("/settings"),
20
+ agent_id,
21
+ output_class=FactoryObjectSettingsOutput,
22
+ )
23
+
24
+ def get_agentic_workflow_settings(self, agentic_workflow: str, agent_id: str) -> FactoryObjectSettingOutput:
25
+ """
26
+ Get the settings for the agentic workflow with the given name.
27
+ :param agentic_workflow: The name of the agentic workflow.
28
+ :param agent_id: The ID of the agent.
29
+ :return: FactoryObjectSettingOutput, containing the settings for the agentic workflow.
30
+ """
31
+ return self.get(
32
+ self.format_url(f"/settings/{agentic_workflow}"),
33
+ agent_id,
34
+ output_class=FactoryObjectSettingOutput,
35
+ )
36
+
37
+ def put_agentic_workflow_settings(
38
+ self, agentic_workflow: str, agent_id: str, values: Dict[str, Any]
39
+ ) -> FactoryObjectSettingOutput:
40
+ """
41
+ Update the settings for the agentic workflow with the given name.
42
+ :param agentic_workflow: The name of the agentic workflow.
43
+ :param agent_id: The ID of the agent.
44
+ :param values: The new settings for the agentic workflow.
45
+ :return: FactoryObjectSettingOutput, containing the updated settings for the agentic workflow.
46
+ """
47
+ return self.put(
48
+ self.format_url(f"/settings/{agentic_workflow}"),
49
+ agent_id,
50
+ output_class=FactoryObjectSettingOutput,
51
+ payload=values,
52
+ )
@@ -2,10 +2,6 @@ from typing import Dict, List, Any
2
2
  from pydantic import BaseModel, Field
3
3
 
4
4
 
5
- class Memory(BaseModel):
6
- declarative: List | None = Field(default_factory=list)
7
-
8
-
9
5
  class MemoryPoint(BaseModel):
10
6
  content: str
11
7
  metadata: Dict[str, Any]
@@ -29,4 +25,4 @@ class SettingInput(BaseModel):
29
25
  class Why(BaseModel):
30
26
  input: str | None = None
31
27
  intermediate_steps: List | None = Field(default_factory=list)
32
- memory: Memory = Field(default_factory=Memory)
28
+ memory: List | None = Field(default_factory=list)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cheshirecat-python-sdk
3
- Version: 1.7.11
3
+ Version: 1.8.1
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,18 +1,19 @@
1
1
  cheshirecat_python_sdk/__init__.py,sha256=59esRUsh_6xPlfoCz-gQYQdDgp2xbaINYWyDcTJlvys,284
2
- cheshirecat_python_sdk/client.py,sha256=J8C8j9q-Lz3cGKyYbd9w19Ayh9muMa8s3N_gYpmLI-E,2839
2
+ cheshirecat_python_sdk/client.py,sha256=J9sX8FxtE6bkwshDq5AHycG1bqHEOeqZlfr9g1mb13I,2960
3
3
  cheshirecat_python_sdk/configuration.py,sha256=7uXebZGzCuJdpgOeN5l1YXkWVIrTk4apxvjPKZFcJTE,283
4
4
  cheshirecat_python_sdk/enums.py,sha256=qJyhl5D_oDMHqNcIivr9pTxNrZY6XkX7lGgGydk22TY,665
5
5
  cheshirecat_python_sdk/utils.py,sha256=2pcSCREOuIAUi5El5ou2rCm-VtmzyGVd3YHcKrFHgBM,458
6
- cheshirecat_python_sdk/builders/__init__.py,sha256=sFzhmAPkKY2-9CGw5838S-2CMBosK4yCuTi9KmyetEo,223
6
+ cheshirecat_python_sdk/builders/__init__.py,sha256=MEgXtw52hpQSTZ_EGOuS6WbbuXpIJGKmnYYImyoIM-s,208
7
7
  cheshirecat_python_sdk/builders/base.py,sha256=YyE0pLp2iYyIFQVD1hLDeR8Wg578ebzoEEEtX9G8KZw,216
8
- cheshirecat_python_sdk/builders/memory.py,sha256=vIoQADNZF51mMjPoJ-xW6DFWgUeAufiFXa-uDPb71A0,1088
8
+ cheshirecat_python_sdk/builders/memory.py,sha256=UqznTdPcrcmWO1WqHcpQ0AoMe-ucWrViUjR6lsvzKEM,640
9
9
  cheshirecat_python_sdk/builders/settings_input.py,sha256=EvaCDmmYOtHWUwCgG-nWonkY6UF6g1blytBwAmH477I,762
10
- cheshirecat_python_sdk/builders/why.py,sha256=liwellCzZ6EyzWcL3lNgBy9SU76zAqGufxiaZ_o3ZT4,1008
10
+ cheshirecat_python_sdk/builders/why.py,sha256=mz58CpjCm5nf7hDXhLqi9o5uRAaGbSHyM5v2pNTX2HU,993
11
11
  cheshirecat_python_sdk/clients/__init__.py,sha256=i4Hqux9vihFRbXVK48yJ1k9gm4JeCHnfPgosizQZv-g,135
12
12
  cheshirecat_python_sdk/clients/http_client.py,sha256=LnP0kr-kHRCwC-BZiysj1Zg-T3b3yuLd81wOctfcBTg,2319
13
13
  cheshirecat_python_sdk/clients/websocket_client.py,sha256=xNjkLSEZhpHzRqIZL21V0oG3srAGFaqYveMqlma2gvI,1932
14
- cheshirecat_python_sdk/endpoints/__init__.py,sha256=uQPclok3DdKTibR7ywDVM67eqtxEMwx_iuza37Wqkr8,1247
14
+ cheshirecat_python_sdk/endpoints/__init__.py,sha256=N8_vA7D304QCcaP-nhz039xkykRsBc-79COL_Ge19AY,1333
15
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
16
17
  cheshirecat_python_sdk/endpoints/auth.py,sha256=_22fLGznoxo2pybcQGgcsHCpLoq76P6RplmSMMgajEQ,2031
17
18
  cheshirecat_python_sdk/endpoints/auth_handler.py,sha256=Jfi7E7L3SIzJyECbJnUenIyl6xxkJlyC31AHpAlmqSs,2117
18
19
  cheshirecat_python_sdk/endpoints/base.py,sha256=W_ynJur_cbT31KLp6F4pJ212tMaAa1BxnG75YS1UgNU,4075
@@ -30,7 +31,7 @@ cheshirecat_python_sdk/endpoints/rabbit_hole.py,sha256=DH5KGpk0Ur8RPi1fZIO9D925m
30
31
  cheshirecat_python_sdk/endpoints/users.py,sha256=ySpFi9ILyoT44fnAz8p4LSGTaEAMWv3RBWq72Hv73mI,5803
31
32
  cheshirecat_python_sdk/endpoints/utils.py,sha256=yKGrFRpu6ItLnBEuc98093LbXqGYaGdgCLiWuLQJVno,2551
32
33
  cheshirecat_python_sdk/endpoints/vector_database.py,sha256=Xu6zcopjZgcFVVmyN547piiqFcaTUtF35X0QxQHycXQ,2149
33
- cheshirecat_python_sdk/models/dtos.py,sha256=yK6CfCGdwLvZtYFPoImDEgpV5eyHB2iwji2t6dh6gxc,668
34
+ cheshirecat_python_sdk/models/dtos.py,sha256=5K0_IqppdE8yhvmoG32YkwylezaE5Es4lUqhrYx73r0,585
34
35
  cheshirecat_python_sdk/models/api/admins.py,sha256=sIX4NdEntjORgVACsqkBkzte4zwD6w35BdPRRG0D7uo,661
35
36
  cheshirecat_python_sdk/models/api/conversations.py,sha256=Ej8677MLBqZEME1lZFd4UhHokdja762zYNjV9ZaEg-I,505
36
37
  cheshirecat_python_sdk/models/api/factories.py,sha256=_NWz0nKhaVYEbaphxe2YZGznDIUiMKb-xqA1xymME5A,594
@@ -43,7 +44,7 @@ cheshirecat_python_sdk/models/api/tokens.py,sha256=GavSaCq0-SRWjvLtDgrYBOdUELd7V
43
44
  cheshirecat_python_sdk/models/api/users.py,sha256=_T3-8hfmlZK9cZcqBTbNMYS74yEnDrRACRQn9PNCEiQ,280
44
45
  cheshirecat_python_sdk/models/api/nested/memories.py,sha256=ddGDsmZa2refElM0sGz9QfKHGk50wsTpkwN5qDC5bF4,946
45
46
  cheshirecat_python_sdk/models/api/nested/plugins.py,sha256=7vrwgXh0csaUn11YKY_OWnGEnD8Fu_ewKxt024VOBEs,738
46
- cheshirecat_python_sdk-1.7.11.dist-info/METADATA,sha256=ZOzFwNZ8wapzlOX2WbTcV62MbvJuVP8XdpHZePY6Lrk,44137
47
- cheshirecat_python_sdk-1.7.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
48
- cheshirecat_python_sdk-1.7.11.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
49
- cheshirecat_python_sdk-1.7.11.dist-info/RECORD,,
47
+ cheshirecat_python_sdk-1.8.1.dist-info/METADATA,sha256=bdLZ0edltFnhTTg08PCaT64qieSnnkY8x01HA6XowWo,44136
48
+ cheshirecat_python_sdk-1.8.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
49
+ cheshirecat_python_sdk-1.8.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
50
+ cheshirecat_python_sdk-1.8.1.dist-info/RECORD,,