quantalogic 0.33.3__tar.gz → 0.35.0__tar.gz
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-0.33.3 → quantalogic-0.35.0}/PKG-INFO +4 -1
- {quantalogic-0.33.3 → quantalogic-0.35.0}/README.md +3 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/pyproject.toml +1 -1
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/agent.py +3 -2
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/agent_config.py +45 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/agent_factory.py +14 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/coding_agent.py +6 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/config.py +7 -5
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/get_model_info.py +1 -1
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/main.py +19 -2
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/model_info_list.py +12 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/task_runner.py +1 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/read_html_tool.py +2 -2
- {quantalogic-0.33.3 → quantalogic-0.35.0}/LICENSE +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/console_print_events.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/console_print_token.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/docs_cli.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/event_emitter.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/generative_model.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/interactive_text_editor.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/llm.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/memory.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/model_info.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/model_info_litellm.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/model_names.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/prompts.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/search_agent.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/agent_server.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/models.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/routes.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/state.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/static/js/event_visualizer.js +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/static/js/quantalogic.js +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/server/templates/index.html +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/task_file_reader.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tool_manager.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/agent_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/dalle_e.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/download_http_file_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/duckduckgo_search_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/edit_whole_content_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/elixir_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/execute_bash_command_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/generate_database_report_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/grep_app_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/input_question_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/jinja_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/c_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/cpp_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/go_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/java_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/javascript_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/python_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/rust_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/scala_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/typescript_handler.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/list_directory_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/llm_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/llm_vision_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/markitdown_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/nodejs_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/python_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/read_file_block_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/read_file_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/replace_in_file_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/ripgrep_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/safe_python_interpreter_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/search_definition_names.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/sequence_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/serpapi_search_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/sql_query_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/task_complete_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/unified_diff_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/utils/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/utils/create_sample_database.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/utils/generate_database_report.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/wikipedia_search_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/write_file_tool.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/__init__.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/ask_user_validation.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/check_version.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/download_http_file.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/get_all_models.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/get_coding_environment.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/get_environment.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/get_quantalogic_rules_content.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/git_ls.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/lm_studio_model_info.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/python_interpreter.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/read_file.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/read_http_text_content.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/version.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/version_check.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/welcome_message.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/xml_parser.py +0 -0
- {quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/xml_tool_parser.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quantalogic
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.35.0
|
4
4
|
Summary: QuantaLogic ReAct Agents
|
5
5
|
Author: Raphaël MANSUY
|
6
6
|
Author-email: raphael.mansuy@gmail.com
|
@@ -185,6 +185,9 @@ See our [Release Notes](RELEASE_NOTES.MD) for detailed version history and chang
|
|
185
185
|
| openrouter/mistralai/mistral-large-2411 | OPENROUTER_API_KEY | Mistral's large model optimized for complex reasoning tasks, available through OpenRouter with enhanced multilingual capabilities. |
|
186
186
|
| mistral/mistral-large-2407 | MISTRAL_API_KEY | Mistral's high-performance model designed for enterprise-grade applications, offering advanced reasoning and multilingual support. |
|
187
187
|
| nvidia/deepseek-ai/deepseek-r1 | NVIDIA_API_KEY | NVIDIA's DeepSeek R1 model optimized for high-performance AI tasks and advanced reasoning capabilities. |
|
188
|
+
| gemini/gemini-2.0-flash | GEMINI_API_KEY | Google's Gemini Flash 2.0 model offering a balance of speed and performance for various tasks. |
|
189
|
+
| openrouter/google/gemini-2.0-flash-001 | OPENROUTER_API_KEY | Google's Gemini Flash 2.0 model offering a balance of speed and performance for various tasks through the OpenRouter platform. |
|
190
|
+
| ovh/DeepSeek-R1-Distill-Llama-70B | OVH_API_KEY | DeepSeek's R1 model optimized for research and development tasks hosted on OVH in France. |
|
188
191
|
| lm_studio/mistral-small-24b-instruct-2501 | LM_STUDIO_API_KEY | LM Studio's Mistral Small model optimized for local inference with advanced reasoning capabilities. |
|
189
192
|
| dashscope/qwen-max | DASHSCOPE_API_KEY | Alibaba's Qwen-Max model optimized for maximum performance and extensive reasoning capabilities. |
|
190
193
|
| dashscope/qwen-plus | DASHSCOPE_API_KEY | Alibaba's Qwen-Plus model offering balanced performance and cost-efficiency for a variety of tasks. |
|
@@ -125,6 +125,9 @@ See our [Release Notes](RELEASE_NOTES.MD) for detailed version history and chang
|
|
125
125
|
| openrouter/mistralai/mistral-large-2411 | OPENROUTER_API_KEY | Mistral's large model optimized for complex reasoning tasks, available through OpenRouter with enhanced multilingual capabilities. |
|
126
126
|
| mistral/mistral-large-2407 | MISTRAL_API_KEY | Mistral's high-performance model designed for enterprise-grade applications, offering advanced reasoning and multilingual support. |
|
127
127
|
| nvidia/deepseek-ai/deepseek-r1 | NVIDIA_API_KEY | NVIDIA's DeepSeek R1 model optimized for high-performance AI tasks and advanced reasoning capabilities. |
|
128
|
+
| gemini/gemini-2.0-flash | GEMINI_API_KEY | Google's Gemini Flash 2.0 model offering a balance of speed and performance for various tasks. |
|
129
|
+
| openrouter/google/gemini-2.0-flash-001 | OPENROUTER_API_KEY | Google's Gemini Flash 2.0 model offering a balance of speed and performance for various tasks through the OpenRouter platform. |
|
130
|
+
| ovh/DeepSeek-R1-Distill-Llama-70B | OVH_API_KEY | DeepSeek's R1 model optimized for research and development tasks hosted on OVH in France. |
|
128
131
|
| lm_studio/mistral-small-24b-instruct-2501 | LM_STUDIO_API_KEY | LM Studio's Mistral Small model optimized for local inference with advanced reasoning capabilities. |
|
129
132
|
| dashscope/qwen-max | DASHSCOPE_API_KEY | Alibaba's Qwen-Max model optimized for maximum performance and extensive reasoning capabilities. |
|
130
133
|
| dashscope/qwen-plus | DASHSCOPE_API_KEY | Alibaba's Qwen-Plus model offering balanced performance and cost-efficiency for a variety of tasks. |
|
@@ -669,8 +669,9 @@ class Agent(BaseModel):
|
|
669
669
|
import re
|
670
670
|
|
671
671
|
for var in self.variable_store.keys():
|
672
|
-
#
|
673
|
-
|
672
|
+
# Create safe pattern without double-escaping backslashes
|
673
|
+
safe_var = re.sub(r"([\\\.\^\$\*\+\?\{\}\[\]\|\(\)])", r"\\\1", var)
|
674
|
+
pattern = rf"\${safe_var}\$"
|
674
675
|
replacement = self.variable_store[var]
|
675
676
|
text = re.sub(pattern, replacement, text)
|
676
677
|
return text
|
@@ -251,3 +251,48 @@ def create_basic_agent(
|
|
251
251
|
compact_every_n_iterations=compact_every_n_iteration,
|
252
252
|
max_tokens_working_memory=max_tokens_working_memory,
|
253
253
|
)
|
254
|
+
|
255
|
+
def create_minimal_agent(
|
256
|
+
model_name: str,
|
257
|
+
vision_model_name: str | None = None,
|
258
|
+
no_stream: bool = False,
|
259
|
+
compact_every_n_iteration: int | None = None,
|
260
|
+
max_tokens_working_memory: int | None = None
|
261
|
+
) -> Agent:
|
262
|
+
"""Create an agent with the specified model and tools.
|
263
|
+
|
264
|
+
Args:
|
265
|
+
model_name (str): Name of the model to use
|
266
|
+
vision_model_name (str | None): Name of the vision model to use
|
267
|
+
no_stream (bool, optional): If True, the agent will not stream results.
|
268
|
+
compact_every_n_iteration (int | None, optional): Frequency of memory compaction.
|
269
|
+
max_tokens_working_memory (int | None, optional): Maximum tokens for working memory.
|
270
|
+
|
271
|
+
Returns:
|
272
|
+
Agent: An agent with the specified model and tools
|
273
|
+
"""
|
274
|
+
# Rebuild AgentTool to resolve forward references
|
275
|
+
AgentTool.model_rebuild()
|
276
|
+
|
277
|
+
tools = [
|
278
|
+
LLMTool(model_name=model_name, on_token=console_print_token if not no_stream else None),
|
279
|
+
DownloadHttpFileTool(),
|
280
|
+
WikipediaSearchTool(),
|
281
|
+
DuckDuckGoSearchTool(),
|
282
|
+
ReadHTMLTool(),
|
283
|
+
SearchDefinitionNames(),
|
284
|
+
ReadFileBlockTool(),
|
285
|
+
WriteFileTool(),
|
286
|
+
ReadFileTool(),
|
287
|
+
TaskCompleteTool(),
|
288
|
+
]
|
289
|
+
|
290
|
+
if vision_model_name:
|
291
|
+
tools.append(LLMVisionTool(model_name=vision_model_name, on_token=console_print_token if not no_stream else None))
|
292
|
+
|
293
|
+
return Agent(
|
294
|
+
model_name=model_name,
|
295
|
+
tools=tools,
|
296
|
+
compact_every_n_iterations=compact_every_n_iteration,
|
297
|
+
max_tokens_working_memory=max_tokens_working_memory,
|
298
|
+
)
|
@@ -7,6 +7,7 @@ from quantalogic.agent_config import (
|
|
7
7
|
create_basic_agent,
|
8
8
|
create_full_agent,
|
9
9
|
create_interpreter_agent,
|
10
|
+
create_minimal_agent,
|
10
11
|
)
|
11
12
|
from quantalogic.coding_agent import create_coding_agent
|
12
13
|
from quantalogic.search_agent import create_search_agent # noqa: E402
|
@@ -66,6 +67,7 @@ def create_agent_for_mode(
|
|
66
67
|
mode: str,
|
67
68
|
model_name: str,
|
68
69
|
vision_model_name: Optional[str],
|
70
|
+
thinking_model_name: Optional[str],
|
69
71
|
no_stream: bool = False,
|
70
72
|
compact_every_n_iteration: Optional[int] = None,
|
71
73
|
max_tokens_working_memory: Optional[int] = None
|
@@ -76,6 +78,7 @@ def create_agent_for_mode(
|
|
76
78
|
mode: The mode of operation for the agent
|
77
79
|
model_name: The name of the language model to use
|
78
80
|
vision_model_name: Optional name of the vision model
|
81
|
+
thinking_model_name: Optional name for a thinking model
|
79
82
|
no_stream: Whether to disable streaming mode
|
80
83
|
compact_every_n_iteration: Optional number of iterations before compacting memory
|
81
84
|
max_tokens_working_memory: Optional maximum tokens for working memory
|
@@ -97,6 +100,7 @@ def create_agent_for_mode(
|
|
97
100
|
agent = create_coding_agent(
|
98
101
|
model_name,
|
99
102
|
vision_model_name,
|
103
|
+
thinking_model_name,
|
100
104
|
basic=False,
|
101
105
|
no_stream=no_stream,
|
102
106
|
compact_every_n_iteration=compact_every_n_iteration,
|
@@ -107,6 +111,7 @@ def create_agent_for_mode(
|
|
107
111
|
agent = create_coding_agent(
|
108
112
|
model_name,
|
109
113
|
vision_model_name,
|
114
|
+
|
110
115
|
basic=True,
|
111
116
|
no_stream=no_stream,
|
112
117
|
compact_every_n_iteration=compact_every_n_iteration,
|
@@ -157,5 +162,14 @@ def create_agent_for_mode(
|
|
157
162
|
max_tokens_working_memory=max_tokens_working_memory
|
158
163
|
)
|
159
164
|
return agent
|
165
|
+
if mode == "minimal":
|
166
|
+
agent = create_minimal_agent(
|
167
|
+
model_name,
|
168
|
+
vision_model_name,
|
169
|
+
no_stream=no_stream,
|
170
|
+
compact_every_n_iteration=compact_every_n_iteration,
|
171
|
+
max_tokens_working_memory=max_tokens_working_memory
|
172
|
+
)
|
173
|
+
return agent
|
160
174
|
else:
|
161
175
|
raise ValueError(f"Unknown agent mode: {mode}")
|
@@ -28,6 +28,7 @@ from quantalogic.utils.get_quantalogic_rules_content import get_quantalogic_rule
|
|
28
28
|
def create_coding_agent(
|
29
29
|
model_name: str,
|
30
30
|
vision_model_name: str | None = None,
|
31
|
+
thinking_model_name: str | None = None,
|
31
32
|
basic: bool = False,
|
32
33
|
no_stream: bool = False,
|
33
34
|
compact_every_n_iteration: int | None = None,
|
@@ -38,6 +39,7 @@ def create_coding_agent(
|
|
38
39
|
Args:
|
39
40
|
model_name (str): Name of the language model to use for the agent's core capabilities
|
40
41
|
vision_model_name (str | None): Name of the vision model to use for the agent's core capabilities
|
42
|
+
thinking_model_name (str | None): Name of the thinking model to use for the agent's core capabilities
|
41
43
|
basic (bool, optional): If True, the agent will be configured with a basic set of tools.
|
42
44
|
no_stream (bool, optional): If True, the agent will not stream results.
|
43
45
|
compact_every_n_iteration (int | None, optional): Frequency of memory compaction.
|
@@ -87,6 +89,10 @@ def create_coding_agent(
|
|
87
89
|
if vision_model_name:
|
88
90
|
tools.append(LLMVisionTool(model_name=vision_model_name, on_token=console_print_token if not no_stream else None))
|
89
91
|
|
92
|
+
|
93
|
+
if thinking_model_name:
|
94
|
+
tools.append(LLMTool(model_name=thinking_model_name,name="smartest_code_expert", on_token=console_print_token if not no_stream else None))
|
95
|
+
|
90
96
|
if not basic:
|
91
97
|
tools.append(
|
92
98
|
LLMTool(
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
|
-
|
2
|
+
from typing import Optional
|
3
3
|
|
4
4
|
@dataclass
|
5
5
|
class QLConfig:
|
@@ -8,8 +8,10 @@ class QLConfig:
|
|
8
8
|
verbose: bool
|
9
9
|
mode: str
|
10
10
|
log: str
|
11
|
-
vision_model_name: str
|
11
|
+
vision_model_name: Optional[str]
|
12
12
|
max_iterations: int
|
13
|
-
compact_every_n_iteration: int
|
14
|
-
max_tokens_working_memory: int
|
15
|
-
no_stream: bool
|
13
|
+
compact_every_n_iteration: Optional[int]
|
14
|
+
max_tokens_working_memory: Optional[int]
|
15
|
+
no_stream: bool
|
16
|
+
thinking_model_name: str
|
17
|
+
|
@@ -2,7 +2,7 @@ import loguru
|
|
2
2
|
|
3
3
|
from quantalogic.model_info_list import model_info
|
4
4
|
from quantalogic.model_info_litellm import litellm_get_model_max_input_tokens, litellm_get_model_max_output_tokens
|
5
|
-
from quantalogic.utils.lm_studio_model_info import
|
5
|
+
from quantalogic.utils.lm_studio_model_info import get_model_list
|
6
6
|
|
7
7
|
DEFAULT_MAX_OUTPUT_TOKENS = 4 * 1024 # Reasonable default for most models
|
8
8
|
DEFAULT_MAX_INPUT_TOKENS = 32 * 1024 # Reasonable default for most models
|
@@ -122,6 +122,12 @@ def restore_terminal(old_settings):
|
|
122
122
|
default=None,
|
123
123
|
help="Set the maximum number of tokens allowed in the working memory.",
|
124
124
|
)
|
125
|
+
@click.option(
|
126
|
+
"--thinking-model",
|
127
|
+
type=str,
|
128
|
+
default="default",
|
129
|
+
help="The thinking model to use",
|
130
|
+
)
|
125
131
|
@click.pass_context
|
126
132
|
def cli(
|
127
133
|
ctx: click.Context,
|
@@ -134,6 +140,7 @@ def cli(
|
|
134
140
|
max_iterations: int,
|
135
141
|
compact_every_n_iteration: int | None,
|
136
142
|
max_tokens_working_memory: int | None,
|
143
|
+
thinking_model: str,
|
137
144
|
) -> None:
|
138
145
|
"""QuantaLogic AI Assistant - A powerful AI tool for various tasks.
|
139
146
|
|
@@ -161,7 +168,8 @@ def cli(
|
|
161
168
|
max_iterations=max_iterations,
|
162
169
|
compact_every_n_iteration=compact_every_n_iteration,
|
163
170
|
max_tokens_working_memory=max_tokens_working_memory,
|
164
|
-
no_stream=False # Default value for backward compatibility
|
171
|
+
no_stream=False, # Default value for backward compatibility
|
172
|
+
thinking_model_name=thinking_model,
|
165
173
|
)
|
166
174
|
ctx.invoke(
|
167
175
|
task,
|
@@ -173,6 +181,7 @@ def cli(
|
|
173
181
|
max_iterations=config.max_iterations,
|
174
182
|
compact_every_n_iteration=config.compact_every_n_iteration,
|
175
183
|
max_tokens_working_memory=config.max_tokens_working_memory,
|
184
|
+
thinking_model=thinking_model,
|
176
185
|
)
|
177
186
|
|
178
187
|
|
@@ -219,6 +228,12 @@ def cli(
|
|
219
228
|
is_flag=True,
|
220
229
|
help="Disable streaming output (default: streaming enabled).",
|
221
230
|
)
|
231
|
+
@click.option(
|
232
|
+
"--thinking-model",
|
233
|
+
type=str,
|
234
|
+
default="default",
|
235
|
+
help="The thinking model to use",
|
236
|
+
)
|
222
237
|
@click.argument("task", required=False)
|
223
238
|
def task(
|
224
239
|
file: Optional[str],
|
@@ -232,6 +247,7 @@ def task(
|
|
232
247
|
compact_every_n_iteration: int | None,
|
233
248
|
max_tokens_working_memory: int | None,
|
234
249
|
no_stream: bool,
|
250
|
+
thinking_model: str,
|
235
251
|
) -> None:
|
236
252
|
console = Console()
|
237
253
|
|
@@ -246,8 +262,9 @@ def task(
|
|
246
262
|
compact_every_n_iteration=compact_every_n_iteration,
|
247
263
|
max_tokens_working_memory=max_tokens_working_memory,
|
248
264
|
no_stream=no_stream,
|
265
|
+
thinking_model_name=thinking_model,
|
249
266
|
)
|
250
|
-
|
267
|
+
|
251
268
|
task_runner(
|
252
269
|
console,
|
253
270
|
file,
|
@@ -57,4 +57,16 @@ model_info = {
|
|
57
57
|
max_output_tokens=8 * 1024,
|
58
58
|
max_input_tokens=1024 * 64,
|
59
59
|
),
|
60
|
+
"gemini/gemini-2.0-flash": ModelInfo(
|
61
|
+
model_name="gemini/gemini-2.0-flash",
|
62
|
+
max_input_tokens=1000000,
|
63
|
+
max_output_tokens=8 * 1024,
|
64
|
+
input_cost_per_token=0.0000001
|
65
|
+
),
|
66
|
+
"openrouter/google/gemini-2.0-flash-001": ModelInfo(
|
67
|
+
model_name="openrouter/google/gemini-2.0-flash-001",
|
68
|
+
max_input_tokens=1000000,
|
69
|
+
max_output_tokens=8 * 1024,
|
70
|
+
input_cost_per_token=0.0000001
|
71
|
+
)
|
60
72
|
}
|
@@ -163,6 +163,7 @@ def task_runner(
|
|
163
163
|
mode=config.mode,
|
164
164
|
model_name=config.model_name,
|
165
165
|
vision_model_name=config.vision_model_name,
|
166
|
+
thinking_model_name=config.thinking_model_name,
|
166
167
|
compact_every_n_iteration=config.compact_every_n_iteration,
|
167
168
|
max_tokens_working_memory=config.max_tokens_working_memory
|
168
169
|
)
|
@@ -113,7 +113,7 @@ class ReadHTMLTool(Tool):
|
|
113
113
|
description="The starting line number (1-based index). Default: 1",
|
114
114
|
required=False,
|
115
115
|
example="1",
|
116
|
-
default=1
|
116
|
+
default="1"
|
117
117
|
),
|
118
118
|
ToolArgument(
|
119
119
|
name="line_end",
|
@@ -121,7 +121,7 @@ class ReadHTMLTool(Tool):
|
|
121
121
|
description="The ending line number (1-based index). Default: 300",
|
122
122
|
required=False,
|
123
123
|
example="300",
|
124
|
-
default=300
|
124
|
+
default="300"
|
125
125
|
)
|
126
126
|
]
|
127
127
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/generate_database_report_tool.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/cpp_handler.py
RENAMED
File without changes
|
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/java_handler.py
RENAMED
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/javascript_handler.py
RENAMED
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/python_handler.py
RENAMED
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/rust_handler.py
RENAMED
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/scala_handler.py
RENAMED
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/language_handlers/typescript_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/tools/utils/generate_database_report.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quantalogic-0.33.3 → quantalogic-0.35.0}/quantalogic/utils/get_quantalogic_rules_content.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|