intentkit 0.8.16.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.
- intentkit/__init__.py +1 -1
- intentkit/abstracts/agent.py +4 -5
- intentkit/abstracts/engine.py +5 -5
- intentkit/abstracts/graph.py +6 -5
- intentkit/abstracts/skill.py +5 -5
- intentkit/abstracts/twitter.py +4 -5
- intentkit/clients/cdp.py +19 -77
- intentkit/clients/twitter.py +26 -34
- intentkit/clients/web3.py +1 -3
- intentkit/config/config.py +4 -0
- intentkit/core/agent.py +15 -15
- intentkit/core/asset.py +1 -2
- intentkit/core/client.py +1 -1
- intentkit/core/credit.py +19 -20
- intentkit/core/engine.py +2 -4
- intentkit/core/node.py +2 -1
- intentkit/core/prompt.py +3 -4
- intentkit/core/scheduler.py +1 -1
- intentkit/core/statistics.py +6 -7
- intentkit/models/agent.py +125 -92
- intentkit/models/agent_data.py +62 -36
- intentkit/models/app_setting.py +6 -6
- intentkit/models/chat.py +27 -24
- intentkit/models/conversation.py +8 -8
- intentkit/models/credit.py +62 -64
- intentkit/models/db.py +8 -7
- intentkit/models/db_mig.py +2 -2
- intentkit/models/llm.py +12 -14
- intentkit/models/redis.py +2 -3
- intentkit/models/skill.py +25 -27
- intentkit/models/skills.csv +29 -28
- intentkit/models/user.py +21 -22
- intentkit/skills/acolyt/ask.py +3 -4
- intentkit/skills/acolyt/base.py +1 -3
- intentkit/skills/aixbt/base.py +1 -3
- intentkit/skills/aixbt/projects.py +13 -13
- intentkit/skills/allora/base.py +1 -3
- intentkit/skills/allora/price.py +2 -3
- intentkit/skills/base.py +15 -22
- intentkit/skills/basename/__init__.py +3 -5
- intentkit/skills/carv/__init__.py +7 -8
- intentkit/skills/carv/base.py +6 -6
- intentkit/skills/carv/fetch_news.py +3 -3
- intentkit/skills/carv/onchain_query.py +4 -4
- intentkit/skills/carv/token_info_and_price.py +5 -5
- intentkit/skills/casino/base.py +1 -3
- intentkit/skills/casino/deck_draw.py +1 -2
- intentkit/skills/casino/deck_shuffle.py +1 -2
- intentkit/skills/casino/dice_roll.py +1 -2
- intentkit/skills/cdp/__init__.py +3 -5
- intentkit/skills/cdp/base.py +1 -3
- intentkit/skills/chainlist/base.py +1 -3
- intentkit/skills/chainlist/chain_lookup.py +18 -18
- intentkit/skills/common/base.py +1 -3
- intentkit/skills/common/current_time.py +1 -2
- intentkit/skills/cookiefun/base.py +1 -2
- intentkit/skills/cookiefun/get_account_details.py +7 -7
- intentkit/skills/cookiefun/get_account_feed.py +19 -19
- intentkit/skills/cookiefun/get_account_smart_followers.py +7 -7
- intentkit/skills/cookiefun/get_sectors.py +3 -3
- intentkit/skills/cookiefun/search_accounts.py +9 -9
- intentkit/skills/cryptocompare/api.py +2 -3
- intentkit/skills/cryptocompare/base.py +6 -6
- intentkit/skills/cryptocompare/fetch_news.py +3 -4
- intentkit/skills/cryptocompare/fetch_price.py +5 -6
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +3 -4
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +3 -4
- intentkit/skills/cryptocompare/fetch_top_volume.py +3 -4
- intentkit/skills/cryptocompare/fetch_trading_signals.py +4 -5
- intentkit/skills/cryptopanic/__init__.py +4 -4
- intentkit/skills/cryptopanic/base.py +1 -3
- intentkit/skills/cryptopanic/fetch_crypto_news.py +3 -5
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +3 -3
- intentkit/skills/dapplooker/base.py +1 -3
- intentkit/skills/dapplooker/dapplooker_token_data.py +7 -7
- intentkit/skills/defillama/api.py +6 -9
- intentkit/skills/defillama/base.py +5 -6
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +6 -8
- intentkit/skills/defillama/coins/fetch_block.py +4 -6
- intentkit/skills/defillama/coins/fetch_current_prices.py +6 -8
- intentkit/skills/defillama/coins/fetch_first_price.py +5 -7
- intentkit/skills/defillama/coins/fetch_historical_prices.py +7 -9
- intentkit/skills/defillama/coins/fetch_price_chart.py +7 -9
- intentkit/skills/defillama/coins/fetch_price_percentage.py +5 -7
- intentkit/skills/defillama/config/chains.py +1 -3
- intentkit/skills/defillama/fees/fetch_fees_overview.py +22 -24
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +14 -16
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +6 -8
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +3 -5
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +5 -7
- intentkit/skills/defillama/tests/api_integration.test.py +1 -1
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +2 -4
- intentkit/skills/defillama/tvl/fetch_chains.py +7 -9
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +2 -4
- intentkit/skills/defillama/tvl/fetch_protocol.py +30 -36
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +1 -3
- intentkit/skills/defillama/tvl/fetch_protocols.py +35 -43
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +40 -46
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +33 -35
- intentkit/skills/defillama/volumes/fetch_options_overview.py +22 -26
- intentkit/skills/defillama/yields/fetch_pool_chart.py +8 -10
- intentkit/skills/defillama/yields/fetch_pools.py +24 -28
- intentkit/skills/dexscreener/__init__.py +2 -2
- intentkit/skills/dexscreener/base.py +3 -3
- intentkit/skills/dexscreener/get_pair_info.py +2 -2
- intentkit/skills/dexscreener/get_token_pairs.py +2 -2
- intentkit/skills/dexscreener/get_tokens_info.py +5 -5
- intentkit/skills/dexscreener/model/search_token_response.py +80 -82
- intentkit/skills/dexscreener/search_token.py +182 -182
- intentkit/skills/dexscreener/utils.py +15 -14
- intentkit/skills/dune_analytics/__init__.py +4 -4
- intentkit/skills/dune_analytics/base.py +1 -3
- intentkit/skills/dune_analytics/fetch_kol_buys.py +4 -4
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +5 -5
- intentkit/skills/elfa/base.py +1 -3
- intentkit/skills/elfa/mention.py +19 -21
- intentkit/skills/elfa/stats.py +4 -4
- intentkit/skills/elfa/tokens.py +12 -12
- intentkit/skills/elfa/utils.py +25 -27
- intentkit/skills/enso/__init__.py +2 -2
- intentkit/skills/enso/base.py +5 -8
- intentkit/skills/enso/best_yield.py +4 -6
- intentkit/skills/enso/networks.py +1 -2
- intentkit/skills/enso/prices.py +1 -3
- intentkit/skills/enso/route.py +1 -3
- intentkit/skills/enso/tokens.py +1 -3
- intentkit/skills/enso/wallet.py +5 -5
- intentkit/skills/erc20/__init__.py +4 -6
- intentkit/skills/erc721/__init__.py +4 -6
- intentkit/skills/firecrawl/base.py +1 -3
- intentkit/skills/firecrawl/clear.py +1 -2
- intentkit/skills/firecrawl/crawl.py +9 -10
- intentkit/skills/firecrawl/query.py +1 -2
- intentkit/skills/firecrawl/scrape.py +7 -8
- intentkit/skills/firecrawl/utils.py +13 -13
- intentkit/skills/github/base.py +1 -3
- intentkit/skills/github/github_search.py +1 -2
- intentkit/skills/heurist/base.py +1 -3
- intentkit/skills/heurist/image_generation_animagine_xl.py +7 -8
- intentkit/skills/heurist/image_generation_arthemy_comics.py +7 -8
- intentkit/skills/heurist/image_generation_arthemy_real.py +7 -8
- intentkit/skills/heurist/image_generation_braindance.py +7 -8
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +7 -8
- intentkit/skills/heurist/image_generation_flux_1_dev.py +7 -8
- intentkit/skills/heurist/image_generation_sdxl.py +7 -8
- intentkit/skills/http/base.py +1 -3
- intentkit/skills/http/get.py +7 -7
- intentkit/skills/http/post.py +9 -9
- intentkit/skills/http/put.py +9 -9
- intentkit/skills/lifi/__init__.py +4 -4
- intentkit/skills/lifi/base.py +1 -3
- intentkit/skills/lifi/token_execute.py +13 -13
- intentkit/skills/lifi/token_quote.py +6 -6
- intentkit/skills/lifi/utils.py +16 -16
- intentkit/skills/moralis/__init__.py +3 -3
- intentkit/skills/moralis/api.py +6 -7
- intentkit/skills/moralis/base.py +2 -4
- intentkit/skills/moralis/fetch_chain_portfolio.py +10 -11
- intentkit/skills/moralis/fetch_nft_portfolio.py +22 -22
- intentkit/skills/moralis/fetch_solana_portfolio.py +11 -12
- intentkit/skills/moralis/fetch_wallet_portfolio.py +8 -9
- intentkit/skills/morpho/__init__.py +4 -6
- intentkit/skills/nation/__init__.py +2 -2
- intentkit/skills/nation/base.py +1 -3
- intentkit/skills/nation/nft_check.py +3 -4
- intentkit/skills/onchain.py +2 -6
- intentkit/skills/openai/base.py +1 -3
- intentkit/skills/openai/dalle_image_generation.py +1 -3
- intentkit/skills/openai/gpt_image_generation.py +2 -3
- intentkit/skills/openai/gpt_image_to_image.py +2 -3
- intentkit/skills/openai/image_to_text.py +1 -2
- intentkit/skills/portfolio/base.py +6 -6
- intentkit/skills/portfolio/token_balances.py +21 -21
- intentkit/skills/portfolio/wallet_approvals.py +7 -7
- intentkit/skills/portfolio/wallet_defi_positions.py +3 -3
- intentkit/skills/portfolio/wallet_history.py +21 -21
- intentkit/skills/portfolio/wallet_net_worth.py +13 -13
- intentkit/skills/portfolio/wallet_nfts.py +19 -19
- intentkit/skills/portfolio/wallet_profitability.py +7 -7
- intentkit/skills/portfolio/wallet_profitability_summary.py +5 -5
- intentkit/skills/portfolio/wallet_stats.py +3 -3
- intentkit/skills/portfolio/wallet_swaps.py +19 -19
- intentkit/skills/pyth/__init__.py +3 -5
- intentkit/skills/slack/base.py +2 -4
- intentkit/skills/slack/get_channel.py +8 -8
- intentkit/skills/slack/get_message.py +9 -9
- intentkit/skills/slack/schedule_message.py +5 -5
- intentkit/skills/slack/send_message.py +3 -5
- intentkit/skills/supabase/base.py +1 -3
- intentkit/skills/supabase/delete_data.py +4 -4
- intentkit/skills/supabase/fetch_data.py +12 -12
- intentkit/skills/supabase/insert_data.py +4 -4
- intentkit/skills/supabase/invoke_function.py +6 -6
- intentkit/skills/supabase/update_data.py +6 -6
- intentkit/skills/supabase/upsert_data.py +4 -4
- intentkit/skills/superfluid/__init__.py +4 -6
- intentkit/skills/system/add_autonomous_task.py +8 -10
- intentkit/skills/system/edit_autonomous_task.py +12 -14
- intentkit/skills/system/list_autonomous_tasks.py +1 -3
- intentkit/skills/tavily/base.py +1 -3
- intentkit/skills/tavily/tavily_extract.py +1 -2
- intentkit/skills/tavily/tavily_search.py +1 -3
- intentkit/skills/token/base.py +5 -5
- intentkit/skills/token/erc20_transfers.py +19 -19
- intentkit/skills/token/token_analytics.py +3 -3
- intentkit/skills/token/token_price.py +13 -13
- intentkit/skills/token/token_search.py +9 -9
- intentkit/skills/twitter/base.py +3 -4
- intentkit/skills/twitter/follow_user.py +1 -2
- intentkit/skills/twitter/get_mentions.py +3 -4
- intentkit/skills/twitter/get_timeline.py +1 -2
- intentkit/skills/twitter/get_user_by_username.py +1 -2
- intentkit/skills/twitter/get_user_tweets.py +2 -3
- intentkit/skills/twitter/like_tweet.py +1 -2
- intentkit/skills/twitter/post_tweet.py +3 -4
- intentkit/skills/twitter/reply_tweet.py +3 -4
- intentkit/skills/twitter/retweet.py +1 -2
- intentkit/skills/twitter/search_tweets.py +1 -2
- intentkit/skills/unrealspeech/base.py +1 -3
- intentkit/skills/unrealspeech/text_to_speech.py +8 -8
- intentkit/skills/venice_audio/__init__.py +8 -9
- intentkit/skills/venice_audio/base.py +3 -4
- intentkit/skills/venice_audio/input.py +41 -41
- intentkit/skills/venice_audio/venice_audio.py +6 -6
- intentkit/skills/venice_image/__init__.py +5 -5
- intentkit/skills/venice_image/api.py +138 -138
- intentkit/skills/venice_image/base.py +3 -3
- intentkit/skills/venice_image/config.py +33 -35
- intentkit/skills/venice_image/image_enhance/image_enhance.py +2 -3
- intentkit/skills/venice_image/image_enhance/image_enhance_base.py +21 -23
- intentkit/skills/venice_image/image_enhance/image_enhance_input.py +38 -40
- intentkit/skills/venice_image/image_generation/image_generation_base.py +9 -9
- intentkit/skills/venice_image/image_generation/image_generation_fluently_xl.py +26 -26
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev.py +27 -27
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +26 -26
- intentkit/skills/venice_image/image_generation/image_generation_input.py +158 -158
- intentkit/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +26 -26
- intentkit/skills/venice_image/image_generation/image_generation_pony_realism.py +26 -26
- intentkit/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +28 -28
- intentkit/skills/venice_image/image_generation/image_generation_venice_sd35.py +28 -28
- intentkit/skills/venice_image/image_upscale/image_upscale.py +3 -3
- intentkit/skills/venice_image/image_upscale/image_upscale_base.py +21 -23
- intentkit/skills/venice_image/image_upscale/image_upscale_input.py +22 -22
- intentkit/skills/venice_image/image_vision/image_vision.py +2 -2
- intentkit/skills/venice_image/image_vision/image_vision_base.py +17 -17
- intentkit/skills/venice_image/image_vision/image_vision_input.py +9 -9
- intentkit/skills/venice_image/utils.py +77 -78
- intentkit/skills/web_scraper/base.py +1 -3
- intentkit/skills/web_scraper/document_indexer.py +1 -2
- intentkit/skills/web_scraper/scrape_and_index.py +4 -5
- intentkit/skills/web_scraper/utils.py +25 -26
- intentkit/skills/web_scraper/website_indexer.py +10 -11
- intentkit/skills/weth/__init__.py +4 -6
- intentkit/skills/wow/__init__.py +4 -6
- intentkit/skills/x402/__init__.py +11 -3
- intentkit/skills/x402/ask_agent.py +12 -78
- intentkit/skills/x402/base.py +90 -0
- intentkit/skills/x402/http_request.py +117 -0
- intentkit/skills/x402/schema.json +15 -10
- intentkit/skills/xmtp/base.py +3 -3
- intentkit/skills/xmtp/price.py +2 -2
- intentkit/skills/xmtp/swap.py +2 -4
- intentkit/skills/xmtp/transfer.py +4 -6
- intentkit/utils/error.py +2 -2
- intentkit/utils/logging.py +2 -4
- intentkit/utils/s3.py +8 -9
- intentkit/utils/schema.py +5 -5
- intentkit/utils/slack_alert.py +7 -8
- {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/METADATA +3 -4
- intentkit-0.8.17.dev2.dist-info/RECORD +464 -0
- intentkit/models/generator.py +0 -347
- intentkit-0.8.16.dev1.dist-info/RECORD +0 -464
- {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/WHEEL +0 -0
- {intentkit-0.8.16.dev1.dist-info → intentkit-0.8.17.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Basename AgentKit skills."""
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import TypedDict
|
|
4
4
|
|
|
5
5
|
from coinbase_agentkit import basename_action_provider
|
|
6
6
|
|
|
7
|
+
from intentkit.models.agent import Agent
|
|
7
8
|
from intentkit.skills.base import (
|
|
8
9
|
SkillConfig,
|
|
9
10
|
SkillState,
|
|
@@ -12,9 +13,6 @@ from intentkit.skills.base import (
|
|
|
12
13
|
)
|
|
13
14
|
from intentkit.skills.basename.base import BasenameBaseTool
|
|
14
15
|
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
from intentkit.models.agent import Agent
|
|
17
|
-
|
|
18
16
|
|
|
19
17
|
class SkillStates(TypedDict):
|
|
20
18
|
BasenameActionProvider_register_basename: SkillState
|
|
@@ -30,7 +28,7 @@ async def get_skills(
|
|
|
30
28
|
config: "Config",
|
|
31
29
|
is_private: bool,
|
|
32
30
|
agent_id: str,
|
|
33
|
-
agent:
|
|
31
|
+
agent: Agent | None = None,
|
|
34
32
|
**_,
|
|
35
33
|
) -> list[BasenameBaseTool]:
|
|
36
34
|
"""Get all Basename skills."""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Literal, TypedDict
|
|
3
3
|
|
|
4
4
|
from intentkit.skills.base import SkillConfig, SkillState
|
|
5
5
|
from intentkit.skills.carv.base import CarvBaseTool
|
|
@@ -9,7 +9,6 @@ from intentkit.skills.carv.token_info_and_price import TokenInfoAndPriceTool
|
|
|
9
9
|
|
|
10
10
|
logger = logging.getLogger(__name__)
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
_cache: dict[str, CarvBaseTool] = {}
|
|
14
13
|
|
|
15
14
|
_SKILL_NAME_TO_CLASS_MAP: dict[str, type[CarvBaseTool]] = {
|
|
@@ -28,14 +27,14 @@ class SkillStates(TypedDict):
|
|
|
28
27
|
class Config(SkillConfig):
|
|
29
28
|
enabled: bool
|
|
30
29
|
states: SkillStates # type: ignore
|
|
31
|
-
api_key_provider:
|
|
30
|
+
api_key_provider: Literal["agent_owner", "platform"] | None
|
|
32
31
|
|
|
33
32
|
# conditionally required
|
|
34
|
-
api_key:
|
|
33
|
+
api_key: str | None
|
|
35
34
|
|
|
36
35
|
# optional
|
|
37
|
-
rate_limit_number:
|
|
38
|
-
rate_limit_minutes:
|
|
36
|
+
rate_limit_number: int | None
|
|
37
|
+
rate_limit_minutes: int | None
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
async def get_skills(
|
|
@@ -57,7 +56,7 @@ async def get_skills(
|
|
|
57
56
|
if not config.get("enabled", False):
|
|
58
57
|
return []
|
|
59
58
|
|
|
60
|
-
available_skills:
|
|
59
|
+
available_skills: list[CarvBaseTool] = []
|
|
61
60
|
skill_states = config.get("states", {})
|
|
62
61
|
|
|
63
62
|
# Iterate through all known skills defined in the map
|
|
@@ -81,7 +80,7 @@ async def get_skills(
|
|
|
81
80
|
|
|
82
81
|
def get_carv_skill(
|
|
83
82
|
name: str,
|
|
84
|
-
) ->
|
|
83
|
+
) -> CarvBaseTool | None:
|
|
85
84
|
"""
|
|
86
85
|
Factory function to retrieve a cached CARV skill instance by name.
|
|
87
86
|
|
intentkit/skills/carv/base.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx # Ensure httpx is installed: pip install httpx
|
|
5
5
|
from langchain_core.tools.base import ToolException
|
|
@@ -18,7 +18,7 @@ class CarvBaseTool(IntentKitSkill):
|
|
|
18
18
|
|
|
19
19
|
name: str = Field(description="Tool name") # type: ignore
|
|
20
20
|
description: str = Field(description="Tool description")
|
|
21
|
-
args_schema:
|
|
21
|
+
args_schema: type[BaseModel] # type: ignore
|
|
22
22
|
|
|
23
23
|
@property
|
|
24
24
|
def category(self) -> str:
|
|
@@ -39,7 +39,7 @@ class CarvBaseTool(IntentKitSkill):
|
|
|
39
39
|
skill_config = context.agent.skill_config(self.category)
|
|
40
40
|
api_key_provider = skill_config.get("api_key_provider")
|
|
41
41
|
if api_key_provider == "agent_owner":
|
|
42
|
-
agent_api_key:
|
|
42
|
+
agent_api_key: str | None = skill_config.get("api_key")
|
|
43
43
|
if agent_api_key:
|
|
44
44
|
logger.debug(
|
|
45
45
|
f"Using agent-specific CARV API key for skill {self.name} in category {self.category}"
|
|
@@ -102,9 +102,9 @@ class CarvBaseTool(IntentKitSkill):
|
|
|
102
102
|
context,
|
|
103
103
|
endpoint: str,
|
|
104
104
|
method: str = "GET",
|
|
105
|
-
params:
|
|
106
|
-
payload:
|
|
107
|
-
) ->
|
|
105
|
+
params: dict[str, Any] | None = None,
|
|
106
|
+
payload: dict[str, Any] | None = None,
|
|
107
|
+
) -> tuple[dict[str, Any] | None, dict[str, Any] | None]:
|
|
108
108
|
"""
|
|
109
109
|
Makes a call to the CARV API and returns a tuple of (success, error).
|
|
110
110
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel
|
|
5
5
|
|
|
@@ -29,12 +29,12 @@ class FetchNewsTool(CarvBaseTool):
|
|
|
29
29
|
"Fetches the latest news articles from the CARV API. "
|
|
30
30
|
"Returns a list of news items, each with a title, URL, and a short summary (card_text)."
|
|
31
31
|
)
|
|
32
|
-
args_schema:
|
|
32
|
+
args_schema: type[BaseModel] = CarvNewsInput
|
|
33
33
|
|
|
34
34
|
async def _arun(
|
|
35
35
|
self, # type: ignore
|
|
36
36
|
**kwargs: Any,
|
|
37
|
-
) ->
|
|
37
|
+
) -> dict[str, Any]:
|
|
38
38
|
"""
|
|
39
39
|
Fetches news from the CARV API and returns the response.
|
|
40
40
|
The expected successful response structure is a dictionary containing an "infos" key,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from decimal import Decimal, InvalidOperation
|
|
3
|
-
from typing import Any,
|
|
3
|
+
from typing import Any, Literal
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
6
6
|
|
|
@@ -58,14 +58,14 @@ class OnchainQueryTool(CarvBaseTool):
|
|
|
58
58
|
"- ETH values are denominated in 18 decimals—consider 10^18 when interpreting amounts.\n"
|
|
59
59
|
"- Never fabricate or infer data beyond what the tool provides."
|
|
60
60
|
)
|
|
61
|
-
args_schema:
|
|
61
|
+
args_schema: type[BaseModel] = CarvInput
|
|
62
62
|
|
|
63
63
|
async def _arun(
|
|
64
64
|
self,
|
|
65
65
|
question: str,
|
|
66
66
|
chain: str, # type: ignore
|
|
67
67
|
**kwargs: Any,
|
|
68
|
-
) ->
|
|
68
|
+
) -> dict[str, Any]:
|
|
69
69
|
"""
|
|
70
70
|
Queries the CARV SQL Query API and returns the response.
|
|
71
71
|
"""
|
|
@@ -104,7 +104,7 @@ class OnchainQueryTool(CarvBaseTool):
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
def _normalize_unit(response_data:
|
|
107
|
+
def _normalize_unit(response_data: dict[str, Any], chain: str) -> None:
|
|
108
108
|
"""
|
|
109
109
|
Normalizes the 'value' field in on-chain response data to a human-readable format.
|
|
110
110
|
Adds the corresponding token ticker after the value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import re
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ class TokenInfoAndPriceInput(BaseModel):
|
|
|
16
16
|
token_name: str = Field(
|
|
17
17
|
description="The token name (e.g ethereum, bitcoin, solana, ripple)"
|
|
18
18
|
)
|
|
19
|
-
amount:
|
|
19
|
+
amount: float | None = Field(
|
|
20
20
|
description="(optional) amount of token, fill this if user asking for how much x amount of specific token worth"
|
|
21
21
|
)
|
|
22
22
|
|
|
@@ -38,15 +38,15 @@ class TokenInfoAndPriceTool(CarvBaseTool):
|
|
|
38
38
|
"Useful for understanding a token's identity, ecosystem, and market value"
|
|
39
39
|
"Use this tool when you need comprehensive token data and live pricing from CARV."
|
|
40
40
|
)
|
|
41
|
-
args_schema:
|
|
41
|
+
args_schema: type[BaseModel] = TokenInfoAndPriceInput
|
|
42
42
|
|
|
43
43
|
async def _arun(
|
|
44
44
|
self,
|
|
45
45
|
ticker: str,
|
|
46
46
|
token_name: str,
|
|
47
|
-
amount:
|
|
47
|
+
amount: float | None = 1, # type: ignore
|
|
48
48
|
**kwargs: Any,
|
|
49
|
-
) ->
|
|
49
|
+
) -> dict[str, Any]:
|
|
50
50
|
if not ticker:
|
|
51
51
|
return {
|
|
52
52
|
"error": True,
|
intentkit/skills/casino/base.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Base class for Casino tools."""
|
|
2
2
|
|
|
3
|
-
from typing import Type
|
|
4
|
-
|
|
5
3
|
from pydantic import BaseModel, Field
|
|
6
4
|
|
|
7
5
|
from intentkit.skills.base import IntentKitSkill
|
|
@@ -12,7 +10,7 @@ class CasinoBaseTool(IntentKitSkill):
|
|
|
12
10
|
|
|
13
11
|
name: str = Field(description="The name of the tool")
|
|
14
12
|
description: str = Field(description="A description of what the tool does")
|
|
15
|
-
args_schema:
|
|
13
|
+
args_schema: type[BaseModel]
|
|
16
14
|
|
|
17
15
|
@property
|
|
18
16
|
def category(self) -> str:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Card drawing skill using Deck of Cards API."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
from typing import Type
|
|
5
4
|
|
|
6
5
|
try:
|
|
7
6
|
import httpx
|
|
@@ -49,7 +48,7 @@ class CasinoDeckDraw(CasinoBaseTool):
|
|
|
49
48
|
|
|
50
49
|
name: str = NAME
|
|
51
50
|
description: str = PROMPT
|
|
52
|
-
args_schema:
|
|
51
|
+
args_schema: type[BaseModel] = CasinoDeckDrawInput
|
|
53
52
|
|
|
54
53
|
async def _arun(self, count: int = 1, **kwargs) -> dict:
|
|
55
54
|
try:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Deck shuffling skill using Deck of Cards API."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
from typing import Type
|
|
5
4
|
|
|
6
5
|
try:
|
|
7
6
|
import httpx
|
|
@@ -53,7 +52,7 @@ class CasinoDeckShuffle(CasinoBaseTool):
|
|
|
53
52
|
|
|
54
53
|
name: str = NAME
|
|
55
54
|
description: str = PROMPT
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = CasinoDeckShuffleInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self, deck_count: int = 1, jokers_enabled: bool = False, **kwargs
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Quantum dice rolling skill using QRandom API."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
from typing import Type
|
|
5
4
|
|
|
6
5
|
try:
|
|
7
6
|
import httpx
|
|
@@ -48,7 +47,7 @@ class CasinoDiceRoll(CasinoBaseTool):
|
|
|
48
47
|
|
|
49
48
|
name: str = NAME
|
|
50
49
|
description: str = PROMPT
|
|
51
|
-
args_schema:
|
|
50
|
+
args_schema: type[BaseModel] = CasinoDiceRollInput
|
|
52
51
|
|
|
53
52
|
async def _arun(self, dice_count: int = 1, **kwargs) -> dict:
|
|
54
53
|
try:
|
intentkit/skills/cdp/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""CDP wallet interaction skills."""
|
|
2
2
|
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import TypedDict
|
|
4
4
|
|
|
5
5
|
from coinbase_agentkit import (
|
|
6
6
|
cdp_api_action_provider,
|
|
@@ -8,6 +8,7 @@ from coinbase_agentkit import (
|
|
|
8
8
|
wallet_action_provider,
|
|
9
9
|
)
|
|
10
10
|
|
|
11
|
+
from intentkit.models.agent import Agent
|
|
11
12
|
from intentkit.skills.base import (
|
|
12
13
|
SkillConfig,
|
|
13
14
|
SkillState,
|
|
@@ -16,9 +17,6 @@ from intentkit.skills.base import (
|
|
|
16
17
|
)
|
|
17
18
|
from intentkit.skills.cdp.base import CDPBaseTool
|
|
18
19
|
|
|
19
|
-
if TYPE_CHECKING:
|
|
20
|
-
from intentkit.models.agent import Agent
|
|
21
|
-
|
|
22
20
|
|
|
23
21
|
class SkillStates(TypedDict):
|
|
24
22
|
WalletActionProvider_get_balance: SkillState
|
|
@@ -40,7 +38,7 @@ async def get_skills(
|
|
|
40
38
|
config: "Config",
|
|
41
39
|
is_private: bool,
|
|
42
40
|
agent_id: str,
|
|
43
|
-
agent:
|
|
41
|
+
agent: Agent | None = None,
|
|
44
42
|
**_,
|
|
45
43
|
) -> list[CDPBaseTool]:
|
|
46
44
|
"""Get all CDP skills.
|
intentkit/skills/cdp/base.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import Type
|
|
2
|
-
|
|
3
1
|
from pydantic import BaseModel, Field
|
|
4
2
|
|
|
5
3
|
from intentkit.skills.base import IntentKitSkill
|
|
@@ -10,7 +8,7 @@ class CDPBaseTool(IntentKitSkill):
|
|
|
10
8
|
|
|
11
9
|
name: str = Field(description="The name of the tool")
|
|
12
10
|
description: str = Field(description="A description of what the tool does")
|
|
13
|
-
args_schema:
|
|
11
|
+
args_schema: type[BaseModel]
|
|
14
12
|
|
|
15
13
|
@property
|
|
16
14
|
def category(self) -> str:
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import Type
|
|
2
|
-
|
|
3
1
|
from pydantic import BaseModel, Field
|
|
4
2
|
|
|
5
3
|
from intentkit.skills.base import IntentKitSkill
|
|
@@ -10,7 +8,7 @@ class ChainlistBaseTool(IntentKitSkill):
|
|
|
10
8
|
|
|
11
9
|
name: str = Field(description="The name of the tool")
|
|
12
10
|
description: str = Field(description="A description of what the tool does")
|
|
13
|
-
args_schema:
|
|
11
|
+
args_schema: type[BaseModel]
|
|
14
12
|
|
|
15
13
|
@property
|
|
16
14
|
def category(self) -> str:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
@@ -12,19 +12,19 @@ logger = logging.getLogger(__name__)
|
|
|
12
12
|
class ChainLookupInput(BaseModel):
|
|
13
13
|
"""Input for ChainLookup tool."""
|
|
14
14
|
|
|
15
|
-
search_term:
|
|
15
|
+
search_term: str | None = Field(
|
|
16
16
|
description="Term to search for (chain name, symbol, or chain ID)",
|
|
17
17
|
default=None,
|
|
18
18
|
)
|
|
19
|
-
chain_id:
|
|
19
|
+
chain_id: int | None = Field(
|
|
20
20
|
description="Specific chain ID to look up",
|
|
21
21
|
default=None,
|
|
22
22
|
)
|
|
23
|
-
no_tracking:
|
|
23
|
+
no_tracking: bool | None = Field(
|
|
24
24
|
description="Whether to return only RPC endpoints with no tracking",
|
|
25
25
|
default=False,
|
|
26
26
|
)
|
|
27
|
-
limit:
|
|
27
|
+
limit: int | None = Field(
|
|
28
28
|
description="Limit the number of results returned",
|
|
29
29
|
default=5,
|
|
30
30
|
)
|
|
@@ -38,7 +38,7 @@ class ChainLookup(ChainlistBaseTool):
|
|
|
38
38
|
"Look up blockchain RPC endpoints and details by chain name, symbol, or chain ID.\n"
|
|
39
39
|
"Returns information about blockchains including RPC endpoints, native currency, and explorers."
|
|
40
40
|
)
|
|
41
|
-
args_schema:
|
|
41
|
+
args_schema: type[BaseModel] = ChainLookupInput
|
|
42
42
|
|
|
43
43
|
def _normalize_text(self, text: str) -> str:
|
|
44
44
|
"""Normalize text for searching (lowercase, remove spaces)."""
|
|
@@ -46,7 +46,7 @@ class ChainLookup(ChainlistBaseTool):
|
|
|
46
46
|
return ""
|
|
47
47
|
return text.lower().strip()
|
|
48
48
|
|
|
49
|
-
async def _fetch_chains_data(self) ->
|
|
49
|
+
async def _fetch_chains_data(self) -> list[dict[str, Any]]:
|
|
50
50
|
"""Fetch chains data from Chainlist API."""
|
|
51
51
|
chainlist_api_url = "https://chainlist.org/rpcs.json"
|
|
52
52
|
|
|
@@ -57,12 +57,12 @@ class ChainLookup(ChainlistBaseTool):
|
|
|
57
57
|
|
|
58
58
|
def _filter_chains(
|
|
59
59
|
self,
|
|
60
|
-
chains:
|
|
61
|
-
search_term:
|
|
62
|
-
chain_id:
|
|
60
|
+
chains: list[dict[str, Any]],
|
|
61
|
+
search_term: str | None = None,
|
|
62
|
+
chain_id: int | None = None,
|
|
63
63
|
no_tracking: bool = False,
|
|
64
64
|
limit: int = 5,
|
|
65
|
-
) ->
|
|
65
|
+
) -> list[dict[str, Any]]:
|
|
66
66
|
"""Filter chains based on search criteria."""
|
|
67
67
|
filtered_chains = chains
|
|
68
68
|
|
|
@@ -118,7 +118,7 @@ class ChainLookup(ChainlistBaseTool):
|
|
|
118
118
|
|
|
119
119
|
return filtered_chains
|
|
120
120
|
|
|
121
|
-
def _format_chain(self, chain:
|
|
121
|
+
def _format_chain(self, chain: dict[str, Any]) -> dict[str, Any]:
|
|
122
122
|
"""Format a chain entry for response."""
|
|
123
123
|
# Format RPC endpoints
|
|
124
124
|
formatted_rpcs = []
|
|
@@ -155,13 +155,13 @@ class ChainLookup(ChainlistBaseTool):
|
|
|
155
155
|
|
|
156
156
|
async def _arun(
|
|
157
157
|
self,
|
|
158
|
-
search_term:
|
|
159
|
-
chain_id:
|
|
160
|
-
no_tracking:
|
|
161
|
-
limit:
|
|
162
|
-
config:
|
|
158
|
+
search_term: str | None = None,
|
|
159
|
+
chain_id: int | None = None,
|
|
160
|
+
no_tracking: bool | None = False,
|
|
161
|
+
limit: int | None = 5,
|
|
162
|
+
config: Any | None = None,
|
|
163
163
|
**kwargs,
|
|
164
|
-
) ->
|
|
164
|
+
) -> dict:
|
|
165
165
|
"""Lookup blockchain RPC endpoints from Chainlist."""
|
|
166
166
|
if not search_term and not chain_id:
|
|
167
167
|
return {
|
intentkit/skills/common/base.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import Type
|
|
2
|
-
|
|
3
1
|
from pydantic import BaseModel, Field
|
|
4
2
|
|
|
5
3
|
from intentkit.skills.base import IntentKitSkill
|
|
@@ -10,7 +8,7 @@ class CommonBaseTool(IntentKitSkill):
|
|
|
10
8
|
|
|
11
9
|
name: str = Field(description="The name of the tool")
|
|
12
10
|
description: str = Field(description="A description of what the tool does")
|
|
13
|
-
args_schema:
|
|
11
|
+
args_schema: type[BaseModel]
|
|
14
12
|
|
|
15
13
|
@property
|
|
16
14
|
def category(self) -> str:
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Type
|
|
4
3
|
|
|
5
4
|
import pytz
|
|
6
5
|
from pydantic import BaseModel, Field
|
|
@@ -36,7 +35,7 @@ class CurrentTime(CommonBaseTool):
|
|
|
36
35
|
"Get the current time, converted to a specified timezone.\n"
|
|
37
36
|
"You must call this tool whenever the user asks for the time."
|
|
38
37
|
)
|
|
39
|
-
args_schema:
|
|
38
|
+
args_schema: type[BaseModel] = CurrentTimeInput
|
|
40
39
|
|
|
41
40
|
async def _arun(self, timezone: str, **kwargs) -> str:
|
|
42
41
|
"""Implementation of the tool to get the current time.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Type
|
|
3
2
|
|
|
4
3
|
from langchain_core.tools.base import ToolException
|
|
5
4
|
from pydantic import BaseModel, Field
|
|
@@ -14,7 +13,7 @@ class CookieFunBaseTool(IntentKitSkill):
|
|
|
14
13
|
|
|
15
14
|
name: str = Field(description="The name of the tool")
|
|
16
15
|
description: str = Field(description="A description of what the tool does")
|
|
17
|
-
args_schema:
|
|
16
|
+
args_schema: type[BaseModel]
|
|
18
17
|
|
|
19
18
|
@property
|
|
20
19
|
def category(self) -> str:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any
|
|
1
|
+
from typing import Any
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from pydantic import BaseModel, Field
|
|
@@ -10,12 +10,12 @@ from intentkit.skills.cookiefun.constants import DEFAULT_HEADERS, ENDPOINTS
|
|
|
10
10
|
class GetAccountDetailsInput(BaseModel):
|
|
11
11
|
"""Input for GetAccountDetails tool."""
|
|
12
12
|
|
|
13
|
-
username:
|
|
13
|
+
username: str | None = Field(
|
|
14
14
|
default=None,
|
|
15
15
|
description="Twitter username (either username or userId is required)",
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
userId:
|
|
18
|
+
userId: str | None = Field(
|
|
19
19
|
default=None,
|
|
20
20
|
description="Twitter user ID (either username or userId is required)",
|
|
21
21
|
)
|
|
@@ -26,14 +26,14 @@ class GetAccountDetails(CookieFunBaseTool):
|
|
|
26
26
|
|
|
27
27
|
name: str = "cookiefun_get_account_details"
|
|
28
28
|
description: str = "Retrieves detailed information about a Twitter account including followers, following, posts, metrics, and engagement data."
|
|
29
|
-
args_schema:
|
|
29
|
+
args_schema: type[BaseModel] = GetAccountDetailsInput
|
|
30
30
|
|
|
31
31
|
async def _arun(
|
|
32
32
|
self,
|
|
33
|
-
username:
|
|
34
|
-
userId:
|
|
33
|
+
username: str | None = None,
|
|
34
|
+
userId: str | None = None,
|
|
35
35
|
**kwargs,
|
|
36
|
-
) ->
|
|
36
|
+
) -> dict[str, Any] | str:
|
|
37
37
|
"""
|
|
38
38
|
Get detailed information about a Twitter account.
|
|
39
39
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from enum import IntEnum
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
@@ -33,42 +33,42 @@ class SortOrder(IntEnum):
|
|
|
33
33
|
class GetAccountFeedInput(BaseModel):
|
|
34
34
|
"""Input for GetAccountFeed tool."""
|
|
35
35
|
|
|
36
|
-
username:
|
|
36
|
+
username: str | None = Field(
|
|
37
37
|
default=None,
|
|
38
38
|
description="Twitter username (either username or userId is required)",
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
-
userId:
|
|
41
|
+
userId: str | None = Field(
|
|
42
42
|
default=None,
|
|
43
43
|
description="Twitter user ID (either username or userId is required)",
|
|
44
44
|
)
|
|
45
45
|
|
|
46
|
-
startDate:
|
|
46
|
+
startDate: str | None = Field(
|
|
47
47
|
default=None,
|
|
48
48
|
description="Start date for filtering in format dd/mm/yyyy (default: 30 days ago)",
|
|
49
49
|
)
|
|
50
50
|
|
|
51
|
-
endDate:
|
|
51
|
+
endDate: str | None = Field(
|
|
52
52
|
default=None,
|
|
53
53
|
description="End date for filtering in format dd/mm/yyyy (default: now)",
|
|
54
54
|
)
|
|
55
55
|
|
|
56
|
-
type:
|
|
56
|
+
type: int | None = Field(
|
|
57
57
|
default=None,
|
|
58
58
|
description="Type of tweets to filter: 0 for Original, 1 for Reply, 2 for Quote (leave empty for all types)",
|
|
59
59
|
)
|
|
60
60
|
|
|
61
|
-
hasMedia:
|
|
61
|
+
hasMedia: bool | None = Field(
|
|
62
62
|
default=None,
|
|
63
63
|
description="Filter to only include tweets with media if true",
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
-
sortBy:
|
|
66
|
+
sortBy: int | None = Field(
|
|
67
67
|
default=None,
|
|
68
68
|
description="Sort by: 0 for CreatedDate, 1 for Impressions",
|
|
69
69
|
)
|
|
70
70
|
|
|
71
|
-
sortOrder:
|
|
71
|
+
sortOrder: int | None = Field(
|
|
72
72
|
default=None,
|
|
73
73
|
description="Sort order: 0 for Ascending, 1 for Descending",
|
|
74
74
|
)
|
|
@@ -79,20 +79,20 @@ class GetAccountFeed(CookieFunBaseTool):
|
|
|
79
79
|
|
|
80
80
|
name: str = "cookiefun_get_account_feed"
|
|
81
81
|
description: str = "Retrieves a list of tweets for a specific Twitter account with various filtering options."
|
|
82
|
-
args_schema:
|
|
82
|
+
args_schema: type[BaseModel] = GetAccountFeedInput
|
|
83
83
|
|
|
84
84
|
async def _arun(
|
|
85
85
|
self,
|
|
86
|
-
username:
|
|
87
|
-
userId:
|
|
88
|
-
startDate:
|
|
89
|
-
endDate:
|
|
90
|
-
type:
|
|
91
|
-
hasMedia:
|
|
92
|
-
sortBy:
|
|
93
|
-
sortOrder:
|
|
86
|
+
username: str | None = None,
|
|
87
|
+
userId: str | None = None,
|
|
88
|
+
startDate: str | None = None,
|
|
89
|
+
endDate: str | None = None,
|
|
90
|
+
type: int | None = None,
|
|
91
|
+
hasMedia: bool | None = None,
|
|
92
|
+
sortBy: int | None = None,
|
|
93
|
+
sortOrder: int | None = None,
|
|
94
94
|
**kwargs,
|
|
95
|
-
) ->
|
|
95
|
+
) -> list[dict[str, Any]] | str:
|
|
96
96
|
"""
|
|
97
97
|
Get the feed (tweets) of a Twitter account.
|
|
98
98
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any
|
|
1
|
+
from typing import Any
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from pydantic import BaseModel, Field
|
|
@@ -10,12 +10,12 @@ from intentkit.skills.cookiefun.constants import DEFAULT_HEADERS, ENDPOINTS
|
|
|
10
10
|
class GetAccountSmartFollowersInput(BaseModel):
|
|
11
11
|
"""Input for GetAccountSmartFollowers tool."""
|
|
12
12
|
|
|
13
|
-
username:
|
|
13
|
+
username: str | None = Field(
|
|
14
14
|
default=None,
|
|
15
15
|
description="Twitter username (either username or userId is required)",
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
userId:
|
|
18
|
+
userId: str | None = Field(
|
|
19
19
|
default=None,
|
|
20
20
|
description="Twitter user ID (either username or userId is required)",
|
|
21
21
|
)
|
|
@@ -26,14 +26,14 @@ class GetAccountSmartFollowers(CookieFunBaseTool):
|
|
|
26
26
|
|
|
27
27
|
name: str = "cookiefun_get_account_smart_followers"
|
|
28
28
|
description: str = "Returns a list of top smart followers for a specific Twitter account, with detailed metrics about these followers."
|
|
29
|
-
args_schema:
|
|
29
|
+
args_schema: type[BaseModel] = GetAccountSmartFollowersInput
|
|
30
30
|
|
|
31
31
|
async def _arun(
|
|
32
32
|
self,
|
|
33
|
-
username:
|
|
34
|
-
userId:
|
|
33
|
+
username: str | None = None,
|
|
34
|
+
userId: str | None = None,
|
|
35
35
|
**kwargs,
|
|
36
|
-
) ->
|
|
36
|
+
) -> list[dict[str, Any]] | str:
|
|
37
37
|
"""
|
|
38
38
|
Get smart followers for a Twitter account.
|
|
39
39
|
|