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,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Type
|
|
3
2
|
|
|
4
3
|
from pydantic import BaseModel, Field
|
|
5
4
|
|
|
@@ -37,7 +36,7 @@ class FirecrawlQueryIndexedContent(FirecrawlBaseTool):
|
|
|
37
36
|
"Use this tool to search through content that was previously scraped and indexed using Firecrawl tools.\n"
|
|
38
37
|
"This tool can help answer questions based on the indexed web content from Firecrawl scraping/crawling."
|
|
39
38
|
)
|
|
40
|
-
args_schema:
|
|
39
|
+
args_schema: type[BaseModel] = FirecrawlQueryInput
|
|
41
40
|
|
|
42
41
|
async def _arun(
|
|
43
42
|
self,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import List, Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from langchain_core.documents import Document
|
|
@@ -16,7 +15,7 @@ class FirecrawlScrapeInput(BaseModel):
|
|
|
16
15
|
url: str = Field(
|
|
17
16
|
description="The URL to scrape. Must be a valid HTTP or HTTPS URL."
|
|
18
17
|
)
|
|
19
|
-
formats:
|
|
18
|
+
formats: list[str] = Field(
|
|
20
19
|
description="Output formats to include in the response. Options: 'markdown', 'html', 'rawHtml', 'screenshot', 'links', 'json'",
|
|
21
20
|
default=["markdown"],
|
|
22
21
|
)
|
|
@@ -24,11 +23,11 @@ class FirecrawlScrapeInput(BaseModel):
|
|
|
24
23
|
description="Whether to extract only the main content (excluding headers, footers, navigation, etc.)",
|
|
25
24
|
default=True,
|
|
26
25
|
)
|
|
27
|
-
include_tags:
|
|
26
|
+
include_tags: list[str] | None = Field(
|
|
28
27
|
description="HTML tags, classes, or IDs to include in the response (e.g., ['h1', 'p', '.main-content'])",
|
|
29
28
|
default=None,
|
|
30
29
|
)
|
|
31
|
-
exclude_tags:
|
|
30
|
+
exclude_tags: list[str] | None = Field(
|
|
32
31
|
description="HTML tags, classes, or IDs to exclude from the response (e.g., ['#ad', '#footer'])",
|
|
33
32
|
default=None,
|
|
34
33
|
)
|
|
@@ -81,15 +80,15 @@ class FirecrawlScrape(FirecrawlBaseTool):
|
|
|
81
80
|
"This tool can handle JavaScript-rendered content, PDFs, and dynamic websites. "
|
|
82
81
|
"Use this when you want to refresh/update content from a URL that was previously scraped."
|
|
83
82
|
)
|
|
84
|
-
args_schema:
|
|
83
|
+
args_schema: type[BaseModel] = FirecrawlScrapeInput
|
|
85
84
|
|
|
86
85
|
async def _arun(
|
|
87
86
|
self,
|
|
88
87
|
url: str,
|
|
89
|
-
formats:
|
|
88
|
+
formats: list[str] = None,
|
|
90
89
|
only_main_content: bool = True,
|
|
91
|
-
include_tags:
|
|
92
|
-
exclude_tags:
|
|
90
|
+
include_tags: list[str] | None = None,
|
|
91
|
+
exclude_tags: list[str] | None = None,
|
|
93
92
|
wait_for: int = 0,
|
|
94
93
|
timeout: int = 30000,
|
|
95
94
|
index_content: bool = True,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import re
|
|
5
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
8
8
|
from langchain_community.vectorstores import FAISS
|
|
@@ -36,8 +36,8 @@ class FirecrawlDocumentProcessor:
|
|
|
36
36
|
|
|
37
37
|
@staticmethod
|
|
38
38
|
def split_documents(
|
|
39
|
-
documents:
|
|
40
|
-
) ->
|
|
39
|
+
documents: list[Document], chunk_size: int = 1000, chunk_overlap: int = 200
|
|
40
|
+
) -> list[Document]:
|
|
41
41
|
"""Split documents into smaller chunks for better indexing."""
|
|
42
42
|
text_splitter = RecursiveCharacterTextSplitter(
|
|
43
43
|
chunk_size=chunk_size,
|
|
@@ -63,7 +63,7 @@ class FirecrawlDocumentProcessor:
|
|
|
63
63
|
class FirecrawlVectorStoreManager:
|
|
64
64
|
"""Manages vector store operations for Firecrawl content."""
|
|
65
65
|
|
|
66
|
-
def __init__(self, embedding_api_key:
|
|
66
|
+
def __init__(self, embedding_api_key: str | None = None):
|
|
67
67
|
self._embedding_api_key = embedding_api_key
|
|
68
68
|
|
|
69
69
|
def _resolve_api_key(self) -> str:
|
|
@@ -81,7 +81,7 @@ class FirecrawlVectorStoreManager:
|
|
|
81
81
|
openai_api_key=openai_api_key, model="text-embedding-3-small"
|
|
82
82
|
)
|
|
83
83
|
|
|
84
|
-
def encode_vector_store(self, vector_store: FAISS) ->
|
|
84
|
+
def encode_vector_store(self, vector_store: FAISS) -> dict[str, str]:
|
|
85
85
|
"""Encode FAISS vector store to base64 for storage (compatible with web_scraper)."""
|
|
86
86
|
import base64
|
|
87
87
|
import os
|
|
@@ -106,7 +106,7 @@ class FirecrawlVectorStoreManager:
|
|
|
106
106
|
raise
|
|
107
107
|
|
|
108
108
|
def decode_vector_store(
|
|
109
|
-
self, encoded_files:
|
|
109
|
+
self, encoded_files: dict[str, str], embeddings: OpenAIEmbeddings
|
|
110
110
|
) -> FAISS:
|
|
111
111
|
"""Decode base64 files back to FAISS vector store (compatible with web_scraper)."""
|
|
112
112
|
import base64
|
|
@@ -131,7 +131,7 @@ class FirecrawlVectorStoreManager:
|
|
|
131
131
|
logger.error(f"Error decoding vector store: {e}")
|
|
132
132
|
raise
|
|
133
133
|
|
|
134
|
-
async def load_vector_store(self, agent_id: str) ->
|
|
134
|
+
async def load_vector_store(self, agent_id: str) -> FAISS | None:
|
|
135
135
|
"""Load existing vector store for an agent."""
|
|
136
136
|
try:
|
|
137
137
|
vector_store_key = f"vector_store_{agent_id}"
|
|
@@ -186,8 +186,8 @@ class FirecrawlMetadataManager:
|
|
|
186
186
|
|
|
187
187
|
@staticmethod
|
|
188
188
|
def create_url_metadata(
|
|
189
|
-
urls:
|
|
190
|
-
) ->
|
|
189
|
+
urls: list[str], documents: list[Document], source_type: str
|
|
190
|
+
) -> dict[str, Any]:
|
|
191
191
|
"""Create metadata for indexed URLs."""
|
|
192
192
|
return {
|
|
193
193
|
"urls": urls,
|
|
@@ -198,7 +198,7 @@ class FirecrawlMetadataManager:
|
|
|
198
198
|
|
|
199
199
|
@staticmethod
|
|
200
200
|
@staticmethod
|
|
201
|
-
async def update_metadata(agent_id: str, new_metadata:
|
|
201
|
+
async def update_metadata(agent_id: str, new_metadata: dict[str, Any]) -> None:
|
|
202
202
|
"""Update metadata for an agent."""
|
|
203
203
|
try:
|
|
204
204
|
metadata_key = f"indexed_urls_{agent_id}"
|
|
@@ -215,12 +215,12 @@ class FirecrawlMetadataManager:
|
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
async def index_documents(
|
|
218
|
-
documents:
|
|
218
|
+
documents: list[Document],
|
|
219
219
|
agent_id: str,
|
|
220
220
|
vector_manager: FirecrawlVectorStoreManager,
|
|
221
221
|
chunk_size: int = 1000,
|
|
222
222
|
chunk_overlap: int = 200,
|
|
223
|
-
) ->
|
|
223
|
+
) -> tuple[int, bool]:
|
|
224
224
|
"""
|
|
225
225
|
Index documents into the Firecrawl vector store.
|
|
226
226
|
|
|
@@ -281,7 +281,7 @@ async def query_indexed_content(
|
|
|
281
281
|
agent_id: str,
|
|
282
282
|
vector_manager: FirecrawlVectorStoreManager,
|
|
283
283
|
max_results: int = 4,
|
|
284
|
-
) ->
|
|
284
|
+
) -> list[Document]:
|
|
285
285
|
"""
|
|
286
286
|
Query the Firecrawl indexed content.
|
|
287
287
|
|
intentkit/skills/github/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 GitHubBaseTool(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 enum import Enum
|
|
3
|
-
from typing import Type
|
|
4
3
|
|
|
5
4
|
import httpx
|
|
6
5
|
from pydantic import BaseModel, Field
|
|
@@ -54,7 +53,7 @@ class GitHubSearch(GitHubBaseTool):
|
|
|
54
53
|
"- Code snippets across GitHub repositories\n"
|
|
55
54
|
"You must call this tool whenever the user asks about finding something on GitHub."
|
|
56
55
|
)
|
|
57
|
-
args_schema:
|
|
56
|
+
args_schema: type[BaseModel] = GitHubSearchInput
|
|
58
57
|
|
|
59
58
|
async def _arun(
|
|
60
59
|
self,
|
intentkit/skills/heurist/base.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Base class for Heurist AI skills."""
|
|
2
2
|
|
|
3
|
-
from typing import Type
|
|
4
|
-
|
|
5
3
|
from langchain_core.tools.base import ToolException
|
|
6
4
|
from pydantic import BaseModel, Field
|
|
7
5
|
|
|
@@ -17,7 +15,7 @@ class HeuristBaseTool(IntentKitSkill):
|
|
|
17
15
|
|
|
18
16
|
name: str = Field(description="The name of the tool")
|
|
19
17
|
description: str = Field(description="A description of what the tool does")
|
|
20
|
-
args_schema:
|
|
18
|
+
args_schema: type[BaseModel]
|
|
21
19
|
|
|
22
20
|
def get_api_key(self) -> str:
|
|
23
21
|
context = self.get_context()
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationAnimagineXLInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=680,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationAnimagineXL(HeuristBaseTool):
|
|
|
53
52
|
"AnimagineXL specializes in creating high-quality Japanese anime-style illustrations.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationAnimagineXLInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate Japanese anime-style images using Heurist AI's AnimagineXL model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationArthemyComicsInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=1024,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationArthemyComics(HeuristBaseTool):
|
|
|
53
52
|
"ArthemyComics specializes in creating vibrant, stylized comic book illustrations.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationArthemyComicsInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate comic-style images using Heurist AI's ArthemyComics model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationArthemyRealInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=1024,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationArthemyReal(HeuristBaseTool):
|
|
|
53
52
|
"ArthemyReal specializes in creating photorealistic, lifelike images with fine details.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationArthemyRealInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate realistic images using Heurist AI's ArthemyReal model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationBrainDanceInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=1024,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationBrainDance(HeuristBaseTool):
|
|
|
53
52
|
"BrainDance specializes in creating unique, artistic interpretations with creative flair.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationBrainDanceInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate artistic images using Heurist AI's BrainDance model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationCyberRealisticXLInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=680,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationCyberRealisticXL(HeuristBaseTool):
|
|
|
53
52
|
"CyberRealisticXL specializes in creating high-quality hyperrealistic photographs with a cyberpunk aesthetic.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationCyberRealisticXLInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate hyperrealistic cyberpunk images using Heurist AI's CyberRealisticXL model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationFlux1DevInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=2048,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=1024,
|
|
32
31
|
le=2048,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationFlux1Dev(HeuristBaseTool):
|
|
|
53
52
|
"Flux.1-dev is a versatile, general-purpose model capable of generating images in any style.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationFlux1DevInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate images using Heurist AI's Flux.1-dev model.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional, Type
|
|
3
2
|
|
|
4
3
|
import httpx
|
|
5
4
|
from epyxid import XID
|
|
@@ -18,16 +17,16 @@ class ImageGenerationSDXLInput(BaseModel):
|
|
|
18
17
|
prompt: str = Field(
|
|
19
18
|
description="Text prompt describing the image to generate.",
|
|
20
19
|
)
|
|
21
|
-
neg_prompt:
|
|
20
|
+
neg_prompt: str | None = Field(
|
|
22
21
|
default="(worst quality: 1.4), bad quality, nsfw",
|
|
23
22
|
description="Negative prompt describing what to avoid in the generated image.",
|
|
24
23
|
)
|
|
25
|
-
width:
|
|
24
|
+
width: int | None = Field(
|
|
26
25
|
default=1024,
|
|
27
26
|
le=1024,
|
|
28
27
|
description="Width of the generated image.",
|
|
29
28
|
)
|
|
30
|
-
height:
|
|
29
|
+
height: int | None = Field(
|
|
31
30
|
default=1024,
|
|
32
31
|
le=1024,
|
|
33
32
|
description="Height of the generated image.",
|
|
@@ -53,14 +52,14 @@ class ImageGenerationSDXL(HeuristBaseTool):
|
|
|
53
52
|
"SDXL is a versatile, general-purpose model capable of generating high-quality images in any style.\n"
|
|
54
53
|
"If you have height and width, remember to specify them.\n"
|
|
55
54
|
)
|
|
56
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = ImageGenerationSDXLInput
|
|
57
56
|
|
|
58
57
|
async def _arun(
|
|
59
58
|
self,
|
|
60
59
|
prompt: str,
|
|
61
|
-
neg_prompt:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
60
|
+
neg_prompt: str | None = "(worst quality: 1.4), bad quality, nsfw",
|
|
61
|
+
width: int | None = 1024,
|
|
62
|
+
height: int | None = 680,
|
|
64
63
|
**kwargs,
|
|
65
64
|
) -> str:
|
|
66
65
|
"""Implementation of the tool to generate images using Heurist AI's SDXL model.
|
intentkit/skills/http/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 HttpBaseTool(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:
|
intentkit/skills/http/get.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
|
|
5
5
|
from langchain_core.tools import ToolException
|
|
@@ -14,15 +14,15 @@ class HttpGetInput(BaseModel):
|
|
|
14
14
|
"""Input for HTTP GET request."""
|
|
15
15
|
|
|
16
16
|
url: str = Field(description="The URL to send the GET request to")
|
|
17
|
-
headers:
|
|
17
|
+
headers: dict[str, str] | None = Field(
|
|
18
18
|
description="Optional headers to include in the request",
|
|
19
19
|
default=None,
|
|
20
20
|
)
|
|
21
|
-
params:
|
|
21
|
+
params: dict[str, Any] | None = Field(
|
|
22
22
|
description="Optional query parameters to include in the request",
|
|
23
23
|
default=None,
|
|
24
24
|
)
|
|
25
|
-
timeout:
|
|
25
|
+
timeout: float | None = Field(
|
|
26
26
|
description="Request timeout in seconds (default: 30)",
|
|
27
27
|
default=30.0,
|
|
28
28
|
)
|
|
@@ -47,13 +47,13 @@ class HttpGet(HttpBaseTool):
|
|
|
47
47
|
"Returns the response content as text. "
|
|
48
48
|
"Use this when you need to fetch data from web APIs or websites."
|
|
49
49
|
)
|
|
50
|
-
args_schema:
|
|
50
|
+
args_schema: type[BaseModel] = HttpGetInput
|
|
51
51
|
|
|
52
52
|
async def _arun(
|
|
53
53
|
self,
|
|
54
54
|
url: str,
|
|
55
|
-
headers:
|
|
56
|
-
params:
|
|
55
|
+
headers: dict[str, str] | None = None,
|
|
56
|
+
params: dict[str, Any] | None = None,
|
|
57
57
|
timeout: float = 30.0,
|
|
58
58
|
**kwargs,
|
|
59
59
|
) -> str:
|
intentkit/skills/http/post.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
|
|
5
5
|
from langchain_core.tools import ToolException
|
|
@@ -14,19 +14,19 @@ class HttpPostInput(BaseModel):
|
|
|
14
14
|
"""Input for HTTP POST request."""
|
|
15
15
|
|
|
16
16
|
url: str = Field(description="The URL to send the POST request to")
|
|
17
|
-
data:
|
|
17
|
+
data: dict[str, Any] | str | None = Field(
|
|
18
18
|
description="The data to send in the request body. Can be a dictionary (will be sent as JSON) or a string",
|
|
19
19
|
default=None,
|
|
20
20
|
)
|
|
21
|
-
headers:
|
|
21
|
+
headers: dict[str, str] | None = Field(
|
|
22
22
|
description="Optional headers to include in the request",
|
|
23
23
|
default=None,
|
|
24
24
|
)
|
|
25
|
-
params:
|
|
25
|
+
params: dict[str, Any] | None = Field(
|
|
26
26
|
description="Optional query parameters to include in the request",
|
|
27
27
|
default=None,
|
|
28
28
|
)
|
|
29
|
-
timeout:
|
|
29
|
+
timeout: float | None = Field(
|
|
30
30
|
description="Request timeout in seconds (default: 30)",
|
|
31
31
|
default=30.0,
|
|
32
32
|
)
|
|
@@ -52,14 +52,14 @@ class HttpPost(HttpBaseTool):
|
|
|
52
52
|
"Returns the response content as text. "
|
|
53
53
|
"Use this when you need to send data to web APIs or submit forms."
|
|
54
54
|
)
|
|
55
|
-
args_schema:
|
|
55
|
+
args_schema: type[BaseModel] = HttpPostInput
|
|
56
56
|
|
|
57
57
|
async def _arun(
|
|
58
58
|
self,
|
|
59
59
|
url: str,
|
|
60
|
-
data:
|
|
61
|
-
headers:
|
|
62
|
-
params:
|
|
60
|
+
data: dict[str, Any] | str | None = None,
|
|
61
|
+
headers: dict[str, str] | None = None,
|
|
62
|
+
params: dict[str, Any] | None = None,
|
|
63
63
|
timeout: float = 30.0,
|
|
64
64
|
**kwargs,
|
|
65
65
|
) -> str:
|