quantalogic 0.50.12__py3-none-any.whl → 0.50.18__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.
- quantalogic/agent_config.py +1 -224
- quantalogic/agent_factory.py +12 -13
- quantalogic/coding_agent.py +1 -1
- quantalogic/create_custom_agent.py +254 -0
- quantalogic/tools/__init__.py +66 -106
- quantalogic/tools/composio/__init__.py +18 -0
- quantalogic/tools/composio/composio.py +3 -48
- quantalogic/tools/database/__init__.py +20 -0
- quantalogic/tools/database/sql_query_tool_advanced.py +5 -22
- quantalogic/tools/document_tools/__init__.py +20 -29
- quantalogic/tools/finance/__init__.py +32 -0
- quantalogic/tools/git/__init__.py +24 -0
- quantalogic/tools/google_packages/__init__.py +18 -0
- quantalogic/tools/image_generation/__init__.py +18 -0
- quantalogic/tools/nasa_packages/__init__.py +20 -0
- quantalogic/tools/presentation_tools/__init__.py +18 -0
- quantalogic/tools/product_hunt/__init__.py +18 -0
- quantalogic/tools/rag_tool/__init__.py +24 -48
- quantalogic/tools/sql_query_tool.py +8 -25
- quantalogic/tools/utilities/__init__.py +22 -0
- quantalogic/tools/utils/create_sample_database.py +7 -64
- quantalogic/tools/utils/generate_database_report.py +2 -7
- {quantalogic-0.50.12.dist-info → quantalogic-0.50.18.dist-info}/METADATA +2 -1
- {quantalogic-0.50.12.dist-info → quantalogic-0.50.18.dist-info}/RECORD +27 -16
- {quantalogic-0.50.12.dist-info → quantalogic-0.50.18.dist-info}/LICENSE +0 -0
- {quantalogic-0.50.12.dist-info → quantalogic-0.50.18.dist-info}/WHEEL +0 -0
- {quantalogic-0.50.12.dist-info → quantalogic-0.50.18.dist-info}/entry_points.txt +0 -0
quantalogic/tools/__init__.py
CHANGED
@@ -1,110 +1,70 @@
|
|
1
1
|
"""Tools for the QuantaLogic agent."""
|
2
2
|
|
3
|
-
import
|
4
|
-
import sys
|
5
|
-
from typing import Any, Dict
|
3
|
+
from loguru import logger
|
6
4
|
|
5
|
+
# Direct imports of tools
|
6
|
+
from .agent_tool import AgentTool
|
7
|
+
from .download_http_file_tool import DownloadHttpFileTool
|
8
|
+
from .duckduckgo_search_tool import DuckDuckGoSearchTool
|
9
|
+
from .edit_whole_content_tool import EditWholeContentTool
|
10
|
+
from .elixir_tool import ElixirTool
|
11
|
+
from .execute_bash_command_tool import ExecuteBashCommandTool
|
12
|
+
from .grep_app_tool import GrepAppTool
|
13
|
+
from .input_question_tool import InputQuestionTool
|
14
|
+
from .jinja_tool import JinjaTool
|
15
|
+
from .list_directory_tool import ListDirectoryTool
|
16
|
+
from .llm_tool import LLMTool
|
17
|
+
from .llm_vision_tool import LLMVisionTool
|
18
|
+
from .markitdown_tool import MarkitdownTool
|
19
|
+
from .nodejs_tool import NodeJsTool
|
20
|
+
from .python_tool import PythonTool
|
21
|
+
from .read_file_block_tool import ReadFileBlockTool
|
22
|
+
from .read_file_tool import ReadFileTool
|
23
|
+
from .read_html_tool import ReadHTMLTool
|
24
|
+
from .replace_in_file_tool import ReplaceInFileTool
|
25
|
+
from .ripgrep_tool import RipgrepTool
|
26
|
+
from .safe_python_interpreter_tool import SafePythonInterpreterTool
|
27
|
+
from .search_definition_names import SearchDefinitionNames
|
28
|
+
from .sequence_tool import SequenceTool
|
29
|
+
from .serpapi_search_tool import SerpApiSearchTool
|
30
|
+
from .sql_query_tool import SQLQueryTool
|
31
|
+
from .task_complete_tool import TaskCompleteTool
|
32
|
+
from .tool import Tool, ToolArgument
|
33
|
+
from .unified_diff_tool import UnifiedDiffTool
|
34
|
+
from .wikipedia_search_tool import WikipediaSearchTool
|
35
|
+
from .write_file_tool import WriteFileTool
|
7
36
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
"MarkdownToLatexTool": (".document_tools.markdown_to_latex_tool", True),
|
43
|
-
"MarkdownToPdfTool": (".document_tools.markdown_to_pdf_tool", True),
|
44
|
-
"MarkdownToPptxTool": (".document_tools.markdown_to_pptx_tool", True),
|
45
|
-
"DownloadHttpFileTool": (".download_http_file_tool", False),
|
46
|
-
"DuckDuckGoSearchTool": (".duckduckgo_search_tool", False),
|
47
|
-
"EditWholeContentTool": (".edit_whole_content_tool", False),
|
48
|
-
"ElixirTool": (".elixir_tool", False),
|
49
|
-
"ExecuteBashCommandTool": (".execute_bash_command_tool", False),
|
50
|
-
"BitbucketCloneTool": (".git.bitbucket_clone_repo_tool", False),
|
51
|
-
"BitbucketOperationsTool": (".git.bitbucket_operations_tool", False),
|
52
|
-
"CloneRepoTool": (".git.clone_repo_tool", False),
|
53
|
-
"GitOperationsTool": (".git.git_operations_tool", False),
|
54
|
-
"GoogleNewsTool": (".google_packages.google_news_tool", False),
|
55
|
-
"GrepAppTool": (".grep_app_tool", False),
|
56
|
-
"LLMImageGenerationTool": (".image_generation.dalle_e", False),
|
57
|
-
"InputQuestionTool": (".input_question_tool", False),
|
58
|
-
"JinjaTool": (".jinja_tool", False),
|
59
|
-
"ListDirectoryTool": (".list_directory_tool", False),
|
60
|
-
"LLMTool": (".llm_tool", False),
|
61
|
-
"LLMVisionTool": (".llm_vision_tool", False),
|
62
|
-
"MarkitdownTool": (".markitdown_tool", False),
|
63
|
-
"NasaApodTool": (".nasa_packages.nasa_apod_tool", False),
|
64
|
-
"NasaNeoWsTool": (".nasa_packages.nasa_neows_tool", False),
|
65
|
-
"NodeJsTool": (".nodejs_tool", False),
|
66
|
-
"PresentationLLMTool": (".presentation_tools.presentation_llm_tool", False),
|
67
|
-
"ProductHuntTool": (".product_hunt.product_hunt_tool", False),
|
68
|
-
"PythonTool": (".python_tool", False),
|
69
|
-
"RagTool": (".rag_tool.rag_tool", False),
|
70
|
-
"ReadFileBlockTool": (".read_file_block_tool", False),
|
71
|
-
"ReadFileTool": (".read_file_tool", False),
|
72
|
-
"ReadHTMLTool": (".read_html_tool", False),
|
73
|
-
"ReplaceInFileTool": (".replace_in_file_tool", False),
|
74
|
-
"RipgrepTool": (".ripgrep_tool", False),
|
75
|
-
"SafePythonInterpreterTool": (".safe_python_interpreter_tool", False),
|
76
|
-
"SearchDefinitionNames": (".search_definition_names", False),
|
77
|
-
"SequenceTool": (".sequence_tool", False),
|
78
|
-
"SerpApiSearchTool": (".serpapi_search_tool", False),
|
79
|
-
"SQLQueryTool": (".sql_query_tool", True),
|
80
|
-
"TaskCompleteTool": (".task_complete_tool", False),
|
81
|
-
"Tool": (".tool", False),
|
82
|
-
"ToolArgument": (".tool", False),
|
83
|
-
"UnifiedDiffTool": (".unified_diff_tool", False),
|
84
|
-
"CSVProcessorTool": (".utilities.csv_processor_tool", False),
|
85
|
-
"PrepareDownloadTool": (".utilities.download_file_tool", False),
|
86
|
-
"MermaidValidatorTool": (".utilities.mermaid_validator_tool", False),
|
87
|
-
"WikipediaSearchTool": (".wikipedia_search_tool", False),
|
88
|
-
"WriteFileTool": (".write_file_tool", False),
|
89
|
-
}
|
90
|
-
|
91
|
-
# Create lazy loaders for each module path
|
92
|
-
_lazy_modules: Dict[str, LazyLoader] = {}
|
93
|
-
for tool, (path, optional) in _TOOL_IMPORTS.items():
|
94
|
-
full_path = f"{__package__}{path}"
|
95
|
-
if full_path not in _lazy_modules:
|
96
|
-
_lazy_modules[full_path] = LazyLoader(full_path, optional)
|
97
|
-
|
98
|
-
# Set up attributes for lazy loading
|
99
|
-
_tools_to_lazy_modules = {}
|
100
|
-
for tool, (path, optional) in _TOOL_IMPORTS.items():
|
101
|
-
full_path = f"{__package__}{path}"
|
102
|
-
_tools_to_lazy_modules[tool] = _lazy_modules[full_path]
|
103
|
-
|
104
|
-
# Define __all__ so that import * works properly
|
105
|
-
__all__ = list(_TOOL_IMPORTS.keys())
|
106
|
-
|
107
|
-
# Set up lazy loading for each tool
|
108
|
-
for tool, lazy_module in _tools_to_lazy_modules.items():
|
109
|
-
# This will create properties that lazily load the requested tool
|
110
|
-
setattr(sys.modules[__name__], tool, getattr(lazy_module, tool))
|
37
|
+
# Define __all__ to control what gets imported with `from quantalogic.tools import *`
|
38
|
+
__all__ = [
|
39
|
+
'AgentTool',
|
40
|
+
'DownloadHttpFileTool',
|
41
|
+
'DuckDuckGoSearchTool',
|
42
|
+
'EditWholeContentTool',
|
43
|
+
'ElixirTool',
|
44
|
+
'ExecuteBashCommandTool',
|
45
|
+
'GrepAppTool',
|
46
|
+
'InputQuestionTool',
|
47
|
+
'JinjaTool',
|
48
|
+
'ListDirectoryTool',
|
49
|
+
'LLMTool',
|
50
|
+
'LLMVisionTool',
|
51
|
+
'MarkitdownTool',
|
52
|
+
'NodeJsTool',
|
53
|
+
'PythonTool',
|
54
|
+
'ReadFileBlockTool',
|
55
|
+
'ReadFileTool',
|
56
|
+
'ReadHTMLTool',
|
57
|
+
'ReplaceInFileTool',
|
58
|
+
'RipgrepTool',
|
59
|
+
'SafePythonInterpreterTool',
|
60
|
+
'SearchDefinitionNames',
|
61
|
+
'SequenceTool',
|
62
|
+
'SerpApiSearchTool',
|
63
|
+
'SQLQueryTool',
|
64
|
+
'TaskCompleteTool',
|
65
|
+
'Tool',
|
66
|
+
'ToolArgument',
|
67
|
+
'UnifiedDiffTool',
|
68
|
+
'WikipediaSearchTool',
|
69
|
+
'WriteFileTool'
|
70
|
+
]
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Composio Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities from the Composio integration.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .composio import ComposioTool
|
11
|
+
|
12
|
+
# Define __all__ to control what is imported with `from ... import *`
|
13
|
+
__all__ = [
|
14
|
+
'ComposioTool',
|
15
|
+
]
|
16
|
+
|
17
|
+
# Optional: Add logging for import confirmation
|
18
|
+
logger.info("Composio tools module initialized successfully.")
|
@@ -1,32 +1,17 @@
|
|
1
1
|
"""Tool for interacting with Composio API services."""
|
2
2
|
|
3
|
-
import importlib
|
4
|
-
import importlib.util
|
5
3
|
import json
|
6
4
|
import os
|
7
5
|
import traceback
|
8
6
|
from datetime import datetime
|
9
|
-
from typing import Any, Dict, Optional
|
10
|
-
|
11
|
-
# Type checking imports - these are only used for type hints and not at runtime
|
12
|
-
if TYPE_CHECKING:
|
13
|
-
from composio import ComposioToolSet
|
7
|
+
from typing import Any, Dict, Optional
|
14
8
|
|
9
|
+
from composio import Action, ComposioToolSet
|
15
10
|
from loguru import logger
|
16
11
|
from pydantic import BaseModel, ConfigDict, Field
|
17
12
|
|
18
13
|
from quantalogic.tools.tool import Tool, ToolArgument
|
19
14
|
|
20
|
-
# Flag to check if composio is available
|
21
|
-
COMPOSIO_AVAILABLE = False
|
22
|
-
|
23
|
-
# Try to check if composio is importable without actually importing it
|
24
|
-
try:
|
25
|
-
spec = importlib.util.find_spec("composio")
|
26
|
-
COMPOSIO_AVAILABLE = spec is not None
|
27
|
-
except ImportError:
|
28
|
-
pass
|
29
|
-
|
30
15
|
|
31
16
|
def setup_logger():
|
32
17
|
"""Configure Loguru logger with custom format and levels."""
|
@@ -87,7 +72,7 @@ class ComposioTool(Tool):
|
|
87
72
|
)
|
88
73
|
action: str = Field(default="") # Single action per tool instance
|
89
74
|
action_schema: Optional[ActionSchema] = None
|
90
|
-
toolset: Optional[
|
75
|
+
toolset: Optional[ComposioToolSet] = None
|
91
76
|
|
92
77
|
# Performance tracking
|
93
78
|
_last_execution_time: Optional[datetime] = None
|
@@ -111,20 +96,6 @@ class ComposioTool(Tool):
|
|
111
96
|
need_validation: Whether this specific instance needs validation
|
112
97
|
**data: Additional data for tool initialization
|
113
98
|
"""
|
114
|
-
# Check if composio is available
|
115
|
-
if not COMPOSIO_AVAILABLE:
|
116
|
-
logger.error("ComposioTool cannot be initialized: composio module is not installed")
|
117
|
-
raise ImportError("The 'composio' package is required to use ComposioTool. "
|
118
|
-
"Install it with 'pip install composio' or include it in your dependencies.")
|
119
|
-
|
120
|
-
# Import composio only when needed
|
121
|
-
try:
|
122
|
-
from composio import Action, ComposioToolSet
|
123
|
-
except ImportError:
|
124
|
-
logger.error("Failed to import composio module")
|
125
|
-
raise ImportError("The 'composio' package is required to use ComposioTool. "
|
126
|
-
"Install it with 'pip install composio' or include it in your dependencies.")
|
127
|
-
|
128
99
|
logger.info(f"Initializing ComposioTool for action: {action}")
|
129
100
|
start_time = datetime.now()
|
130
101
|
|
@@ -179,14 +150,6 @@ class ComposioTool(Tool):
|
|
179
150
|
|
180
151
|
def _setup_action(self) -> None:
|
181
152
|
"""Set up the Composio action with its schema and parameters."""
|
182
|
-
# Import composio only when needed
|
183
|
-
try:
|
184
|
-
from composio import Action, ComposioToolSet
|
185
|
-
except ImportError:
|
186
|
-
logger.error("Failed to import composio module")
|
187
|
-
raise ImportError("The 'composio' package is required to use ComposioTool. "
|
188
|
-
"Install it with 'pip install composio' or include it in your dependencies.")
|
189
|
-
|
190
153
|
logger.debug(f"Setting up action: {self.action}")
|
191
154
|
start_time = datetime.now()
|
192
155
|
|
@@ -382,14 +345,6 @@ class ComposioTool(Tool):
|
|
382
345
|
|
383
346
|
def execute(self, **kwargs: Any) -> str:
|
384
347
|
"""Execute the Composio action with the given parameters."""
|
385
|
-
# Import composio only when needed
|
386
|
-
try:
|
387
|
-
from composio import Action, ComposioToolSet
|
388
|
-
except ImportError:
|
389
|
-
logger.error("Failed to import composio module")
|
390
|
-
raise ImportError("The 'composio' package is required to use ComposioTool. "
|
391
|
-
"Install it with 'pip install composio' or include it in your dependencies.")
|
392
|
-
|
393
348
|
start_time = datetime.now()
|
394
349
|
self._execution_count += 1
|
395
350
|
self._last_execution_time = start_time
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""
|
2
|
+
Database Tools Module
|
3
|
+
|
4
|
+
This module provides database-related tools and utilities.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .generate_database_report_tool import GenerateDatabaseReportTool
|
11
|
+
from .sql_query_tool_advanced import SQLQueryToolAdvanced
|
12
|
+
|
13
|
+
# Define __all__ to control what is imported with `from ... import *`
|
14
|
+
__all__ = [
|
15
|
+
'GenerateDatabaseReportTool',
|
16
|
+
'SQLQueryToolAdvanced',
|
17
|
+
]
|
18
|
+
|
19
|
+
# Optional: Add logging for import confirmation
|
20
|
+
logger.info("Database tools module initialized successfully.")
|
@@ -1,27 +1,13 @@
|
|
1
1
|
"""Tool for executing SQL queries and performing database operations with safety checks."""
|
2
2
|
|
3
|
-
import importlib.util
|
4
3
|
import json
|
5
4
|
from enum import Enum
|
6
|
-
from typing import Any, Dict, List, Optional
|
5
|
+
from typing import Any, Dict, List, Optional
|
7
6
|
|
8
7
|
from loguru import logger
|
9
8
|
from pydantic import Field
|
10
|
-
|
11
|
-
|
12
|
-
SQLALCHEMY_AVAILABLE = False
|
13
|
-
try:
|
14
|
-
spec = importlib.util.find_spec("sqlalchemy")
|
15
|
-
SQLALCHEMY_AVAILABLE = spec is not None
|
16
|
-
if SQLALCHEMY_AVAILABLE:
|
17
|
-
from sqlalchemy import create_engine, inspect, text
|
18
|
-
from sqlalchemy.engine import Engine
|
19
|
-
except ImportError:
|
20
|
-
pass
|
21
|
-
|
22
|
-
# Type checking imports
|
23
|
-
if TYPE_CHECKING:
|
24
|
-
from sqlalchemy.engine import Engine
|
9
|
+
from sqlalchemy import create_engine, inspect, text
|
10
|
+
from sqlalchemy.engine import Engine
|
25
11
|
|
26
12
|
from quantalogic.tools.tool import Tool, ToolArgument
|
27
13
|
|
@@ -86,9 +72,6 @@ class SQLQueryToolAdvanced(Tool):
|
|
86
72
|
|
87
73
|
def __init__(self, **data):
|
88
74
|
super().__init__(**data)
|
89
|
-
if not SQLALCHEMY_AVAILABLE:
|
90
|
-
raise ImportError("The 'sqlalchemy' package is required to use SQLQueryToolAdvanced. "
|
91
|
-
"Install it with 'pip install sqlalchemy' or include it in your dependencies.")
|
92
75
|
self._engine = create_engine(self.connection_string)
|
93
76
|
logger.info(f"Initialized SQL tool with engine for {self.connection_string}")
|
94
77
|
|
@@ -217,10 +200,10 @@ class SQLQueryToolAdvanced(Tool):
|
|
217
200
|
raise ValueError("DROP DATABASE operations are not allowed")
|
218
201
|
|
219
202
|
inspector = inspect(self._engine)
|
220
|
-
|
203
|
+
_existing_tables = inspector.get_table_names()
|
221
204
|
|
222
205
|
# Additional safety checks could be added here
|
223
|
-
logger.debug(
|
206
|
+
logger.debug("Schema validation passed for operation")
|
224
207
|
|
225
208
|
def _convert_row_number(self, value: Any, field_name: str) -> int:
|
226
209
|
"""Convert and validate row number input."""
|
@@ -1,39 +1,30 @@
|
|
1
1
|
"""
|
2
2
|
Document Tools Module
|
3
3
|
|
4
|
-
This module provides
|
4
|
+
This module provides tools for converting Markdown to various document formats.
|
5
5
|
"""
|
6
6
|
|
7
|
-
from
|
8
|
-
import importlib
|
9
|
-
import logging
|
7
|
+
from loguru import logger
|
10
8
|
|
11
|
-
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .markdown_to_docx_tool import MarkdownToDocxTool
|
11
|
+
from .markdown_to_epub_tool import MarkdownToEpubTool
|
12
|
+
from .markdown_to_html_tool import MarkdownToHtmlTool
|
13
|
+
from .markdown_to_ipynb_tool import MarkdownToIpynbTool
|
14
|
+
from .markdown_to_latex_tool import MarkdownToLatexTool
|
15
|
+
from .markdown_to_pdf_tool import MarkdownToPdfTool
|
16
|
+
from .markdown_to_pptx_tool import MarkdownToPptxTool
|
12
17
|
|
13
|
-
#
|
18
|
+
# Define __all__ to control what is imported with `from ... import *`
|
14
19
|
__all__ = [
|
15
|
-
'
|
16
|
-
'
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
20
|
-
'
|
21
|
-
'
|
20
|
+
'MarkdownToDocxTool',
|
21
|
+
'MarkdownToEpubTool',
|
22
|
+
'MarkdownToHtmlTool',
|
23
|
+
'MarkdownToIpynbTool',
|
24
|
+
'MarkdownToLatexTool',
|
25
|
+
'MarkdownToPdfTool',
|
26
|
+
'MarkdownToPptxTool',
|
22
27
|
]
|
23
28
|
|
24
|
-
|
25
|
-
|
26
|
-
Dynamically import optional tools with graceful error handling.
|
27
|
-
|
28
|
-
Args:
|
29
|
-
name (str): Name of the tool to import
|
30
|
-
|
31
|
-
Returns:
|
32
|
-
Any: Imported tool or None if import fails
|
33
|
-
"""
|
34
|
-
try:
|
35
|
-
module = importlib.import_module(f'.{name}', package='quantalogic.tools.document_tools')
|
36
|
-
return getattr(module, name)
|
37
|
-
except (ImportError, AttributeError) as e:
|
38
|
-
logger.warning(f"Optional tool {name} could not be imported: {e}")
|
39
|
-
return None
|
29
|
+
# Optional: Add logging for import confirmation
|
30
|
+
logger.info("Document tools module initialized successfully.")
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"""
|
2
|
+
Finance Tools Module
|
3
|
+
|
4
|
+
This module provides finance-related tools and utilities.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .alpha_vantage_tool import AlphaVantageTool
|
11
|
+
from .ccxt_tool import CcxtTool
|
12
|
+
from .finance_llm_tool import FinanceLLMTool
|
13
|
+
from .google_finance import GoogleFinanceTool
|
14
|
+
from .market_intelligence_tool import MarketIntelligenceTool
|
15
|
+
from .technical_analysis_tool import TechnicalAnalysisTool
|
16
|
+
from .tradingview_tool import TradingViewTool
|
17
|
+
from .yahoo_finance import YahooFinanceTool
|
18
|
+
|
19
|
+
# Define __all__ to control what is imported with `from ... import *`
|
20
|
+
__all__ = [
|
21
|
+
'AlphaVantageTool',
|
22
|
+
'CcxtTool',
|
23
|
+
'FinanceLLMTool',
|
24
|
+
'GoogleFinanceTool',
|
25
|
+
'MarketIntelligenceTool',
|
26
|
+
'TechnicalAnalysisTool',
|
27
|
+
'TradingViewTool',
|
28
|
+
'YahooFinanceTool',
|
29
|
+
]
|
30
|
+
|
31
|
+
# Optional: Add logging for import confirmation
|
32
|
+
logger.info("Finance tools module initialized successfully.")
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"""
|
2
|
+
Git Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities related to Git operations.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .bitbucket_clone_repo_tool import BitbucketCloneTool
|
11
|
+
from .bitbucket_operations_tool import BitbucketOperationsTool
|
12
|
+
from .clone_repo_tool import CloneRepoTool
|
13
|
+
from .git_operations_tool import GitOperationsTool
|
14
|
+
|
15
|
+
# Define __all__ to control what is imported with `from ... import *`
|
16
|
+
__all__ = [
|
17
|
+
'BitbucketCloneTool',
|
18
|
+
'BitbucketOperationsTool',
|
19
|
+
'CloneRepoTool',
|
20
|
+
'GitOperationsTool',
|
21
|
+
]
|
22
|
+
|
23
|
+
# Optional: Add logging for import confirmation
|
24
|
+
logger.info("Git tools module initialized successfully.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Google Packages Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities related to Google packages.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .google_news_tool import GoogleNewsTool
|
11
|
+
|
12
|
+
# Define __all__ to control what is imported with `from ... import *`
|
13
|
+
__all__ = [
|
14
|
+
'GoogleNewsTool',
|
15
|
+
]
|
16
|
+
|
17
|
+
# Optional: Add logging for import confirmation
|
18
|
+
logger.info("Google Packages tools module initialized successfully.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Image Generation Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities for image generation.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .dalle_e import LLMImageGenerationTool
|
11
|
+
|
12
|
+
# Define __all__ to control what is imported with `from ... import *`
|
13
|
+
__all__ = [
|
14
|
+
'LLMImageGenerationTool',
|
15
|
+
]
|
16
|
+
|
17
|
+
# Optional: Add logging for import confirmation
|
18
|
+
logger.info("Image Generation tools module initialized successfully.")
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""
|
2
|
+
NASA Packages Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities related to NASA packages.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .nasa_apod_tool import NasaApodTool
|
11
|
+
from .nasa_neows_tool import NasaNeoWsTool
|
12
|
+
|
13
|
+
# Define __all__ to control what is imported with `from ... import *`
|
14
|
+
__all__ = [
|
15
|
+
'NasaApodTool',
|
16
|
+
'NasaNeoWsTool',
|
17
|
+
]
|
18
|
+
|
19
|
+
# Optional: Add logging for import confirmation
|
20
|
+
logger.info("NASA Packages tools module initialized successfully.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Presentation Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities for creating and managing presentations.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .presentation_llm_tool import PresentationLLMTool
|
11
|
+
|
12
|
+
# Define __all__ to control what is imported with `from ... import *`
|
13
|
+
__all__ = [
|
14
|
+
'PresentationLLMTool',
|
15
|
+
]
|
16
|
+
|
17
|
+
# Optional: Add logging for import confirmation
|
18
|
+
logger.info("Presentation tools module initialized successfully.")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Product Hunt Tools Module
|
3
|
+
|
4
|
+
This module provides tools and utilities related to Product Hunt.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .product_hunt_tool import ProductHuntTool
|
11
|
+
|
12
|
+
# Define __all__ to control what is imported with `from ... import *`
|
13
|
+
__all__ = [
|
14
|
+
'ProductHuntTool',
|
15
|
+
]
|
16
|
+
|
17
|
+
# Optional: Add logging for import confirmation
|
18
|
+
logger.info("Product Hunt tools module initialized successfully.")
|
@@ -1,48 +1,24 @@
|
|
1
|
-
"""
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
#
|
24
|
-
|
25
|
-
"DocumentMetadata": ".document_metadata",
|
26
|
-
"QueryResponse": ".query_response",
|
27
|
-
"RagTool": ".rag_tool"
|
28
|
-
}
|
29
|
-
|
30
|
-
# Create lazy loaders for each module
|
31
|
-
_lazy_modules = {}
|
32
|
-
for cls_name, path in _IMPORTS.items():
|
33
|
-
full_path = f"{__package__}{path}"
|
34
|
-
if (full_path not in _lazy_modules):
|
35
|
-
_lazy_modules[full_path] = LazyLoader(full_path)
|
36
|
-
|
37
|
-
# Map each class to its lazy module
|
38
|
-
_class_to_lazy_module = {}
|
39
|
-
for cls_name, path in _IMPORTS.items():
|
40
|
-
full_path = f"{__package__}{path}"
|
41
|
-
_class_to_lazy_module[cls_name] = _lazy_modules[full_path]
|
42
|
-
|
43
|
-
# Define __all__ so that import * works properly
|
44
|
-
__all__ = list(_IMPORTS.keys())
|
45
|
-
|
46
|
-
# Set up lazy loading for each class
|
47
|
-
for cls_name, lazy_module in _class_to_lazy_module.items():
|
48
|
-
setattr(sys.modules[__name__], cls_name, getattr(lazy_module, cls_name))
|
1
|
+
"""
|
2
|
+
RAG Tool and related components.
|
3
|
+
|
4
|
+
This module provides tools and utilities for Retrieval-Augmented Generation (RAG).
|
5
|
+
"""
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
# Explicit imports of all tools in the module
|
10
|
+
from .document_metadata import DocumentMetadata
|
11
|
+
from .query_response import QueryResponse
|
12
|
+
from .rag_tool import RagTool
|
13
|
+
from .rag_tool_beta import RagToolBeta
|
14
|
+
|
15
|
+
# Define __all__ to control what is imported with `from ... import *`
|
16
|
+
__all__ = [
|
17
|
+
'DocumentMetadata',
|
18
|
+
'QueryResponse',
|
19
|
+
'RagTool',
|
20
|
+
'RagToolBeta',
|
21
|
+
]
|
22
|
+
|
23
|
+
# Optional: Add logging for import confirmation
|
24
|
+
logger.info("RAG tools module initialized successfully.")
|