intentkit 0.8.17.dev1__py3-none-any.whl → 0.8.17.dev2__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.

Files changed (272) hide show
  1. intentkit/__init__.py +1 -1
  2. intentkit/abstracts/agent.py +4 -5
  3. intentkit/abstracts/engine.py +5 -5
  4. intentkit/abstracts/graph.py +6 -5
  5. intentkit/abstracts/skill.py +5 -5
  6. intentkit/abstracts/twitter.py +4 -5
  7. intentkit/clients/cdp.py +19 -77
  8. intentkit/clients/twitter.py +26 -34
  9. intentkit/clients/web3.py +1 -3
  10. intentkit/config/config.py +4 -0
  11. intentkit/core/agent.py +15 -15
  12. intentkit/core/asset.py +1 -2
  13. intentkit/core/client.py +1 -1
  14. intentkit/core/credit.py +19 -20
  15. intentkit/core/engine.py +2 -4
  16. intentkit/core/node.py +2 -1
  17. intentkit/core/prompt.py +3 -4
  18. intentkit/core/scheduler.py +1 -1
  19. intentkit/core/statistics.py +6 -7
  20. intentkit/models/agent.py +125 -92
  21. intentkit/models/agent_data.py +62 -36
  22. intentkit/models/app_setting.py +6 -6
  23. intentkit/models/chat.py +27 -24
  24. intentkit/models/conversation.py +8 -8
  25. intentkit/models/credit.py +62 -64
  26. intentkit/models/db.py +8 -7
  27. intentkit/models/db_mig.py +2 -2
  28. intentkit/models/llm.py +12 -14
  29. intentkit/models/redis.py +2 -3
  30. intentkit/models/skill.py +25 -27
  31. intentkit/models/user.py +21 -22
  32. intentkit/skills/acolyt/ask.py +3 -4
  33. intentkit/skills/acolyt/base.py +1 -3
  34. intentkit/skills/aixbt/base.py +1 -3
  35. intentkit/skills/aixbt/projects.py +13 -13
  36. intentkit/skills/allora/base.py +1 -3
  37. intentkit/skills/allora/price.py +2 -3
  38. intentkit/skills/base.py +15 -22
  39. intentkit/skills/basename/__init__.py +3 -5
  40. intentkit/skills/carv/__init__.py +7 -8
  41. intentkit/skills/carv/base.py +6 -6
  42. intentkit/skills/carv/fetch_news.py +3 -3
  43. intentkit/skills/carv/onchain_query.py +4 -4
  44. intentkit/skills/carv/token_info_and_price.py +5 -5
  45. intentkit/skills/casino/base.py +1 -3
  46. intentkit/skills/casino/deck_draw.py +1 -2
  47. intentkit/skills/casino/deck_shuffle.py +1 -2
  48. intentkit/skills/casino/dice_roll.py +1 -2
  49. intentkit/skills/cdp/__init__.py +3 -5
  50. intentkit/skills/cdp/base.py +1 -3
  51. intentkit/skills/chainlist/base.py +1 -3
  52. intentkit/skills/chainlist/chain_lookup.py +18 -18
  53. intentkit/skills/common/base.py +1 -3
  54. intentkit/skills/common/current_time.py +1 -2
  55. intentkit/skills/cookiefun/base.py +1 -2
  56. intentkit/skills/cookiefun/get_account_details.py +7 -7
  57. intentkit/skills/cookiefun/get_account_feed.py +19 -19
  58. intentkit/skills/cookiefun/get_account_smart_followers.py +7 -7
  59. intentkit/skills/cookiefun/get_sectors.py +3 -3
  60. intentkit/skills/cookiefun/search_accounts.py +9 -9
  61. intentkit/skills/cryptocompare/api.py +2 -3
  62. intentkit/skills/cryptocompare/base.py +6 -6
  63. intentkit/skills/cryptocompare/fetch_news.py +3 -4
  64. intentkit/skills/cryptocompare/fetch_price.py +5 -6
  65. intentkit/skills/cryptocompare/fetch_top_exchanges.py +3 -4
  66. intentkit/skills/cryptocompare/fetch_top_market_cap.py +3 -4
  67. intentkit/skills/cryptocompare/fetch_top_volume.py +3 -4
  68. intentkit/skills/cryptocompare/fetch_trading_signals.py +4 -5
  69. intentkit/skills/cryptopanic/__init__.py +4 -4
  70. intentkit/skills/cryptopanic/base.py +1 -3
  71. intentkit/skills/cryptopanic/fetch_crypto_news.py +3 -5
  72. intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +3 -3
  73. intentkit/skills/dapplooker/base.py +1 -3
  74. intentkit/skills/dapplooker/dapplooker_token_data.py +7 -7
  75. intentkit/skills/defillama/api.py +6 -9
  76. intentkit/skills/defillama/base.py +5 -6
  77. intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +6 -8
  78. intentkit/skills/defillama/coins/fetch_block.py +4 -6
  79. intentkit/skills/defillama/coins/fetch_current_prices.py +6 -8
  80. intentkit/skills/defillama/coins/fetch_first_price.py +5 -7
  81. intentkit/skills/defillama/coins/fetch_historical_prices.py +7 -9
  82. intentkit/skills/defillama/coins/fetch_price_chart.py +7 -9
  83. intentkit/skills/defillama/coins/fetch_price_percentage.py +5 -7
  84. intentkit/skills/defillama/config/chains.py +1 -3
  85. intentkit/skills/defillama/fees/fetch_fees_overview.py +22 -24
  86. intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +14 -16
  87. intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +6 -8
  88. intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +3 -5
  89. intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +5 -7
  90. intentkit/skills/defillama/tests/api_integration.test.py +1 -1
  91. intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -4
  92. intentkit/skills/defillama/tvl/fetch_chains.py +7 -9
  93. intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -4
  94. intentkit/skills/defillama/tvl/fetch_protocol.py +30 -36
  95. intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +1 -3
  96. intentkit/skills/defillama/tvl/fetch_protocols.py +35 -43
  97. intentkit/skills/defillama/volumes/fetch_dex_overview.py +40 -46
  98. intentkit/skills/defillama/volumes/fetch_dex_summary.py +33 -35
  99. intentkit/skills/defillama/volumes/fetch_options_overview.py +22 -26
  100. intentkit/skills/defillama/yields/fetch_pool_chart.py +8 -10
  101. intentkit/skills/defillama/yields/fetch_pools.py +24 -28
  102. intentkit/skills/dexscreener/__init__.py +2 -2
  103. intentkit/skills/dexscreener/base.py +3 -3
  104. intentkit/skills/dexscreener/get_pair_info.py +2 -2
  105. intentkit/skills/dexscreener/get_token_pairs.py +2 -2
  106. intentkit/skills/dexscreener/get_tokens_info.py +5 -5
  107. intentkit/skills/dexscreener/model/search_token_response.py +80 -82
  108. intentkit/skills/dexscreener/search_token.py +182 -182
  109. intentkit/skills/dexscreener/utils.py +15 -14
  110. intentkit/skills/dune_analytics/__init__.py +4 -4
  111. intentkit/skills/dune_analytics/base.py +1 -3
  112. intentkit/skills/dune_analytics/fetch_kol_buys.py +4 -4
  113. intentkit/skills/dune_analytics/fetch_nation_metrics.py +5 -5
  114. intentkit/skills/elfa/base.py +1 -3
  115. intentkit/skills/elfa/mention.py +19 -21
  116. intentkit/skills/elfa/stats.py +4 -4
  117. intentkit/skills/elfa/tokens.py +12 -12
  118. intentkit/skills/elfa/utils.py +25 -27
  119. intentkit/skills/enso/__init__.py +2 -2
  120. intentkit/skills/enso/base.py +5 -8
  121. intentkit/skills/enso/best_yield.py +4 -6
  122. intentkit/skills/enso/networks.py +1 -2
  123. intentkit/skills/enso/prices.py +1 -3
  124. intentkit/skills/enso/route.py +1 -3
  125. intentkit/skills/enso/tokens.py +1 -3
  126. intentkit/skills/enso/wallet.py +5 -5
  127. intentkit/skills/erc20/__init__.py +4 -6
  128. intentkit/skills/erc721/__init__.py +4 -6
  129. intentkit/skills/firecrawl/base.py +1 -3
  130. intentkit/skills/firecrawl/clear.py +1 -2
  131. intentkit/skills/firecrawl/crawl.py +9 -10
  132. intentkit/skills/firecrawl/query.py +1 -2
  133. intentkit/skills/firecrawl/scrape.py +7 -8
  134. intentkit/skills/firecrawl/utils.py +13 -13
  135. intentkit/skills/github/base.py +1 -3
  136. intentkit/skills/github/github_search.py +1 -2
  137. intentkit/skills/heurist/base.py +1 -3
  138. intentkit/skills/heurist/image_generation_animagine_xl.py +7 -8
  139. intentkit/skills/heurist/image_generation_arthemy_comics.py +7 -8
  140. intentkit/skills/heurist/image_generation_arthemy_real.py +7 -8
  141. intentkit/skills/heurist/image_generation_braindance.py +7 -8
  142. intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +7 -8
  143. intentkit/skills/heurist/image_generation_flux_1_dev.py +7 -8
  144. intentkit/skills/heurist/image_generation_sdxl.py +7 -8
  145. intentkit/skills/http/base.py +1 -3
  146. intentkit/skills/http/get.py +7 -7
  147. intentkit/skills/http/post.py +9 -9
  148. intentkit/skills/http/put.py +9 -9
  149. intentkit/skills/lifi/__init__.py +4 -4
  150. intentkit/skills/lifi/base.py +1 -3
  151. intentkit/skills/lifi/token_execute.py +13 -13
  152. intentkit/skills/lifi/token_quote.py +6 -6
  153. intentkit/skills/lifi/utils.py +16 -16
  154. intentkit/skills/moralis/__init__.py +3 -3
  155. intentkit/skills/moralis/api.py +6 -7
  156. intentkit/skills/moralis/base.py +2 -4
  157. intentkit/skills/moralis/fetch_chain_portfolio.py +10 -11
  158. intentkit/skills/moralis/fetch_nft_portfolio.py +22 -22
  159. intentkit/skills/moralis/fetch_solana_portfolio.py +11 -12
  160. intentkit/skills/moralis/fetch_wallet_portfolio.py +8 -9
  161. intentkit/skills/morpho/__init__.py +4 -6
  162. intentkit/skills/nation/__init__.py +2 -2
  163. intentkit/skills/nation/base.py +1 -3
  164. intentkit/skills/nation/nft_check.py +3 -4
  165. intentkit/skills/onchain.py +2 -6
  166. intentkit/skills/openai/base.py +1 -3
  167. intentkit/skills/openai/dalle_image_generation.py +1 -3
  168. intentkit/skills/openai/gpt_image_generation.py +2 -3
  169. intentkit/skills/openai/gpt_image_to_image.py +2 -3
  170. intentkit/skills/openai/image_to_text.py +1 -2
  171. intentkit/skills/portfolio/base.py +6 -6
  172. intentkit/skills/portfolio/token_balances.py +21 -21
  173. intentkit/skills/portfolio/wallet_approvals.py +7 -7
  174. intentkit/skills/portfolio/wallet_defi_positions.py +3 -3
  175. intentkit/skills/portfolio/wallet_history.py +21 -21
  176. intentkit/skills/portfolio/wallet_net_worth.py +13 -13
  177. intentkit/skills/portfolio/wallet_nfts.py +19 -19
  178. intentkit/skills/portfolio/wallet_profitability.py +7 -7
  179. intentkit/skills/portfolio/wallet_profitability_summary.py +5 -5
  180. intentkit/skills/portfolio/wallet_stats.py +3 -3
  181. intentkit/skills/portfolio/wallet_swaps.py +19 -19
  182. intentkit/skills/pyth/__init__.py +3 -5
  183. intentkit/skills/slack/base.py +2 -4
  184. intentkit/skills/slack/get_channel.py +8 -8
  185. intentkit/skills/slack/get_message.py +9 -9
  186. intentkit/skills/slack/schedule_message.py +5 -5
  187. intentkit/skills/slack/send_message.py +3 -5
  188. intentkit/skills/supabase/base.py +1 -3
  189. intentkit/skills/supabase/delete_data.py +4 -4
  190. intentkit/skills/supabase/fetch_data.py +12 -12
  191. intentkit/skills/supabase/insert_data.py +4 -4
  192. intentkit/skills/supabase/invoke_function.py +6 -6
  193. intentkit/skills/supabase/update_data.py +6 -6
  194. intentkit/skills/supabase/upsert_data.py +4 -4
  195. intentkit/skills/superfluid/__init__.py +4 -6
  196. intentkit/skills/system/add_autonomous_task.py +8 -10
  197. intentkit/skills/system/edit_autonomous_task.py +12 -14
  198. intentkit/skills/system/list_autonomous_tasks.py +1 -3
  199. intentkit/skills/tavily/base.py +1 -3
  200. intentkit/skills/tavily/tavily_extract.py +1 -2
  201. intentkit/skills/tavily/tavily_search.py +1 -3
  202. intentkit/skills/token/base.py +5 -5
  203. intentkit/skills/token/erc20_transfers.py +19 -19
  204. intentkit/skills/token/token_analytics.py +3 -3
  205. intentkit/skills/token/token_price.py +13 -13
  206. intentkit/skills/token/token_search.py +9 -9
  207. intentkit/skills/twitter/base.py +3 -4
  208. intentkit/skills/twitter/follow_user.py +1 -2
  209. intentkit/skills/twitter/get_mentions.py +3 -4
  210. intentkit/skills/twitter/get_timeline.py +1 -2
  211. intentkit/skills/twitter/get_user_by_username.py +1 -2
  212. intentkit/skills/twitter/get_user_tweets.py +2 -3
  213. intentkit/skills/twitter/like_tweet.py +1 -2
  214. intentkit/skills/twitter/post_tweet.py +3 -4
  215. intentkit/skills/twitter/reply_tweet.py +3 -4
  216. intentkit/skills/twitter/retweet.py +1 -2
  217. intentkit/skills/twitter/search_tweets.py +1 -2
  218. intentkit/skills/unrealspeech/base.py +1 -3
  219. intentkit/skills/unrealspeech/text_to_speech.py +8 -8
  220. intentkit/skills/venice_audio/__init__.py +8 -9
  221. intentkit/skills/venice_audio/base.py +3 -4
  222. intentkit/skills/venice_audio/input.py +41 -41
  223. intentkit/skills/venice_audio/venice_audio.py +6 -6
  224. intentkit/skills/venice_image/__init__.py +5 -5
  225. intentkit/skills/venice_image/api.py +138 -138
  226. intentkit/skills/venice_image/base.py +3 -3
  227. intentkit/skills/venice_image/config.py +33 -35
  228. intentkit/skills/venice_image/image_enhance/image_enhance.py +2 -3
  229. intentkit/skills/venice_image/image_enhance/image_enhance_base.py +21 -23
  230. intentkit/skills/venice_image/image_enhance/image_enhance_input.py +38 -40
  231. intentkit/skills/venice_image/image_generation/image_generation_base.py +9 -9
  232. intentkit/skills/venice_image/image_generation/image_generation_fluently_xl.py +26 -26
  233. intentkit/skills/venice_image/image_generation/image_generation_flux_dev.py +27 -27
  234. intentkit/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +26 -26
  235. intentkit/skills/venice_image/image_generation/image_generation_input.py +158 -158
  236. intentkit/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +26 -26
  237. intentkit/skills/venice_image/image_generation/image_generation_pony_realism.py +26 -26
  238. intentkit/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +28 -28
  239. intentkit/skills/venice_image/image_generation/image_generation_venice_sd35.py +28 -28
  240. intentkit/skills/venice_image/image_upscale/image_upscale.py +3 -3
  241. intentkit/skills/venice_image/image_upscale/image_upscale_base.py +21 -23
  242. intentkit/skills/venice_image/image_upscale/image_upscale_input.py +22 -22
  243. intentkit/skills/venice_image/image_vision/image_vision.py +2 -2
  244. intentkit/skills/venice_image/image_vision/image_vision_base.py +17 -17
  245. intentkit/skills/venice_image/image_vision/image_vision_input.py +9 -9
  246. intentkit/skills/venice_image/utils.py +77 -78
  247. intentkit/skills/web_scraper/base.py +1 -3
  248. intentkit/skills/web_scraper/document_indexer.py +1 -2
  249. intentkit/skills/web_scraper/scrape_and_index.py +4 -5
  250. intentkit/skills/web_scraper/utils.py +25 -26
  251. intentkit/skills/web_scraper/website_indexer.py +10 -11
  252. intentkit/skills/weth/__init__.py +4 -6
  253. intentkit/skills/wow/__init__.py +4 -6
  254. intentkit/skills/x402/__init__.py +2 -2
  255. intentkit/skills/x402/ask_agent.py +7 -7
  256. intentkit/skills/x402/base.py +2 -1
  257. intentkit/skills/x402/http_request.py +10 -10
  258. intentkit/skills/xmtp/base.py +3 -3
  259. intentkit/skills/xmtp/price.py +2 -2
  260. intentkit/skills/xmtp/swap.py +2 -4
  261. intentkit/skills/xmtp/transfer.py +4 -6
  262. intentkit/utils/error.py +2 -2
  263. intentkit/utils/logging.py +2 -4
  264. intentkit/utils/s3.py +8 -9
  265. intentkit/utils/schema.py +5 -5
  266. intentkit/utils/slack_alert.py +7 -8
  267. {intentkit-0.8.17.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/METADATA +3 -4
  268. intentkit-0.8.17.dev2.dist-info/RECORD +464 -0
  269. intentkit/models/generator.py +0 -347
  270. intentkit-0.8.17.dev1.dist-info/RECORD +0 -465
  271. {intentkit-0.8.17.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/WHEEL +0 -0
  272. {intentkit-0.8.17.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/licenses/LICENSE +0 -0
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Type
3
2
 
4
3
  from pydantic import BaseModel
5
4
 
@@ -34,7 +33,7 @@ class TwitterGetTimeline(TwitterBaseTool):
34
33
 
35
34
  name: str = NAME
36
35
  description: str = PROMPT
37
- args_schema: Type[BaseModel] = TwitterGetTimelineInput
36
+ args_schema: type[BaseModel] = TwitterGetTimelineInput
38
37
 
39
38
  async def _arun(self, **kwargs):
40
39
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Type
3
2
 
4
3
  from pydantic import BaseModel, Field
5
4
 
@@ -35,7 +34,7 @@ class TwitterGetUserByUsername(TwitterBaseTool):
35
34
 
36
35
  name: str = NAME
37
36
  description: str = PROMPT
38
- args_schema: Type[BaseModel] = TwitterGetUserByUsernameInput
37
+ args_schema: type[BaseModel] = TwitterGetUserByUsernameInput
39
38
 
40
39
  async def _arun(self, username: str, **kwargs):
41
40
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import List, Optional, Type
3
2
 
4
3
  from pydantic import BaseModel, Field
5
4
 
@@ -21,7 +20,7 @@ class TwitterGetUserTweetsInput(BaseModel):
21
20
  """Input for TwitterGetUserTweets tool."""
22
21
 
23
22
  user_id: str = Field(description="The Twitter user ID to fetch tweets from")
24
- exclude: Optional[List[str]] = Field(
23
+ exclude: list[str] | None = Field(
25
24
  default=["replies", "retweets"],
26
25
  description="Types of tweets to exclude (e.g., 'replies', 'retweets')",
27
26
  )
@@ -41,7 +40,7 @@ class TwitterGetUserTweets(TwitterBaseTool):
41
40
 
42
41
  name: str = NAME
43
42
  description: str = PROMPT
44
- args_schema: Type[BaseModel] = TwitterGetUserTweetsInput
43
+ args_schema: type[BaseModel] = TwitterGetUserTweetsInput
45
44
 
46
45
  async def _arun(self, **kwargs):
47
46
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Type
3
2
 
4
3
  from langchain_core.tools import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -32,7 +31,7 @@ class TwitterLikeTweet(TwitterBaseTool):
32
31
 
33
32
  name: str = NAME
34
33
  description: str = PROMPT
35
- args_schema: Type[BaseModel] = TwitterLikeTweetInput
34
+ args_schema: type[BaseModel] = TwitterLikeTweetInput
36
35
 
37
36
  async def _arun(self, tweet_id: str, **kwargs):
38
37
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Optional, Type
3
2
 
4
3
  from langchain_core.tools import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -24,7 +23,7 @@ class TwitterPostTweetInput(BaseModel):
24
23
  description="Tweet text (280 chars for regular users, 25,000 bytes for verified)",
25
24
  max_length=25000,
26
25
  )
27
- image: Optional[str] = Field(
26
+ image: str | None = Field(
28
27
  default=None, description="Optional URL of an image to attach to the tweet"
29
28
  )
30
29
 
@@ -42,12 +41,12 @@ class TwitterPostTweet(TwitterBaseTool):
42
41
 
43
42
  name: str = NAME
44
43
  description: str = PROMPT
45
- args_schema: Type[BaseModel] = TwitterPostTweetInput
44
+ args_schema: type[BaseModel] = TwitterPostTweetInput
46
45
 
47
46
  async def _arun(
48
47
  self,
49
48
  text: str,
50
- image: Optional[str] = None,
49
+ image: str | None = None,
51
50
  **kwargs,
52
51
  ):
53
52
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Optional, Type
3
2
 
4
3
  from langchain_core.tools import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -25,7 +24,7 @@ class TwitterReplyTweetInput(BaseModel):
25
24
  description="Tweet text (280 chars for regular users, 25,000 bytes for verified)",
26
25
  max_length=25000,
27
26
  )
28
- image: Optional[str] = Field(
27
+ image: str | None = Field(
29
28
  default=None, description="Optional URL of an image to attach to the reply"
30
29
  )
31
30
 
@@ -43,13 +42,13 @@ class TwitterReplyTweet(TwitterBaseTool):
43
42
 
44
43
  name: str = NAME
45
44
  description: str = PROMPT
46
- args_schema: Type[BaseModel] = TwitterReplyTweetInput
45
+ args_schema: type[BaseModel] = TwitterReplyTweetInput
47
46
 
48
47
  async def _arun(
49
48
  self,
50
49
  tweet_id: str,
51
50
  text: str,
52
- image: Optional[str] = None,
51
+ image: str | None = None,
53
52
  **kwargs,
54
53
  ):
55
54
  context = self.get_context()
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Type
3
2
 
4
3
  from langchain_core.tools import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -32,7 +31,7 @@ class TwitterRetweet(TwitterBaseTool):
32
31
 
33
32
  name: str = NAME
34
33
  description: str = PROMPT
35
- args_schema: Type[BaseModel] = TwitterRetweetInput
34
+ args_schema: type[BaseModel] = TwitterRetweetInput
36
35
 
37
36
  async def _arun(self, tweet_id: str, **kwargs):
38
37
  context = self.get_context()
@@ -1,6 +1,5 @@
1
1
  import datetime
2
2
  import logging
3
- from typing import Type
4
3
 
5
4
  from pydantic import BaseModel, Field
6
5
 
@@ -33,7 +32,7 @@ class TwitterSearchTweets(TwitterBaseTool):
33
32
 
34
33
  name: str = NAME
35
34
  description: str = PROMPT
36
- args_schema: Type[BaseModel] = TwitterSearchTweetsInput
35
+ args_schema: type[BaseModel] = TwitterSearchTweetsInput
37
36
 
38
37
  async def _arun(self, query: str, **kwargs):
39
38
  context = self.get_context()
@@ -1,5 +1,3 @@
1
- from typing import Type
2
-
3
1
  from langchain_core.tools.base import ToolException
4
2
  from pydantic import BaseModel, Field
5
3
 
@@ -11,7 +9,7 @@ class UnrealSpeechBaseTool(IntentKitSkill):
11
9
 
12
10
  name: str = Field(description="The name of the tool")
13
11
  description: str = Field(description="A description of what the tool does")
14
- args_schema: Type[BaseModel]
12
+ args_schema: type[BaseModel]
15
13
 
16
14
  def get_api_key(self) -> str:
17
15
  context = self.get_context()
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  import os
3
- from typing import Any, Dict, Literal, Optional, Type
3
+ from typing import Any, Literal
4
4
 
5
5
  import httpx
6
6
  from langchain_core.callbacks.manager import CallbackManagerForToolRun
@@ -31,7 +31,7 @@ class TextToSpeechInput(BaseModel):
31
31
  default=0.0,
32
32
  )
33
33
 
34
- timestamp_type: Optional[Literal["word", "sentence"]] = Field(
34
+ timestamp_type: Literal["word", "sentence"] | None = Field(
35
35
  description="The type of timestamps to include in the response. 'word' for word-level timestamps, 'sentence' for sentence-level, or None for no timestamps.",
36
36
  default="word",
37
37
  )
@@ -52,9 +52,9 @@ class TextToSpeech(UnrealSpeechBaseTool):
52
52
  "Returns URLs to the generated audio file and word-level timestamps.\n"
53
53
  "Provides various voice options and speech customization parameters."
54
54
  )
55
- args_schema: Type[BaseModel] = TextToSpeechInput
55
+ args_schema: type[BaseModel] = TextToSpeechInput
56
56
 
57
- def get_env_var(self, env_var_name: str) -> Optional[str]:
57
+ def get_env_var(self, env_var_name: str) -> str | None:
58
58
  """Helper method to get environment variables."""
59
59
  return os.environ.get(env_var_name)
60
60
 
@@ -64,11 +64,11 @@ class TextToSpeech(UnrealSpeechBaseTool):
64
64
  voice_id: str = "af_sarah",
65
65
  bitrate: str = "192k",
66
66
  speed: float = 0.0,
67
- timestamp_type: Optional[Literal["word", "sentence"]] = "word",
68
- config: Optional[Any] = None,
69
- run_manager: Optional[CallbackManagerForToolRun] = None,
67
+ timestamp_type: Literal["word", "sentence"] | None = "word",
68
+ config: Any | None = None,
69
+ run_manager: CallbackManagerForToolRun | None = None,
70
70
  **kwargs,
71
- ) -> Dict[str, Any]:
71
+ ) -> dict[str, Any]:
72
72
  """Run the tool to convert text to speech."""
73
73
 
74
74
  # Get the API key from context config if available
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import List, Literal, Optional, TypedDict
2
+ from typing import Literal, TypedDict
3
3
 
4
4
  from intentkit.skills.base import SkillConfig, SkillState
5
5
  from intentkit.skills.venice_audio.base import VeniceAudioBaseTool
@@ -7,7 +7,6 @@ from intentkit.skills.venice_audio.venice_audio import VeniceAudioTool
7
7
 
8
8
  logger = logging.getLogger(__name__)
9
9
 
10
-
11
10
  _cache: dict[str, VeniceAudioBaseTool] = {}
12
11
 
13
12
  _SKILL_NAME_TO_CLASS_MAP = {
@@ -24,15 +23,15 @@ class Config(SkillConfig):
24
23
  enabled: bool
25
24
  voice_model: Literal["af_heart", "bm_lewis", "custom"]
26
25
  states: SkillStates # type: ignore
27
- api_key_provider: Optional[Literal["agent_owner"]]
26
+ api_key_provider: Literal["agent_owner"] | None
28
27
 
29
28
  # conditionally required
30
- api_key: Optional[str]
31
- voice_model_custom: Optional[list[str]]
29
+ api_key: str | None
30
+ voice_model_custom: list[str] | None
32
31
 
33
32
  # optional
34
- rate_limit_number: Optional[int]
35
- rate_limit_minutes: Optional[int]
33
+ rate_limit_number: int | None
34
+ rate_limit_minutes: int | None
36
35
 
37
36
 
38
37
  async def get_skills(
@@ -54,7 +53,7 @@ async def get_skills(
54
53
  if not config.get("enabled", False):
55
54
  return []
56
55
 
57
- available_skills: List[VeniceAudioBaseTool] = []
56
+ available_skills: list[VeniceAudioBaseTool] = []
58
57
  skill_states = config.get("states", {})
59
58
 
60
59
  # Iterate through all known skills defined in the map
@@ -79,7 +78,7 @@ async def get_skills(
79
78
 
80
79
  def get_venice_audio_skill(
81
80
  name: str,
82
- ) -> Optional[VeniceAudioBaseTool]:
81
+ ) -> VeniceAudioBaseTool | None:
83
82
  """
84
83
  Factory function to get a cached Venice Audio skill instance by name.
85
84
 
@@ -1,5 +1,4 @@
1
1
  import logging
2
- from typing import Dict, List, Optional, Tuple, Type
3
2
 
4
3
  from langchain_core.tools.base import ToolException
5
4
  from pydantic import BaseModel, Field
@@ -15,7 +14,7 @@ class VeniceAudioBaseTool(IntentKitSkill):
15
14
 
16
15
  name: str = Field(default="venice_base_tool", description="The name of the tool")
17
16
  description: str = Field(description="A description of what the tool does")
18
- args_schema: Type[BaseModel] # type: ignore
17
+ args_schema: type[BaseModel] # type: ignore
19
18
 
20
19
  @property
21
20
  def category(self) -> str:
@@ -23,13 +22,13 @@ class VeniceAudioBaseTool(IntentKitSkill):
23
22
 
24
23
  def validate_voice_model(
25
24
  self, context, voice_model: str
26
- ) -> Tuple[bool, Optional[Dict[str, object]]]:
25
+ ) -> tuple[bool, dict[str, object] | None]:
27
26
  config = context.config
28
27
 
29
28
  selected_model = config.get("voice_model")
30
29
  custom_models = config.get("voice_model_custom", [])
31
30
 
32
- allowed_voice_models: List[str] = []
31
+ allowed_voice_models: list[str] = []
33
32
 
34
33
  if selected_model == "custom":
35
34
  allowed_voice_models = custom_models or []
@@ -1,41 +1,41 @@
1
- from typing import Literal, Optional
2
-
3
- from pydantic import BaseModel, Field
4
-
5
- # Define the allowed format literals based on the API documentation
6
- AllowedAudioFormat = Literal["mp3", "opus", "aac", "flac", "wav", "pcm"]
7
-
8
-
9
- class VeniceAudioInput(BaseModel):
10
- """
11
- Input schema for Venice AI Text-to-Speech (/audio/speech endpoint).
12
- Defines parameters controllable by the user when invoking the tool.
13
- """
14
-
15
- voice_input: str = Field(
16
- ..., # Ellipsis (...) indicates this field is required
17
- description="The text to generate audio for. Maximum length is 4096 characters.",
18
- min_length=1, # As per API docs: Required string length: 1
19
- max_length=4096, # As per API docs: The maximum length is 4096 characters.
20
- )
21
-
22
- voice_model: str = Field(
23
- description="voice model to used to generate voice from text_to_speech tool."
24
- )
25
-
26
- speed: Optional[float] = Field(
27
- default=1.0, # As per API docs: default: 1 (using float for consistency)
28
- description="The speed of the generated audio. 1.0 is normal speed. Allowed range: 0.25 to 4.0.",
29
- ge=0.25, # As per API docs: Required range: 0.25 <= x
30
- le=4.0, # As per API docs: Required range: x <= 4
31
- )
32
-
33
- response_format: Optional[AllowedAudioFormat] = Field(
34
- default="mp3", # As per API docs: default: mp3
35
- description="The desired audio format for the output file.",
36
- )
37
-
38
- # --- Note on other API parameters ---
39
- # 'model': Currently hardcoded to 'tts-kokoro' in VeniceAudioBaseTool._arun. Could be added here if needed.
40
- # 'voice': Handled by the 'voice_model' attribute of the specific VeniceAudioBaseTool instance. Not typically set via input schema.
41
- # 'streaming': Currently hardcoded to False in VeniceAudioBaseTool._arun. Could be added here if streaming support is implemented.
1
+ from typing import Literal
2
+
3
+ from pydantic import BaseModel, Field
4
+
5
+ # Define the allowed format literals based on the API documentation
6
+ AllowedAudioFormat = Literal["mp3", "opus", "aac", "flac", "wav", "pcm"]
7
+
8
+
9
+ class VeniceAudioInput(BaseModel):
10
+ """
11
+ Input schema for Venice AI Text-to-Speech (/audio/speech endpoint).
12
+ Defines parameters controllable by the user when invoking the tool.
13
+ """
14
+
15
+ voice_input: str = Field(
16
+ ..., # Ellipsis (...) indicates this field is required
17
+ description="The text to generate audio for. Maximum length is 4096 characters.",
18
+ min_length=1, # As per API docs: Required string length: 1
19
+ max_length=4096, # As per API docs: The maximum length is 4096 characters.
20
+ )
21
+
22
+ voice_model: str = Field(
23
+ description="voice model to used to generate voice from text_to_speech tool."
24
+ )
25
+
26
+ speed: float | None = Field(
27
+ default=1.0, # As per API docs: default: 1 (using float for consistency)
28
+ description="The speed of the generated audio. 1.0 is normal speed. Allowed range: 0.25 to 4.0.",
29
+ ge=0.25, # As per API docs: Required range: 0.25 <= x
30
+ le=4.0, # As per API docs: Required range: x <= 4
31
+ )
32
+
33
+ response_format: AllowedAudioFormat | None = Field(
34
+ default="mp3", # As per API docs: default: mp3
35
+ description="The desired audio format for the output file.",
36
+ )
37
+
38
+ # --- Note on other API parameters ---
39
+ # 'model': Currently hardcoded to 'tts-kokoro' in VeniceAudioBaseTool._arun. Could be added here if needed.
40
+ # 'voice': Handled by the 'voice_model' attribute of the specific VeniceAudioBaseTool instance. Not typically set via input schema.
41
+ # 'streaming': Currently hardcoded to False in VeniceAudioBaseTool._arun. Could be added here if streaming support is implemented.
@@ -1,7 +1,7 @@
1
1
  import hashlib
2
2
  import json
3
3
  import logging
4
- from typing import Any, Dict, Optional, Type
4
+ from typing import Any
5
5
 
6
6
  import httpx
7
7
  from pydantic import BaseModel
@@ -32,16 +32,16 @@ class VeniceAudioTool(VeniceAudioBaseTool):
32
32
  "Requires input text. Optional parameters include speed (0.25-4.0, default 1.0) "
33
33
  "and audio format (mp3, opus, aac, flac, wav, pcm, default mp3)."
34
34
  )
35
- args_schema: Type[BaseModel] = VeniceAudioInput
35
+ args_schema: type[BaseModel] = VeniceAudioInput
36
36
 
37
37
  async def _arun(
38
38
  self,
39
39
  voice_input: str,
40
40
  voice_model: str,
41
- speed: Optional[float] = 1.0,
42
- response_format: Optional[AllowedAudioFormat] = "mp3",
41
+ speed: float | None = 1.0,
42
+ response_format: AllowedAudioFormat | None = "mp3",
43
43
  **kwargs, # type: ignore
44
- ) -> Dict[str, Any]:
44
+ ) -> dict[str, Any]:
45
45
  """
46
46
  Generates audio using the configured voice model via Venice AI TTS /audio/speech endpoint.
47
47
  Stores the resulting audio using the generic S3 helper.
@@ -92,7 +92,7 @@ class VeniceAudioTool(VeniceAudioBaseTool):
92
92
  await self.apply_rate_limit(context)
93
93
 
94
94
  # --- Prepare API Call ---
95
- payload: Dict[str, Any] = {
95
+ payload: dict[str, Any] = {
96
96
  "model": tts_model_id,
97
97
  "input": voice_input,
98
98
  "voice": voice_model,
@@ -1,5 +1,5 @@
1
1
  import logging
2
- from typing import NotRequired, Optional, TypedDict
2
+ from typing import NotRequired, TypedDict
3
3
 
4
4
  from intentkit.skills.base import (
5
5
  SkillConfig,
@@ -61,12 +61,12 @@ class Config(SkillConfig):
61
61
  enabled: bool # Keep standard enabled flag
62
62
  states: SkillStates
63
63
  api_key_provider: str = "agent_owner"
64
- api_key: NotRequired[Optional[str]] # Explicitly Optional
64
+ api_key: NotRequired[str | None] # Explicitly Optional
65
65
  safe_mode: NotRequired[bool] # Defaults handled in base or usage
66
66
  hide_watermark: NotRequired[bool] # Defaults handled in base or usage
67
67
  negative_prompt: NotRequired[str] # Defaults handled in base or usage
68
- rate_limit_number: NotRequired[Optional[int]] # Explicitly Optional
69
- rate_limit_minutes: NotRequired[Optional[int]] # Explicitly Optional
68
+ rate_limit_number: NotRequired[int | None] # Explicitly Optional
69
+ rate_limit_minutes: NotRequired[int | None] # Explicitly Optional
70
70
 
71
71
 
72
72
  _SKILL_NAME_TO_CLASS_MAP: dict[str, type[VeniceImageBaseTool]] = {
@@ -122,7 +122,7 @@ async def get_skills(
122
122
  def get_venice_image_skill(
123
123
  name: str,
124
124
  config: "Config",
125
- ) -> Optional[VeniceImageBaseTool]:
125
+ ) -> VeniceImageBaseTool | None:
126
126
  """
127
127
  Factory function to get a cached Venice Image skill instance by name.
128
128