quantalogic 0.59.2__py3-none-any.whl → 0.60.0__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.py +268 -24
- quantalogic/create_custom_agent.py +26 -78
- quantalogic/prompts/chat_system_prompt.j2 +10 -7
- quantalogic/prompts/code_2_system_prompt.j2 +190 -0
- quantalogic/prompts/code_system_prompt.j2 +142 -0
- quantalogic/prompts/doc_system_prompt.j2 +178 -0
- quantalogic/prompts/legal_2_system_prompt.j2 +218 -0
- quantalogic/prompts/legal_system_prompt.j2 +140 -0
- quantalogic/prompts/system_prompt.j2 +6 -2
- quantalogic/prompts/task_prompt.j2 +1 -1
- quantalogic/prompts/tools_prompt.j2 +2 -4
- quantalogic/prompts.py +23 -4
- quantalogic/server/agent_server.py +1 -1
- quantalogic/tools/__init__.py +2 -0
- quantalogic/tools/duckduckgo_search_tool.py +1 -0
- quantalogic/tools/execute_bash_command_tool.py +114 -57
- quantalogic/tools/file_tracker_tool.py +49 -0
- quantalogic/tools/google_packages/google_news_tool.py +3 -0
- quantalogic/tools/image_generation/dalle_e.py +89 -137
- quantalogic/tools/rag_tool/__init__.py +2 -9
- quantalogic/tools/rag_tool/document_rag_sources_.py +728 -0
- quantalogic/tools/rag_tool/ocr_pdf_markdown.py +144 -0
- quantalogic/tools/replace_in_file_tool.py +1 -1
- quantalogic/tools/terminal_capture_tool.py +293 -0
- quantalogic/tools/tool.py +4 -0
- quantalogic/tools/utilities/__init__.py +2 -0
- quantalogic/tools/utilities/download_file_tool.py +3 -5
- quantalogic/tools/utilities/llm_tool.py +283 -0
- quantalogic/tools/utilities/selenium_tool.py +296 -0
- quantalogic/tools/utilities/vscode_tool.py +1 -1
- quantalogic/tools/web_navigation/__init__.py +5 -0
- quantalogic/tools/web_navigation/web_tool.py +145 -0
- quantalogic/tools/write_file_tool.py +72 -36
- {quantalogic-0.59.2.dist-info → quantalogic-0.60.0.dist-info}/METADATA +2 -2
- {quantalogic-0.59.2.dist-info → quantalogic-0.60.0.dist-info}/RECORD +38 -29
- quantalogic/tools/rag_tool/document_metadata.py +0 -15
- quantalogic/tools/rag_tool/query_response.py +0 -20
- quantalogic/tools/rag_tool/rag_tool.py +0 -566
- quantalogic/tools/rag_tool/rag_tool_beta.py +0 -264
- {quantalogic-0.59.2.dist-info → quantalogic-0.60.0.dist-info}/LICENSE +0 -0
- {quantalogic-0.59.2.dist-info → quantalogic-0.60.0.dist-info}/WHEEL +0 -0
- {quantalogic-0.59.2.dist-info → quantalogic-0.60.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,145 @@
|
|
1
|
+
"""Web Navigation Tool using browser-use for automated web interactions."""
|
2
|
+
|
3
|
+
import asyncio
|
4
|
+
from typing import Callable, Optional
|
5
|
+
|
6
|
+
from loguru import logger
|
7
|
+
from pydantic import ConfigDict, Field
|
8
|
+
|
9
|
+
from browser_use import Agent
|
10
|
+
from langchain_openai import ChatOpenAI
|
11
|
+
from quantalogic.tools.tool import Tool, ToolArgument
|
12
|
+
|
13
|
+
|
14
|
+
class WebNavigationTool(Tool):
|
15
|
+
"""Tool for automated web navigation and interaction using browser-use."""
|
16
|
+
|
17
|
+
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
18
|
+
|
19
|
+
name: str = Field(default="web_navigation")
|
20
|
+
description: str = Field(
|
21
|
+
default=(
|
22
|
+
"Navigate and interact with web pages using natural language instructions. "
|
23
|
+
"This tool can perform tasks like searching, comparing prices, filling forms, "
|
24
|
+
"and extracting information from websites."
|
25
|
+
)
|
26
|
+
)
|
27
|
+
arguments: list = Field(
|
28
|
+
default=[
|
29
|
+
ToolArgument(
|
30
|
+
name="task",
|
31
|
+
arg_type="string",
|
32
|
+
description="The web navigation task to perform in natural language",
|
33
|
+
required=True,
|
34
|
+
example="Search Python documentation for asyncio examples",
|
35
|
+
),
|
36
|
+
ToolArgument(
|
37
|
+
name="model_name",
|
38
|
+
arg_type="string",
|
39
|
+
description="The OpenAI model to use (e.g. gpt-3.5-turbo, gpt-4)",
|
40
|
+
required=True,
|
41
|
+
default="gpt-3.5-turbo",
|
42
|
+
example="gpt-3.5-turbo",
|
43
|
+
),
|
44
|
+
]
|
45
|
+
)
|
46
|
+
|
47
|
+
llm: Optional[ChatOpenAI] = Field(default=None, exclude=True)
|
48
|
+
agent: Optional[Agent] = Field(default=None, exclude=True)
|
49
|
+
|
50
|
+
def __init__(
|
51
|
+
self,
|
52
|
+
model_name: str = "gpt-3.5-turbo",
|
53
|
+
name: str = "web_navigation",
|
54
|
+
) -> None:
|
55
|
+
"""Initialize the WebNavigationTool.
|
56
|
+
|
57
|
+
Args:
|
58
|
+
model_name: OpenAI model to use. Defaults to "gpt-3.5-turbo".
|
59
|
+
name: Name of the tool instance. Defaults to "web_navigation".
|
60
|
+
"""
|
61
|
+
super().__init__(
|
62
|
+
**{
|
63
|
+
"name": name,
|
64
|
+
"model_name": model_name,
|
65
|
+
}
|
66
|
+
)
|
67
|
+
self.model_post_init(None)
|
68
|
+
|
69
|
+
def model_post_init(self, __context: None) -> None:
|
70
|
+
"""Initialize the LLM after model initialization.
|
71
|
+
|
72
|
+
Args:
|
73
|
+
__context: Unused context parameter.
|
74
|
+
|
75
|
+
Raises:
|
76
|
+
ValueError: If LLM initialization fails.
|
77
|
+
"""
|
78
|
+
try:
|
79
|
+
self.llm = ChatOpenAI(model=self.model_name)
|
80
|
+
logger.debug(f"Initialized WebNavigationTool with model: {self.model_name}")
|
81
|
+
except Exception as e:
|
82
|
+
logger.error(f"Error initializing LLM: {e}")
|
83
|
+
raise ValueError(f"Failed to initialize LLM: {e}") from e
|
84
|
+
|
85
|
+
async def async_execute(self, task: str, model_name: Optional[str] = None) -> str:
|
86
|
+
"""Execute the web navigation task asynchronously.
|
87
|
+
|
88
|
+
Args:
|
89
|
+
task: The web navigation task to perform.
|
90
|
+
model_name: Optional override for the LLM model.
|
91
|
+
|
92
|
+
Returns:
|
93
|
+
The result of the web navigation task.
|
94
|
+
|
95
|
+
Raises:
|
96
|
+
ValueError: If task is empty or LLM is not initialized.
|
97
|
+
RuntimeError: If web navigation fails.
|
98
|
+
"""
|
99
|
+
if not task:
|
100
|
+
raise ValueError("Task cannot be empty")
|
101
|
+
|
102
|
+
if not self.llm:
|
103
|
+
raise ValueError("LLM not initialized")
|
104
|
+
|
105
|
+
try:
|
106
|
+
# Create a new Agent instance for each task
|
107
|
+
agent = Agent(
|
108
|
+
task=task,
|
109
|
+
llm=self.llm,
|
110
|
+
)
|
111
|
+
|
112
|
+
# Run the agent
|
113
|
+
result = await agent.run()
|
114
|
+
logger.debug(f"Completed web navigation task: {task}")
|
115
|
+
return result
|
116
|
+
|
117
|
+
except Exception as e:
|
118
|
+
logger.error(f"Error during web navigation: {e}")
|
119
|
+
raise RuntimeError(f"Web navigation failed: {e}") from e
|
120
|
+
|
121
|
+
def execute(self, task: str, model_name: Optional[str] = None) -> str:
|
122
|
+
"""Execute the web navigation task synchronously.
|
123
|
+
|
124
|
+
Args:
|
125
|
+
task: The web navigation task to perform.
|
126
|
+
model_name: Optional override for the LLM model.
|
127
|
+
|
128
|
+
Returns:
|
129
|
+
The result of the web navigation task.
|
130
|
+
"""
|
131
|
+
return asyncio.run(self.async_execute(task=task, model_name=model_name))
|
132
|
+
|
133
|
+
|
134
|
+
if __name__ == "__main__":
|
135
|
+
# Example usage
|
136
|
+
tool = WebNavigationTool()
|
137
|
+
task = "Search Python documentation for asyncio examples"
|
138
|
+
|
139
|
+
try:
|
140
|
+
# Synchronous execution
|
141
|
+
result = tool.execute(task=task)
|
142
|
+
print("Navigation Result:")
|
143
|
+
print(result)
|
144
|
+
except Exception as e:
|
145
|
+
logger.error(f"Example failed: {e}")
|
@@ -1,23 +1,25 @@
|
|
1
1
|
"""Tool for writing a file and returning its content."""
|
2
2
|
|
3
3
|
import os
|
4
|
+
from pathlib import Path
|
4
5
|
|
6
|
+
from loguru import logger
|
5
7
|
from quantalogic.tools.tool import Tool, ToolArgument
|
6
8
|
|
7
9
|
|
8
10
|
class WriteFileTool(Tool):
|
9
|
-
"""Tool for writing a text file."""
|
11
|
+
"""Tool for writing a text file in /tmp directory."""
|
10
12
|
|
11
13
|
name: str = "write_file_tool"
|
12
|
-
description: str = "Writes a file with the given content. The tool will fail if the file already exists when not used in append mode."
|
14
|
+
description: str = "Writes a file with the given content in /tmp directory. The tool will fail if the file already exists when not used in append mode."
|
13
15
|
need_validation: bool = True
|
14
16
|
arguments: list = [
|
15
17
|
ToolArgument(
|
16
18
|
name="file_path",
|
17
19
|
arg_type="string",
|
18
|
-
description="The
|
20
|
+
description="The name of the file to write in /tmp directory. Can include subdirectories within /tmp.",
|
19
21
|
required=True,
|
20
|
-
example="/
|
22
|
+
example="/tmp/myfile.txt or myfile.txt",
|
21
23
|
),
|
22
24
|
ToolArgument(
|
23
25
|
name="content",
|
@@ -47,50 +49,84 @@ class WriteFileTool(Tool):
|
|
47
49
|
),
|
48
50
|
]
|
49
51
|
|
52
|
+
def _ensure_tmp_path(self, file_path: str) -> str:
|
53
|
+
"""Ensures the file path is within /tmp directory.
|
54
|
+
|
55
|
+
Args:
|
56
|
+
file_path (str): The original file path
|
57
|
+
|
58
|
+
Returns:
|
59
|
+
str: Normalized path within /tmp
|
60
|
+
|
61
|
+
Raises:
|
62
|
+
ValueError: If the path attempts to escape /tmp
|
63
|
+
"""
|
64
|
+
# Ensure /tmp exists and is writable
|
65
|
+
tmp_dir = Path("/tmp")
|
66
|
+
if not (tmp_dir.exists() and os.access(tmp_dir, os.W_OK)):
|
67
|
+
raise ValueError("Error: /tmp directory is not accessible")
|
68
|
+
|
69
|
+
# If path doesn't start with /tmp, prepend it
|
70
|
+
if not file_path.startswith("/tmp/"):
|
71
|
+
file_path = os.path.join("/tmp", file_path.lstrip("/"))
|
72
|
+
|
73
|
+
# Resolve the absolute path and check if it's really in /tmp
|
74
|
+
real_path = os.path.realpath(file_path)
|
75
|
+
if not real_path.startswith("/tmp/"):
|
76
|
+
raise ValueError("Error: Cannot write files outside of /tmp directory")
|
77
|
+
|
78
|
+
return real_path
|
79
|
+
|
50
80
|
def execute(self, file_path: str, content: str, append_mode: str = "False", overwrite: str = "False") -> str:
|
51
|
-
"""Writes a file with the given content.
|
81
|
+
"""Writes a file with the given content in /tmp directory.
|
52
82
|
|
53
83
|
Args:
|
54
|
-
file_path (str): The path to the file to write.
|
84
|
+
file_path (str): The path to the file to write (will be forced to /tmp).
|
55
85
|
content (str): The content to write to the file.
|
56
86
|
append_mode (str, optional): If true, append content to existing file. Defaults to "False".
|
57
87
|
overwrite (str, optional): If true, overwrite existing file. Defaults to "False".
|
58
88
|
|
59
89
|
Returns:
|
60
|
-
str:
|
90
|
+
str: Status message with file path and size.
|
61
91
|
|
62
92
|
Raises:
|
63
93
|
FileExistsError: If the file already exists and append_mode is False and overwrite is False.
|
94
|
+
ValueError: If attempting to write outside /tmp or if /tmp is not accessible.
|
64
95
|
"""
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
f.
|
92
|
-
|
93
|
-
|
96
|
+
try:
|
97
|
+
# Convert mode strings to booleans
|
98
|
+
append_mode_bool = append_mode.lower() in ["true", "1", "yes"]
|
99
|
+
overwrite_bool = overwrite.lower() in ["true", "1", "yes"]
|
100
|
+
|
101
|
+
# Ensure path is in /tmp and normalize it
|
102
|
+
file_path = self._ensure_tmp_path(file_path)
|
103
|
+
|
104
|
+
# Ensure parent directory exists (only within /tmp)
|
105
|
+
parent_dir = os.path.dirname(file_path)
|
106
|
+
if parent_dir.startswith("/tmp/"):
|
107
|
+
os.makedirs(parent_dir, exist_ok=True)
|
108
|
+
|
109
|
+
# Determine file write mode based on append_mode
|
110
|
+
mode = "a" if append_mode_bool else "w"
|
111
|
+
|
112
|
+
# Check if file already exists and not in append mode and not in overwrite mode
|
113
|
+
if os.path.exists(file_path) and not append_mode_bool and not overwrite_bool:
|
114
|
+
raise FileExistsError(
|
115
|
+
f"File {file_path} already exists. Set append_mode=True to append or overwrite=True to overwrite."
|
116
|
+
)
|
117
|
+
|
118
|
+
with open(file_path, mode, encoding="utf-8") as f:
|
119
|
+
f.write(content)
|
120
|
+
|
121
|
+
file_size = os.path.getsize(file_path)
|
122
|
+
return f"File {file_path} {'appended to' if append_mode_bool else 'written'} successfully. Size: {file_size} bytes."
|
123
|
+
|
124
|
+
except (ValueError, FileExistsError) as e:
|
125
|
+
logger.error(f"Write file error: {str(e)}")
|
126
|
+
raise
|
127
|
+
except Exception as e:
|
128
|
+
logger.error(f"Unexpected error writing file: {str(e)}")
|
129
|
+
raise ValueError(f"Failed to write file: {str(e)}")
|
94
130
|
|
95
131
|
|
96
132
|
if __name__ == "__main__":
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quantalogic
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.60.0
|
4
4
|
Summary: QuantaLogic ReAct Agents
|
5
5
|
Author: Raphaël MANSUY
|
6
6
|
Author-email: raphael.mansuy@gmail.com
|
@@ -47,7 +47,7 @@ Requires-Dist: types-pyyaml (>=6.0.12.20241230,<7.0.0.0)
|
|
47
47
|
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
|
48
48
|
Description-Content-Type: text/markdown
|
49
49
|
|
50
|
-
|
50
|
+
|
51
51
|
[](https://quantalogic.github.io/quantalogic/)
|
52
52
|
|
53
53
|
Hey there, welcome to **QuantaLogic**—your cosmic toolkit for crafting AI agents and workflows that shine! Whether you’re coding up a storm, automating a business process, chatting with a clever assistant, or dreaming up something wild, QuantaLogic is here to make it happen. We’re talking **large language models (LLMs)** fused with a stellar toolset, featuring three powerhouse approaches: the **ReAct framework** for dynamic problem-solving, the dazzling new **Flow module** for structured brilliance, and a shiny **Chat mode** for conversational magic with tool-calling capabilities.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
quantalogic/__init__.py,sha256=qFbvfHOd_chAu536pH816E3uo6CdyAgXCpQOwMXXVnY,1076
|
2
|
-
quantalogic/agent.py,sha256=
|
2
|
+
quantalogic/agent.py,sha256=VChZXFLEsIIrBtXVQZ-FGZ72GCUXDL3g9br8Vo1t5V8,75072
|
3
3
|
quantalogic/agent_config.py,sha256=fPyMfm77BzimyfyFkTzb2ZdyZtGlr2fq5aTRETu77Vs,8202
|
4
4
|
quantalogic/agent_factory.py,sha256=NrgN7cSppmwh7QkP4Tak9f9TmRZAoAOUbRb3_bUgGq8,6870
|
5
5
|
quantalogic/coding_agent.py,sha256=A-firiPWQjMC56B329Ne606_v2GsoF5-nxcuz3rVbYM,5496
|
6
6
|
quantalogic/config.py,sha256=bmPI2rvQ9M8Zdl1H7K588JgJdnkxSE0L5_i5aBqsagA,564
|
7
7
|
quantalogic/console_print_events.py,sha256=yDtfOr7s5r_gLTgwkl_XoKSkUqNRZhqqq4hwR_oJsUw,2050
|
8
8
|
quantalogic/console_print_token.py,sha256=5IRVoPhwWZtSc4LpNoAsCQhCB_RnAW9chycGgyD3_5U,437
|
9
|
-
quantalogic/create_custom_agent.py,sha256=
|
9
|
+
quantalogic/create_custom_agent.py,sha256=g9qh6w436wkiOYVii6f3SPRRY0wyPQ_bL07WnD1JSx0,19989
|
10
10
|
quantalogic/docs_cli.py,sha256=Ie6NwKQuxLKwVQ-cjhFMCttXeiHDjGhNY4hSmMtc0Qg,1664
|
11
11
|
quantalogic/event_emitter.py,sha256=wxzXrNhGiXAaa4EX7qTZEa81i3Mn4JKaU_T6E05QclE,16805
|
12
12
|
quantalogic/flow/__init__.py,sha256=MD5FAdD6jnVnTPMIOmToKjFxHBQvLmOCT0VeaWhASBc,1295
|
@@ -30,20 +30,25 @@ quantalogic/model_info.py,sha256=j7QqvjEFQDGpDOgQs8uTkVyI3a50Oa_nrsQjyxizTLc,272
|
|
30
30
|
quantalogic/model_info_list.py,sha256=Xeeb7QS4xEpe9ke7Guh0CxEx-Hl59U4kC-qzVts-eAU,2437
|
31
31
|
quantalogic/model_info_litellm.py,sha256=Uoo8ZATjqH6POnTE3Ee3kfHfFllPYp8LkvJwlJjFZH8,2089
|
32
32
|
quantalogic/model_names.py,sha256=UZlz25zG9B2dpfwdw_e1Gw5qFsKQ7iME9FJh9Ts4u6s,938
|
33
|
-
quantalogic/prompts/chat_system_prompt.j2,sha256=
|
33
|
+
quantalogic/prompts/chat_system_prompt.j2,sha256=DhYEdWRsNzLb4EVqD814dkre52E5Zy1XD1dHufbvvgw,1454
|
34
|
+
quantalogic/prompts/code_2_system_prompt.j2,sha256=soB10T85nRiXJkng-waA3g4A4bhh4_ejDey3qCiw8OA,7802
|
35
|
+
quantalogic/prompts/code_system_prompt.j2,sha256=A-aZtUBLBlHqFqk4JM1N-xco4j4IVwzzEk8dPQBUAxU,5338
|
36
|
+
quantalogic/prompts/doc_system_prompt.j2,sha256=6VAfYAM4z2Dkc5zbTIA-rWF5_IpBSe0uylx4lR90evc,7803
|
37
|
+
quantalogic/prompts/legal_2_system_prompt.j2,sha256=8aktOQFLr8n1bmbkOHJOgaovhEq4vIHH1rS6thMZXqI,11164
|
38
|
+
quantalogic/prompts/legal_system_prompt.j2,sha256=OSrV2KWF7CvzprZsoIIzVwVctjltEC29karVd_fIOSA,6568
|
34
39
|
quantalogic/prompts/memory_compaction_prompt.j2,sha256=Xsy9XKN7zxL4wNnNjWWlUjYjmtktgtee5dDG4dSvRW8,569
|
35
40
|
quantalogic/prompts/observation_response_format.j2,sha256=lvyveAJbXbc94aIvHgppKyaD9Tf7X5bCTGWjh51BDjI,1655
|
36
41
|
quantalogic/prompts/repeated_tool_call_error.j2,sha256=IRENR3a3D28Dtys-kGDP-x_uSkJnxeQZ5-jYHWv_3G4,319
|
37
|
-
quantalogic/prompts/system_prompt.j2,sha256=
|
38
|
-
quantalogic/prompts/task_prompt.j2,sha256=
|
42
|
+
quantalogic/prompts/system_prompt.j2,sha256=p4aujPnlhvYrKuZQAjC4Ck7O96QCITcBItdG1XhFQrE,2683
|
43
|
+
quantalogic/prompts/task_prompt.j2,sha256=RFKgF-6opuUu-dma5TT8O_V60n3GCPi6-ott4LUcJXw,280
|
39
44
|
quantalogic/prompts/task_summary_prompt.j2,sha256=fcjV96nqi6jsfR8l6uyep20rCaOi-zOReKmvoAnwz7c,205
|
40
|
-
quantalogic/prompts/tools_prompt.j2,sha256=
|
45
|
+
quantalogic/prompts/tools_prompt.j2,sha256=ZjvTAZtAk-FmzDb1QuyDJg1hzo-FqayQ7wN_ytHAi2s,385
|
41
46
|
quantalogic/prompts/variables_prompt.j2,sha256=N3OsMbzy3PfEUqYZVF_34wVidhh2ghVToSgdRCv2qgM,231
|
42
|
-
quantalogic/prompts.py,sha256=
|
47
|
+
quantalogic/prompts.py,sha256=zqmyosq4hdYpzHI-FG0m5CKV2wQnjgyMJf6Vo1ZaLW4,1982
|
43
48
|
quantalogic/quantlitellm.py,sha256=nf-awyOxP0ANoAPGHNvHfdLu8gNn65L39gl7x4saIQc,5550
|
44
49
|
quantalogic/search_agent.py,sha256=tr0cwscJ4wu_G1aumjFyvGHQ0eQv5OL5sxj17s6Ocls,2470
|
45
50
|
quantalogic/server/__init__.py,sha256=8sz_PYAUCrkM6JM5EAUeIzNM4NPW6j6UT72JVkc21WQ,91
|
46
|
-
quantalogic/server/agent_server.py,sha256=
|
51
|
+
quantalogic/server/agent_server.py,sha256=7kj-HBRBBkdUT0pCyX6peTUZc-3VG_IY1XgtV8hespk,22949
|
47
52
|
quantalogic/server/models.py,sha256=_j6dAx3L_w0kiP55vcC5uykJJRfChV2K3uL_xAPnsms,1447
|
48
53
|
quantalogic/server/routes.py,sha256=00nFe6s0T4Gv8vCp0wQFjWGo1tC8FViH8h0koAJdWs4,4216
|
49
54
|
quantalogic/server/state.py,sha256=TwtL0BTp_LT-fynF1IR4k8WVXuxXWtSv3NgWG9fuUME,7369
|
@@ -53,7 +58,7 @@ quantalogic/server/templates/index.html,sha256=nDnXJoQEm1vXbhXtgaYk0G5VXj0wwzE6K
|
|
53
58
|
quantalogic/task_file_reader.py,sha256=oPcB4vTxJ__Y8o7VVABIPOkVw3tGDMdQYwdK27PERlE,1440
|
54
59
|
quantalogic/task_runner.py,sha256=NB7TqNuwCstCAsTkjGcJSQRapNk8-iXe7d_2qf-fs1s,15815
|
55
60
|
quantalogic/tool_manager.py,sha256=vNA7aBKgdU3wpw_goom6i9rg_64pNZapNxvg4cUhhCI,6983
|
56
|
-
quantalogic/tools/__init__.py,sha256=
|
61
|
+
quantalogic/tools/__init__.py,sha256=5OAPYyER-a6KSk4WAIsQ7-1ze6KErfq-gZhxyAKR4_s,2344
|
57
62
|
quantalogic/tools/agent_tool.py,sha256=MXCXxWHRch7VK4UWhtRP1jeI8Np9Ne2CUGo8vm1oZiM,3064
|
58
63
|
quantalogic/tools/composio/__init__.py,sha256=Yo9ygNx0qQILVhIfRgqpO8fgnCgp5WoZMd3Hm5D20GY,429
|
59
64
|
quantalogic/tools/composio/composio.py,sha256=icVHA_Scr1pViBhahGGBGBRBl9JSB3hGSqpgQzAIUH8,17627
|
@@ -69,10 +74,11 @@ quantalogic/tools/document_tools/markdown_to_latex_tool.py,sha256=SxQ9gdDm2KuAuI
|
|
69
74
|
quantalogic/tools/document_tools/markdown_to_pdf_tool.py,sha256=EZOXPlF2pn10XzzOVFXqOopSP35tqXuj-YrFzeS5xQg,21077
|
70
75
|
quantalogic/tools/document_tools/markdown_to_pptx_tool.py,sha256=Bg79e1us2GAjB8vUa3COk2XgXM_FUQF28zWBIitYAC8,11085
|
71
76
|
quantalogic/tools/download_http_file_tool.py,sha256=wTfanbXjIRi5-qrbluuLvNmDNhvmYAnlMVb3dO8C2ss,2210
|
72
|
-
quantalogic/tools/duckduckgo_search_tool.py,sha256=
|
77
|
+
quantalogic/tools/duckduckgo_search_tool.py,sha256=FRHgHehRek4SkcKC4lxEzAEIhQ8-ege5COteXj3Ci98,7027
|
73
78
|
quantalogic/tools/edit_whole_content_tool.py,sha256=nXmpAvojvqvAcqNMy1kUKZ1ocboky_ZcnCR4SNCSPgw,2360
|
74
79
|
quantalogic/tools/elixir_tool.py,sha256=fzPPtAW-Koy9KB0r5k2zV1f1U0WphL-LXPPOBkeNkug,7652
|
75
|
-
quantalogic/tools/execute_bash_command_tool.py,sha256=
|
80
|
+
quantalogic/tools/execute_bash_command_tool.py,sha256=dNQmi-hjVzwdQNa6xHqvqOo4V02qefuO5dm5NnuJZqI,9620
|
81
|
+
quantalogic/tools/file_tracker_tool.py,sha256=4PWBVB7MzhFlLE62bDGVhoC2Gpn2VzdMFT5lRsyADEI,1700
|
76
82
|
quantalogic/tools/finance/__init__.py,sha256=b_RMQw6fHr9Rsptk0M3AUrXgewhC1kJa8v59FP5zNpc,933
|
77
83
|
quantalogic/tools/finance/alpha_vantage_tool.py,sha256=2nAOTGlxKePM2VnBOtDTfHJH4WgM8ys81WDGV2SDIgo,16526
|
78
84
|
quantalogic/tools/finance/ccxt_tool.py,sha256=kCLrAzy-Zc0Bz7Ey8Jdi9RhyaQp6L7d2Q3Mnu_lPueU,15411
|
@@ -88,10 +94,10 @@ quantalogic/tools/git/bitbucket_operations_tool.py,sha256=6Vdelau1VSTYREtuQgHlV-
|
|
88
94
|
quantalogic/tools/git/clone_repo_tool.py,sha256=FA_29pmEsy_71YSrt94M0rAUNt_rEo4TDvq2Y7-uinU,7565
|
89
95
|
quantalogic/tools/git/git_operations_tool.py,sha256=tZqY7fXXfiLkArV_18pEmqreqF6n6BALo0jFy4Hjzfs,20610
|
90
96
|
quantalogic/tools/google_packages/__init__.py,sha256=BIf2t1oJQTCfbh7qZZAzQGIHVQyWiZQ559OwmYrG1A0,452
|
91
|
-
quantalogic/tools/google_packages/google_news_tool.py,sha256=
|
97
|
+
quantalogic/tools/google_packages/google_news_tool.py,sha256=3ktgtXauJt8EzUAXZTqJyx1WEC51ex7_XBKJhQp35Ic,11857
|
92
98
|
quantalogic/tools/grep_app_tool.py,sha256=qAKgqMTtoH82bEZkiNlIk5oDSgVckFgxVXhU7ieTJwc,18672
|
93
99
|
quantalogic/tools/image_generation/__init__.py,sha256=7_ckDTy0ZHW34S9ZIQJqeRCZisdBbAtH-1CLO-8_yUI,455
|
94
|
-
quantalogic/tools/image_generation/dalle_e.py,sha256=
|
100
|
+
quantalogic/tools/image_generation/dalle_e.py,sha256=F6RGPmiS0eq-BjeJrwkrCCbQMGypNGz9SUHzJCI8SQI,8711
|
95
101
|
quantalogic/tools/input_question_tool.py,sha256=UoTlNhdmdr-eyiVtVCG2qJe_R4bU_ag-DzstSdmYkvM,1848
|
96
102
|
quantalogic/tools/jinja_tool.py,sha256=i49F6lSdTx5KMgP5Y9KKYprcc_OEc11TvEqqtDA5mas,2849
|
97
103
|
quantalogic/tools/language_handlers/__init__.py,sha256=5FSwHqTXzRL52Eme4yocw1RzOqWCVq7a5FyLEd7uSEM,1161
|
@@ -120,15 +126,13 @@ quantalogic/tools/product_hunt/__init__.py,sha256=v729REf13ioQNg4SH6ZTkAMo5TfgAa
|
|
120
126
|
quantalogic/tools/product_hunt/product_hunt_tool.py,sha256=vtjnV6v46BcNYlxudUCq5JIkjznQFUt8Kx9VD4KEPa8,8533
|
121
127
|
quantalogic/tools/product_hunt/services.py,sha256=ym10ZW4q8w03wIkZDnwl9d_nCoOz2WAj3N6C0qY0dfI,2280
|
122
128
|
quantalogic/tools/python_tool.py,sha256=70HLbfU2clOBgj4axDOtIKzXwEBMNGEAX1nGSf-KNNQ,18156
|
123
|
-
quantalogic/tools/rag_tool/__init__.py,sha256=
|
124
|
-
quantalogic/tools/rag_tool/
|
125
|
-
quantalogic/tools/rag_tool/
|
126
|
-
quantalogic/tools/rag_tool/rag_tool.py,sha256=FEccrd_IorVi1b3FzEu2huZPavSlaF-0p0IiWIGON74,21073
|
127
|
-
quantalogic/tools/rag_tool/rag_tool_beta.py,sha256=6ydWH5N2-M06p1XAsfxC8GREktIOz6AAsFTPGEZUnbU,9525
|
129
|
+
quantalogic/tools/rag_tool/__init__.py,sha256=OzQ7_MxMvHupkt-1XAm5hAK8Saz2u2LxEH_v0k6yJSA,406
|
130
|
+
quantalogic/tools/rag_tool/document_rag_sources_.py,sha256=WYtiAZA0P546pBYtz0pCmN8SizsUA7PIrp9dKKp7naw,28575
|
131
|
+
quantalogic/tools/rag_tool/ocr_pdf_markdown.py,sha256=SqHvAWToSM0nLLLor5jVElPC6dBm94_ihio-Z-Q2WTI,5479
|
128
132
|
quantalogic/tools/read_file_block_tool.py,sha256=FTcDAUOOPQOvWRjnRI6nMI1Upus90klR4PC0pbPP_S8,5266
|
129
133
|
quantalogic/tools/read_file_tool.py,sha256=l6k-SOIV9krpXAmUTkxzua51S-KHgzGqkcDlD5AD8K0,2710
|
130
134
|
quantalogic/tools/read_html_tool.py,sha256=KmXTeSrQZj0L-OAwl3xZQybdAhhyAeK3wgblhXgf3oM,10999
|
131
|
-
quantalogic/tools/replace_in_file_tool.py,sha256=
|
135
|
+
quantalogic/tools/replace_in_file_tool.py,sha256=gux6uCXk4gvIMynw7NMAGPvdWKuSIc9JWTWZyuR5OgQ,13853
|
132
136
|
quantalogic/tools/ripgrep_tool.py,sha256=sRzHaWac9fa0cCGhECJN04jw_Ko0O3u45KDWzMIYcvY,14291
|
133
137
|
quantalogic/tools/safe_python_interpreter_tool.py,sha256=eqwI0sHNt4mTvd8witCc0cecydKJNXNN3HNFfr4sCkI,8036
|
134
138
|
quantalogic/tools/search_definition_names.py,sha256=zqtaqq8aS5jdDQOkbd4wMUPFyL6Bq-4q9NWyLKdXL1E,18771
|
@@ -136,18 +140,23 @@ quantalogic/tools/sequence_tool.py,sha256=Hb2FSjWWACvXZX7rmJXPk5lnnnqaDeRTbhQQRt
|
|
136
140
|
quantalogic/tools/serpapi_search_tool.py,sha256=sX-Noch77kGP2XiwislPNFyy3_4TH6TwMK6C81L3q9Y,5316
|
137
141
|
quantalogic/tools/sql_query_tool.py,sha256=jEDZLlxOsB2bzsWlEqsqvTKiyovnRuk0XvgtwW7-WSQ,6055
|
138
142
|
quantalogic/tools/task_complete_tool.py,sha256=L8tuyVoN07Q2hOsxx17JTW0C5Jd_N-C0i_0PtCUQUKU,929
|
139
|
-
quantalogic/tools/
|
143
|
+
quantalogic/tools/terminal_capture_tool.py,sha256=I3Ik9JSgHUPb5eV7ArZv9PISofkWWLh_7fCqX4RJRAg,10567
|
144
|
+
quantalogic/tools/tool.py,sha256=I0eTKf45andzQOcQ-6Bh4xB5aympbhwfhhUGGLyRmbU,15802
|
140
145
|
quantalogic/tools/unified_diff_tool.py,sha256=o7OiYnCM5MjbPlQTpB2OmkMQRI9zjdToQmgVkhiTvOI,14148
|
141
|
-
quantalogic/tools/utilities/__init__.py,sha256=
|
146
|
+
quantalogic/tools/utilities/__init__.py,sha256=cOsQLYzJDnTY7mUjYaMSF_jmb5kez34MQc9xCWxm2NE,733
|
142
147
|
quantalogic/tools/utilities/csv_processor_tool.py,sha256=Mu_EPVj6iYAclNaVX_vbkekxcNwPYwy7dW1SCY22EwY,9023
|
143
|
-
quantalogic/tools/utilities/download_file_tool.py,sha256=
|
148
|
+
quantalogic/tools/utilities/download_file_tool.py,sha256=DN93jRTVC01MzBYgUEezKqpE0S7TOyFwk3G86IH3WtE,6544
|
149
|
+
quantalogic/tools/utilities/llm_tool.py,sha256=tb0uaqJBNZqNmekX1Is-wHov1B3BDVRJPJBjQ4vmnZM,10328
|
144
150
|
quantalogic/tools/utilities/mermaid_validator_tool.py,sha256=Brd6pt8OxpUgf8dm6kHqJJs_IU8V4Kc-8VDP-n1eCUM,25886
|
145
|
-
quantalogic/tools/utilities/
|
151
|
+
quantalogic/tools/utilities/selenium_tool.py,sha256=UrfQSF62UoADPuRPqP8x9_jIL6YyPIhaT589I6D5Lfw,10449
|
152
|
+
quantalogic/tools/utilities/vscode_tool.py,sha256=M248_464I3FWHuvrTVPbrF6czXe0n45_o315TFRD-6U,4363
|
146
153
|
quantalogic/tools/utils/__init__.py,sha256=-NtMSwxRt_G79Oo_DcDaCdLU2vLvuXIoCd34TOYEUmI,334
|
147
154
|
quantalogic/tools/utils/create_sample_database.py,sha256=h5c_uxv3eztQvHlloTZxzWt5gEzai8zfnR8-_QrUqxU,3724
|
148
155
|
quantalogic/tools/utils/generate_database_report.py,sha256=3PT34ClMvZ2O62-24cp_5lOyZHY_pBjVObMHpfyVi-s,10140
|
156
|
+
quantalogic/tools/web_navigation/__init__.py,sha256=O7SkVqbGwN4zt8Sm3H8AHF9451FSgI5h0J3fDj1rFS4,142
|
157
|
+
quantalogic/tools/web_navigation/web_tool.py,sha256=AxAxQLUNwCElqxP2ceOOjHVY80ck-Md-uNsjHdR9ErA,4721
|
149
158
|
quantalogic/tools/wikipedia_search_tool.py,sha256=LXQSPH8961Efw2QNxKe-cD5ZiIYD3ufEgrxH4y5uB74,5180
|
150
|
-
quantalogic/tools/write_file_tool.py,sha256=
|
159
|
+
quantalogic/tools/write_file_tool.py,sha256=qyRhDwE77rakRb_CuAC00V0E2vqIRNxwKD4PHLGgyW8,5230
|
151
160
|
quantalogic/utils/__init__.py,sha256=hsS3hXH5lsBQcZh2QBANY1Af2Zs1jtrgxA7kXJEWi58,680
|
152
161
|
quantalogic/utils/ask_user_validation.py,sha256=kSr7TXPTpsLR9zgwpGWgvffx8-cKAC_rdFRdLqwC22A,1176
|
153
162
|
quantalogic/utils/async_utils.py,sha256=FOizWRbHdsZwoD36dNErzunfwPlE7zDprS6RXcWuWSo,963
|
@@ -168,8 +177,8 @@ quantalogic/version_check.py,sha256=JyQFTNMDWtpHCLnN-BiakzB2cyXf6kUFsTjvmSruZi4,
|
|
168
177
|
quantalogic/welcome_message.py,sha256=o4tHdgabNuIV9kbIDPgS3_2yzJhayK30oKad2UouYDc,3020
|
169
178
|
quantalogic/xml_parser.py,sha256=bLLwIwO-VEHWF3heNS7nuPC8wgdYw9F_fVZZNW1figY,11728
|
170
179
|
quantalogic/xml_tool_parser.py,sha256=hGHA1q20JUoTNTbZYmi4FTdA5I25-AGEIP8DwZgQCNA,3897
|
171
|
-
quantalogic-0.
|
172
|
-
quantalogic-0.
|
173
|
-
quantalogic-0.
|
174
|
-
quantalogic-0.
|
175
|
-
quantalogic-0.
|
180
|
+
quantalogic-0.60.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
181
|
+
quantalogic-0.60.0.dist-info/METADATA,sha256=vAoFMMiPBk9bTKcDLMU1zBpM9a4gj-sKof24Ngo6SLo,32744
|
182
|
+
quantalogic-0.60.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
183
|
+
quantalogic-0.60.0.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
|
184
|
+
quantalogic-0.60.0.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
from datetime import datetime
|
2
|
-
from typing import Any, Dict
|
3
|
-
|
4
|
-
from pydantic import BaseModel, Field
|
5
|
-
|
6
|
-
|
7
|
-
class DocumentMetadata(BaseModel):
|
8
|
-
"""Metadata for indexed documents."""
|
9
|
-
source_path: str
|
10
|
-
file_type: str
|
11
|
-
creation_date: datetime
|
12
|
-
last_modified: datetime
|
13
|
-
chunk_size: int
|
14
|
-
overlap: int
|
15
|
-
custom_metadata: Dict[str, Any] = Field(default_factory=dict)
|
@@ -1,20 +0,0 @@
|
|
1
|
-
from typing import Any, Dict, List
|
2
|
-
|
3
|
-
from pydantic import BaseModel
|
4
|
-
|
5
|
-
|
6
|
-
class QueryResponse(BaseModel):
|
7
|
-
"""Structured query response with source attribution."""
|
8
|
-
answer: str
|
9
|
-
sources: List[Dict[str, Any]]
|
10
|
-
relevance_scores: List[float]
|
11
|
-
total_chunks_searched: int
|
12
|
-
query_time_ms: float
|
13
|
-
|
14
|
-
def __len__(self) -> int:
|
15
|
-
"""Support len() operation by returning length of the answer."""
|
16
|
-
return len(self.answer)
|
17
|
-
|
18
|
-
def __str__(self) -> str:
|
19
|
-
"""String representation of the response."""
|
20
|
-
return self.answer
|