quantalogic 0.50.1__py3-none-any.whl → 0.50.2__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.
@@ -10,85 +10,94 @@ class LazyLoader:
10
10
  Lazily import a module only when its attributes are accessed.
11
11
  This helps reduce startup time by deferring imports until needed.
12
12
  """
13
- def __init__(self, module_path: str):
13
+ def __init__(self, module_path: str, optional: bool = False):
14
14
  self.module_path = module_path
15
15
  self._module = None
16
+ self.optional = optional
16
17
 
17
18
  def __getattr__(self, name: str) -> Any:
18
19
  if self._module is None:
19
- self._module = importlib.import_module(self.module_path)
20
+ try:
21
+ self._module = importlib.import_module(self.module_path)
22
+ except ImportError as e:
23
+ if self.optional:
24
+ # If the tool is optional, log a warning but don't raise an error
25
+ print(f"Warning: Optional tool {self.module_path} could not be imported: {e}")
26
+ return None
27
+ raise
28
+
20
29
  return getattr(self._module, name)
21
30
 
22
31
 
23
- # Map of tool names to their import paths
32
+ # Map of tool names to their import paths and optional status
24
33
  _TOOL_IMPORTS = {
25
- "AgentTool": ".agent_tool",
26
- "ComposioTool": ".composio.composio",
27
- "GenerateDatabaseReportTool": ".database.generate_database_report_tool",
28
- "SQLQueryToolAdvanced": ".database.sql_query_tool_advanced",
29
- "MarkdownToDocxTool": ".document_tools.markdown_to_docx_tool",
30
- "MarkdownToEpubTool": ".document_tools.markdown_to_epub_tool",
31
- "MarkdownToHtmlTool": ".document_tools.markdown_to_html_tool",
32
- "MarkdownToIpynbTool": ".document_tools.markdown_to_ipynb_tool",
33
- "MarkdownToLatexTool": ".document_tools.markdown_to_latex_tool",
34
- "MarkdownToPdfTool": ".document_tools.markdown_to_pdf_tool",
35
- "MarkdownToPptxTool": ".document_tools.markdown_to_pptx_tool",
36
- "DownloadHttpFileTool": ".download_http_file_tool",
37
- "DuckDuckGoSearchTool": ".duckduckgo_search_tool",
38
- "EditWholeContentTool": ".edit_whole_content_tool",
39
- "ElixirTool": ".elixir_tool",
40
- "ExecuteBashCommandTool": ".execute_bash_command_tool",
41
- "BitbucketCloneTool": ".git.bitbucket_clone_repo_tool",
42
- "BitbucketOperationsTool": ".git.bitbucket_operations_tool",
43
- "CloneRepoTool": ".git.clone_repo_tool",
44
- "GitOperationsTool": ".git.git_operations_tool",
45
- "GoogleNewsTool": ".google_packages.google_news_tool",
46
- "GrepAppTool": ".grep_app_tool",
47
- "LLMImageGenerationTool": ".image_generation.dalle_e",
48
- "InputQuestionTool": ".input_question_tool",
49
- "JinjaTool": ".jinja_tool",
50
- "ListDirectoryTool": ".list_directory_tool",
51
- "LLMTool": ".llm_tool",
52
- "LLMVisionTool": ".llm_vision_tool",
53
- "MarkitdownTool": ".markitdown_tool",
54
- "NasaApodTool": ".nasa_packages.nasa_apod_tool",
55
- "NasaNeoWsTool": ".nasa_packages.nasa_neows_tool",
56
- "NodeJsTool": ".nodejs_tool",
57
- "PresentationLLMTool": ".presentation_tools.presentation_llm_tool",
58
- "ProductHuntTool": ".product_hunt.product_hunt_tool",
59
- "PythonTool": ".python_tool",
60
- "RagTool": ".rag_tool.rag_tool",
61
- "ReadFileBlockTool": ".read_file_block_tool",
62
- "ReadFileTool": ".read_file_tool",
63
- "ReadHTMLTool": ".read_html_tool",
64
- "ReplaceInFileTool": ".replace_in_file_tool",
65
- "RipgrepTool": ".ripgrep_tool",
66
- "SafePythonInterpreterTool": ".safe_python_interpreter_tool",
67
- "SearchDefinitionNames": ".search_definition_names",
68
- "SequenceTool": ".sequence_tool",
69
- "SerpApiSearchTool": ".serpapi_search_tool",
70
- "SQLQueryTool": ".sql_query_tool",
71
- "TaskCompleteTool": ".task_complete_tool",
72
- "Tool": ".tool",
73
- "ToolArgument": ".tool",
74
- "UnifiedDiffTool": ".unified_diff_tool",
75
- "CSVProcessorTool": ".utilities.csv_processor_tool",
76
- "PrepareDownloadTool": ".utilities.download_file_tool",
77
- "MermaidValidatorTool": ".utilities.mermaid_validator_tool",
78
- "WikipediaSearchTool": ".wikipedia_search_tool",
79
- "WriteFileTool": ".write_file_tool",
34
+ "AgentTool": (".agent_tool", False),
35
+ "ComposioTool": (".composio.composio", False),
36
+ "GenerateDatabaseReportTool": (".database.generate_database_report_tool", False),
37
+ "SQLQueryToolAdvanced": (".database.sql_query_tool_advanced", False),
38
+ "MarkdownToDocxTool": (".document_tools.markdown_to_docx_tool", True),
39
+ "MarkdownToEpubTool": (".document_tools.markdown_to_epub_tool", True),
40
+ "MarkdownToHtmlTool": (".document_tools.markdown_to_html_tool", True),
41
+ "MarkdownToIpynbTool": (".document_tools.markdown_to_ipynb_tool", True),
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", False),
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),
80
89
  }
81
90
 
82
91
  # Create lazy loaders for each module path
83
92
  _lazy_modules: Dict[str, LazyLoader] = {}
84
- for tool, path in _TOOL_IMPORTS.items():
93
+ for tool, (path, optional) in _TOOL_IMPORTS.items():
85
94
  full_path = f"{__package__}{path}"
86
95
  if full_path not in _lazy_modules:
87
- _lazy_modules[full_path] = LazyLoader(full_path)
96
+ _lazy_modules[full_path] = LazyLoader(full_path, optional)
88
97
 
89
98
  # Set up attributes for lazy loading
90
99
  _tools_to_lazy_modules = {}
91
- for tool, path in _TOOL_IMPORTS.items():
100
+ for tool, (path, optional) in _TOOL_IMPORTS.items():
92
101
  full_path = f"{__package__}{path}"
93
102
  _tools_to_lazy_modules[tool] = _lazy_modules[full_path]
94
103
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quantalogic
3
- Version: 0.50.1
3
+ Version: 0.50.2
4
4
  Summary: QuantaLogic ReAct Agents
5
5
  Author: Raphaël MANSUY
6
6
  Author-email: raphael.mansuy@gmail.com
@@ -9,11 +9,14 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.12
10
10
  Classifier: Programming Language :: Python :: 3.13
11
11
  Requires-Dist: click (>=8.1.8,<9.0.0)
12
+ Requires-Dist: instructor (>=1.7.2,<2.0.0)
12
13
  Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
13
14
  Requires-Dist: litellm (>=1.56.4,<2.0.0)
14
15
  Requires-Dist: loguru (>=0.7.3,<0.8.0)
16
+ Requires-Dist: pathspec (>=0.12.1,<0.13.0)
15
17
  Requires-Dist: prompt-toolkit (>=3.0.48,<4.0.0)
16
18
  Requires-Dist: pydantic (>=2.10.4,<3.0.0)
19
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
17
20
  Requires-Dist: rich (>=13.9.4,<14.0.0)
18
21
  Requires-Dist: tenacity (>=9.0.0,<10.0.0)
19
22
  Description-Content-Type: text/markdown
@@ -38,7 +38,7 @@ quantalogic/server/templates/index.html,sha256=nDnXJoQEm1vXbhXtgaYk0G5VXj0wwzE6K
38
38
  quantalogic/task_file_reader.py,sha256=oPcB4vTxJ__Y8o7VVABIPOkVw3tGDMdQYwdK27PERlE,1440
39
39
  quantalogic/task_runner.py,sha256=c2QVGKZfHA0wZIBUvehpjMvtRaKZuhuYQerjIiCC9iY,10053
40
40
  quantalogic/tool_manager.py,sha256=vNA7aBKgdU3wpw_goom6i9rg_64pNZapNxvg4cUhhCI,6983
41
- quantalogic/tools/__init__.py,sha256=7_IhMLCJW3Hj1Uo0bXqFqIP71YQ2VTLBPCFCX6AnSag,4212
41
+ quantalogic/tools/__init__.py,sha256=AeXs2jtnY8mqHz7egpzVkRDl9W8-Gh0_-wyEnmC2QDE,5143
42
42
  quantalogic/tools/agent_tool.py,sha256=MXCXxWHRch7VK4UWhtRP1jeI8Np9Ne2CUGo8vm1oZiM,3064
43
43
  quantalogic/tools/composio/composio.py,sha256=icVHA_Scr1pViBhahGGBGBRBl9JSB3hGSqpgQzAIUH8,17627
44
44
  quantalogic/tools/database/generate_database_report_tool.py,sha256=lGgER2VuHqnxliPM806tbwJh7WRW9HJcbBLL7QMvVBQ,1861
@@ -141,8 +141,8 @@ quantalogic/version_check.py,sha256=JyQFTNMDWtpHCLnN-BiakzB2cyXf6kUFsTjvmSruZi4,
141
141
  quantalogic/welcome_message.py,sha256=o4tHdgabNuIV9kbIDPgS3_2yzJhayK30oKad2UouYDc,3020
142
142
  quantalogic/xml_parser.py,sha256=AKuMdJC3QAX3Z_tErHVlZ-msjPemWaZUFiTwkHz76jg,11614
143
143
  quantalogic/xml_tool_parser.py,sha256=Vz4LEgDbelJynD1siLOVkJ3gLlfHsUk65_gCwbYJyGc,3784
144
- quantalogic-0.50.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
145
- quantalogic-0.50.1.dist-info/METADATA,sha256=0GmRS_5DQVkR2tFLJAKH2PIcSkRk6tVRT4FhwR5Vmeg,22657
146
- quantalogic-0.50.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
- quantalogic-0.50.1.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
148
- quantalogic-0.50.1.dist-info/RECORD,,
144
+ quantalogic-0.50.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
145
+ quantalogic-0.50.2.dist-info/METADATA,sha256=XQ7ALbdA_f7UR-j7DE6umu3H2gatHiKtR4A2IeYS5Yo,22785
146
+ quantalogic-0.50.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
147
+ quantalogic-0.50.2.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
148
+ quantalogic-0.50.2.dist-info/RECORD,,