intentkit 0.7.3.dev6__py3-none-any.whl → 0.7.4rc1__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.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +1 -1
- intentkit/core/chat.py +3 -5
- intentkit/core/engine.py +2 -0
- {intentkit-0.7.3.dev6.dist-info → intentkit-0.7.4rc1.dist-info}/METADATA +1 -1
- {intentkit-0.7.3.dev6.dist-info → intentkit-0.7.4rc1.dist-info}/RECORD +7 -7
- {intentkit-0.7.3.dev6.dist-info → intentkit-0.7.4rc1.dist-info}/WHEEL +0 -0
- {intentkit-0.7.3.dev6.dist-info → intentkit-0.7.4rc1.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
intentkit/core/chat.py
CHANGED
|
@@ -31,13 +31,13 @@ async def clear_thread_memory(agent_id: str, chat_id: str) -> bool:
|
|
|
31
31
|
"""
|
|
32
32
|
try:
|
|
33
33
|
# Construct thread_id by combining agent_id and chat_id
|
|
34
|
-
thread_id = f"{agent_id}
|
|
34
|
+
thread_id = f"{agent_id}-{chat_id}"
|
|
35
35
|
|
|
36
36
|
# Get the LangGraph checkpointer instance
|
|
37
37
|
checkpointer = get_langgraph_checkpointer()
|
|
38
38
|
|
|
39
39
|
# Use the official LangGraph method to delete all thread content
|
|
40
|
-
await checkpointer.
|
|
40
|
+
await checkpointer.adelete_thread(thread_id)
|
|
41
41
|
|
|
42
42
|
logger.info(f"Successfully cleared thread memory for thread_id: {thread_id}")
|
|
43
43
|
return True
|
|
@@ -46,6 +46,4 @@ async def clear_thread_memory(agent_id: str, chat_id: str) -> bool:
|
|
|
46
46
|
logger.error(
|
|
47
47
|
f"Failed to clear thread memory for agent_id: {agent_id}, chat_id: {chat_id}. Error: {str(e)}"
|
|
48
48
|
)
|
|
49
|
-
raise IntentKitAPIError(
|
|
50
|
-
500, "ThreadMemoryClearError", f"Failed to clear thread memory: {str(e)}"
|
|
51
|
-
)
|
|
49
|
+
raise IntentKitAPIError(500, "ServerError", "Failed to clear thread memory")
|
intentkit/core/engine.py
CHANGED
|
@@ -35,6 +35,7 @@ from sqlalchemy.exc import SQLAlchemyError
|
|
|
35
35
|
|
|
36
36
|
from intentkit.abstracts.graph import AgentContext, AgentError, AgentState
|
|
37
37
|
from intentkit.config.config import config
|
|
38
|
+
from intentkit.core.chat import clear_thread_memory
|
|
38
39
|
from intentkit.core.credit import expense_message, expense_skill
|
|
39
40
|
from intentkit.core.node import PreModelNode, post_model_node
|
|
40
41
|
from intentkit.core.prompt import (
|
|
@@ -793,6 +794,7 @@ async def stream_agent(message: ChatMessageCreate):
|
|
|
793
794
|
)
|
|
794
795
|
error_message = await error_message_create.save()
|
|
795
796
|
yield error_message
|
|
797
|
+
await clear_thread_memory(input.agent_id, input.chat_id)
|
|
796
798
|
return
|
|
797
799
|
|
|
798
800
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4rc1
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestalnetwork/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestalnetwork/intentkit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
intentkit/__init__.py,sha256=
|
|
1
|
+
intentkit/__init__.py,sha256=Hm7n1AUuxBnOAUwHU28kCemgEjOyGRbopVI8juF-BxY,383
|
|
2
2
|
intentkit/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
intentkit/abstracts/agent.py,sha256=108gb5W8Q1Sy4G55F2_ZFv2-_CnY76qrBtpIr0Oxxqk,1489
|
|
4
4
|
intentkit/abstracts/api.py,sha256=ZUc24vaQvQVbbjznx7bV0lbbQxdQPfEV8ZxM2R6wZWo,166
|
|
@@ -15,10 +15,10 @@ intentkit/config/config.py,sha256=xDbm5KSXt4rZh2Nak0bmrYv5Rf__mJz8aJ9PHzar-Lk,89
|
|
|
15
15
|
intentkit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
intentkit/core/agent.py,sha256=GIKDn1dTenIHWMRxe-ud7hd1cQaHzbTDdypy5IAgPfU,16658
|
|
17
17
|
intentkit/core/api.py,sha256=WfoaHNquujYJIpNPuTR1dSaaxog0S3X2W4lG9Ehmkm4,3284
|
|
18
|
-
intentkit/core/chat.py,sha256=
|
|
18
|
+
intentkit/core/chat.py,sha256=dnwqAUk5uVNyhsX9dNZIHzleW1WbI5XSyHdCsD1ORR8,1639
|
|
19
19
|
intentkit/core/client.py,sha256=J5K7f08-ucszBKAbn9K3QNOFKIC__7amTbKYii1jFkI,3056
|
|
20
20
|
intentkit/core/credit.py,sha256=vW3I5c_fKe_bmFvOc9_EaMsMuAbqw-XQ_NbJg_okdA8,75284
|
|
21
|
-
intentkit/core/engine.py,sha256=
|
|
21
|
+
intentkit/core/engine.py,sha256=mq8M4UCLu0POcXqr3B2CDnX4insA7qrW2K4YC_RCKr8,36679
|
|
22
22
|
intentkit/core/node.py,sha256=7h9zgDSd928bzUi3m3EZnKkhbwqlbRAQUr_uz7gKB5Y,8880
|
|
23
23
|
intentkit/core/prompt.py,sha256=clZmH9Ryn7cUwi6lQADEH9-AupT4V4NLMaUCzOoFHS4,15899
|
|
24
24
|
intentkit/core/skill.py,sha256=vPK37sDRT9kzkMBymPwqZ5uEdxTTRtb_DfREIeyz-Xw,5788
|
|
@@ -418,7 +418,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
418
418
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
419
419
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
420
420
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
421
|
-
intentkit-0.7.
|
|
422
|
-
intentkit-0.7.
|
|
423
|
-
intentkit-0.7.
|
|
424
|
-
intentkit-0.7.
|
|
421
|
+
intentkit-0.7.4rc1.dist-info/METADATA,sha256=Y6cilsXx95wyANrU8va8qQrXBFbXBZHfR1ZC3uW18mU,6407
|
|
422
|
+
intentkit-0.7.4rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
423
|
+
intentkit-0.7.4rc1.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
424
|
+
intentkit-0.7.4rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|