intentkit 0.6.5.dev5__py3-none-any.whl → 0.6.5.dev7__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/models/chat.py +26 -0
- intentkit/skills/twitter/reply_tweet.py +2 -2
- {intentkit-0.6.5.dev5.dist-info → intentkit-0.6.5.dev7.dist-info}/METADATA +1 -1
- {intentkit-0.6.5.dev5.dist-info → intentkit-0.6.5.dev7.dist-info}/RECORD +7 -7
- {intentkit-0.6.5.dev5.dist-info → intentkit-0.6.5.dev7.dist-info}/WHEEL +0 -0
- {intentkit-0.6.5.dev5.dist-info → intentkit-0.6.5.dev7.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
intentkit/models/chat.py
CHANGED
|
@@ -447,6 +447,32 @@ class ChatMessage(ChatMessageCreate):
|
|
|
447
447
|
|
|
448
448
|
return resp
|
|
449
449
|
|
|
450
|
+
def sanitize_privacy(self) -> "ChatMessage":
|
|
451
|
+
"""Remove sensitive information from the chat message.
|
|
452
|
+
|
|
453
|
+
This method clears the message content and removes parameters and response
|
|
454
|
+
from skill calls while preserving the structure and metadata.
|
|
455
|
+
|
|
456
|
+
Returns:
|
|
457
|
+
ChatMessage: A new ChatMessage instance with sensitive data removed
|
|
458
|
+
"""
|
|
459
|
+
# Create a copy of the current message
|
|
460
|
+
sanitized_data = self.model_dump()
|
|
461
|
+
|
|
462
|
+
# Clear the message content
|
|
463
|
+
sanitized_data["message"] = ""
|
|
464
|
+
|
|
465
|
+
# Clear sensitive data from skill calls
|
|
466
|
+
if sanitized_data.get("skill_calls"):
|
|
467
|
+
for skill_call in sanitized_data["skill_calls"]:
|
|
468
|
+
# Clear parameters and response while keeping structure
|
|
469
|
+
skill_call["parameters"] = {}
|
|
470
|
+
if "response" in skill_call:
|
|
471
|
+
skill_call["response"] = ""
|
|
472
|
+
|
|
473
|
+
# Return a new ChatMessage instance with sanitized data
|
|
474
|
+
return ChatMessage.model_validate(sanitized_data)
|
|
475
|
+
|
|
450
476
|
@classmethod
|
|
451
477
|
async def get(cls, message_id: str) -> Optional["ChatMessage"]:
|
|
452
478
|
async with get_session() as db:
|
|
@@ -10,8 +10,8 @@ from intentkit.skills.twitter.base import TwitterBaseTool
|
|
|
10
10
|
|
|
11
11
|
NAME = "twitter_reply_tweet"
|
|
12
12
|
PROMPT = (
|
|
13
|
-
"Reply to an existing tweet on Twitter.
|
|
14
|
-
"you must provide image url in parameters, do not add image link in text."
|
|
13
|
+
"Reply to an existing tweet on Twitter. Do not reply to your own tweet. "
|
|
14
|
+
"If you want to post image, you must provide image url in parameters, do not add image link in text."
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger(__name__)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.5.
|
|
3
|
+
Version: 0.6.5.dev7
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestal-network/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestal-network/intentkit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
intentkit/__init__.py,sha256
|
|
1
|
+
intentkit/__init__.py,sha256=WQEuhS-2ZEoV2qCME72R3btYa-uBFtKP6EAxse3pxAQ,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
|
|
@@ -26,7 +26,7 @@ intentkit/models/agent_data.py,sha256=4fhhtTh9bl1hzHiaVYHy1RyaFjIqrDxEcRgnbrkKOK
|
|
|
26
26
|
intentkit/models/agent_schema.json,sha256=5RMn474uWeN8Mo7RwPQuvPa5twXcenNbUjXCWjzywrI,21659
|
|
27
27
|
intentkit/models/app_setting.py,sha256=WgW-9t0EbiVemRLrVaC6evdfRU5QFSDK0elsnUU5nIo,5008
|
|
28
28
|
intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
|
|
29
|
-
intentkit/models/chat.py,sha256=
|
|
29
|
+
intentkit/models/chat.py,sha256=O-7qmFh9Qag-gY2xXR6tpLJ1i-D0wQzzZ1hXnrt0BA0,19052
|
|
30
30
|
intentkit/models/conversation.py,sha256=nrbDIw-3GK5BYi_xkI15FLdx4a6SNrFK8wfAGLCsrqk,9032
|
|
31
31
|
intentkit/models/credit.py,sha256=95buGlZwIuoSPasZcqYEKvdrnUiUe2RzJCR3a2rvQvU,42397
|
|
32
32
|
intentkit/models/db.py,sha256=Ked8-PsvKvqxgvytGpWlDxZNgEuyac-uGM0xWWshKmY,4210
|
|
@@ -323,7 +323,7 @@ intentkit/skills/twitter/get_user_by_username.py,sha256=e6y2N6z-T3nKXJ2iKnqYo6RL
|
|
|
323
323
|
intentkit/skills/twitter/get_user_tweets.py,sha256=fYiyPLu4qGlF0DZGqKo-EeB2OI8iwJJk_14xE8hWSDs,4206
|
|
324
324
|
intentkit/skills/twitter/like_tweet.py,sha256=agICo_dJfY6s8o5deCE9gjfumKurL-P2C8VHCbvhI1M,2133
|
|
325
325
|
intentkit/skills/twitter/post_tweet.py,sha256=udbCfEXSJ8T_PGCw2A50-4ZeK5soZ4ZGDVnOuiTOuKs,2916
|
|
326
|
-
intentkit/skills/twitter/reply_tweet.py,sha256=
|
|
326
|
+
intentkit/skills/twitter/reply_tweet.py,sha256=11J013mzweQf-X9ijT7EU9EBcLSjZhMMUxQM-wRneB8,3192
|
|
327
327
|
intentkit/skills/twitter/retweet.py,sha256=cWXPgltc8ms0M1zp2Ofju2sGy2cYxIXNpJuNkyt3Q4I,2444
|
|
328
328
|
intentkit/skills/twitter/schema.json,sha256=uSSl-dhOs_qrSoOlxFAsTbst0_POWPRZo9YAF_qhho8,6977
|
|
329
329
|
intentkit/skills/twitter/search_tweets.py,sha256=adQUfUJ5nfCiAv8CFCg1-NVIdo32rs_9cO6Eknhn2no,4030
|
|
@@ -390,7 +390,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
390
390
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
391
391
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
392
392
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
393
|
-
intentkit-0.6.5.
|
|
394
|
-
intentkit-0.6.5.
|
|
395
|
-
intentkit-0.6.5.
|
|
396
|
-
intentkit-0.6.5.
|
|
393
|
+
intentkit-0.6.5.dev7.dist-info/METADATA,sha256=PO3HWLlaghqgmvNb506eoqrhT7ARneRuG2XAQF0E34s,6321
|
|
394
|
+
intentkit-0.6.5.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
395
|
+
intentkit-0.6.5.dev7.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
396
|
+
intentkit-0.6.5.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|