quantalogic 0.2.5__tar.gz → 0.2.7__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.2.5 → quantalogic-0.2.7}/PKG-INFO +16 -1
- {quantalogic-0.2.5 → quantalogic-0.2.7}/README.md +15 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/pyproject.toml +1 -1
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/main.py +30 -11
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/version.py +1 -1
- {quantalogic-0.2.5 → quantalogic-0.2.7}/LICENSE +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/__init__.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/agent.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/agent_config.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/coding_agent.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/event_emitter.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/generative_model.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/interactive_text_editor.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/memory.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/model_names.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/print_event.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/prompts.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/__init__.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/agent_server.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/models.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/routes.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/state.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/static/js/event_visualizer.js +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/static/js/quantalogic.js +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/server/templates/index.html +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tool_manager.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/__init__.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/agent_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/download_http_file_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/edit_whole_content_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/elixir_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/execute_bash_command_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/input_question_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/__init__.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/c_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/cpp_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/go_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/java_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/javascript_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/python_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/rust_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/scala_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/typescript_handler.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/list_directory_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/llm_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/markitdown_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/nodejs_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/python_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/read_file_block_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/read_file_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/replace_in_file_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/ripgrep_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/search_definition_names.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/task_complete_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/unified_diff_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/write_file_tool.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/__init__.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/ask_user_validation.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/download_http_file.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/get_coding_environment.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/get_environment.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/get_quantalogic_rules_content.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/git_ls.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/read_file.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/utils/read_http_text_content.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/xml_parser.py +0 -0
- {quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/xml_tool_parser.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quantalogic
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.7
|
4
4
|
Summary: QuantaLogic ReAct Agents
|
5
5
|
Author: Raphaël MANSUY
|
6
6
|
Author-email: raphael.mansuy@gmail.com
|
@@ -249,6 +249,21 @@ quantalogic \
|
|
249
249
|
--verbose
|
250
250
|
```
|
251
251
|
|
252
|
+
## 📖 Examples
|
253
|
+
|
254
|
+
Here are some practical examples to help you get started:
|
255
|
+
|
256
|
+
Here is the markdown table based on the provided directory listing:
|
257
|
+
|
258
|
+
| Example | Description | File |
|
259
|
+
|---------|-------------|------|
|
260
|
+
| Simple Agent | A basic example of an agent implementation. | [examples/01-simple-agent.py](examples/01-simple-agent.py) |
|
261
|
+
| Agent with Event Monitoring | An example of an agent with event monitoring capabilities. | [examples/02-agent-with-event-monitoring.py](examples/02-agent-with-event-monitoring.py) |
|
262
|
+
| Agent with Interpreter | An example of an agent that includes an interpreter. | [examples/03-agent-with-interpreter.py](examples/03-agent-with-interpreter.py) |
|
263
|
+
| Agent Summary Task | An example of an agent performing a summary task. | [examples/04-agent-summary-task.py](examples/04-agent-summary-task.py) |
|
264
|
+
| Code Example | A general code example. | [examples/05-code.py](examples/05-code.py) |
|
265
|
+
|
266
|
+
|
252
267
|
## 🔨 Key Components
|
253
268
|
|
254
269
|
### Agent System
|
@@ -212,6 +212,21 @@ quantalogic \
|
|
212
212
|
--verbose
|
213
213
|
```
|
214
214
|
|
215
|
+
## 📖 Examples
|
216
|
+
|
217
|
+
Here are some practical examples to help you get started:
|
218
|
+
|
219
|
+
Here is the markdown table based on the provided directory listing:
|
220
|
+
|
221
|
+
| Example | Description | File |
|
222
|
+
|---------|-------------|------|
|
223
|
+
| Simple Agent | A basic example of an agent implementation. | [examples/01-simple-agent.py](examples/01-simple-agent.py) |
|
224
|
+
| Agent with Event Monitoring | An example of an agent with event monitoring capabilities. | [examples/02-agent-with-event-monitoring.py](examples/02-agent-with-event-monitoring.py) |
|
225
|
+
| Agent with Interpreter | An example of an agent that includes an interpreter. | [examples/03-agent-with-interpreter.py](examples/03-agent-with-interpreter.py) |
|
226
|
+
| Agent Summary Task | An example of an agent performing a summary task. | [examples/04-agent-summary-task.py](examples/04-agent-summary-task.py) |
|
227
|
+
| Code Example | A general code example. | [examples/05-code.py](examples/05-code.py) |
|
228
|
+
|
229
|
+
|
215
230
|
## 🔨 Key Components
|
216
231
|
|
217
232
|
### Agent System
|
@@ -51,17 +51,27 @@ def create_agent_for_mode(mode: str, model_name: str) -> Agent:
|
|
51
51
|
raise ValueError(f"Unknown agent mode: {mode}")
|
52
52
|
|
53
53
|
|
54
|
-
def
|
54
|
+
def configure_logger(log_level: str) -> None:
|
55
|
+
"""Configure the logger with the specified log level and format."""
|
56
|
+
logger.remove()
|
57
|
+
logger.add(sys.stderr, level=log_level.upper(), format="{time} | {level} | {message}")
|
58
|
+
logger.info(f"Log level set to: {log_level}")
|
59
|
+
|
60
|
+
|
61
|
+
def set_litellm_verbose(verbose_mode: bool) -> None:
|
62
|
+
"""Set the verbosity of the litellm library."""
|
55
63
|
import litellm
|
64
|
+
litellm.set_verbose = verbose_mode
|
56
65
|
|
57
|
-
|
58
|
-
|
59
|
-
|
66
|
+
|
67
|
+
def switch_verbose(verbose_mode: bool, log_level: str = "info") -> None:
|
68
|
+
"""Switch verbose mode and configure logger and litellm verbosity."""
|
69
|
+
if log_level == "debug":
|
70
|
+
configure_logger("DEBUG")
|
60
71
|
else:
|
61
|
-
|
62
|
-
logger.remove()
|
72
|
+
configure_logger(log_level)
|
63
73
|
|
64
|
-
|
74
|
+
set_litellm_verbose(verbose_mode)
|
65
75
|
|
66
76
|
|
67
77
|
def get_task_from_file(file_path: str) -> str:
|
@@ -103,15 +113,23 @@ def display_welcome_message(console: Console, model_name: str) -> None:
|
|
103
113
|
|
104
114
|
@click.group(invoke_without_command=True)
|
105
115
|
@click.option("--version", is_flag=True, help="Show version information.")
|
116
|
+
@click.option(
|
117
|
+
"--model-name",
|
118
|
+
default=MODEL_NAME,
|
119
|
+
help='Specify the model to use (litellm format, e.g. "openrouter/deepseek-chat").',
|
120
|
+
)
|
121
|
+
@click.option("--log", type=click.Choice(["info", "debug", "warning"]), default="info", help="Set logging level (info/debug/warning).")
|
122
|
+
@click.option("--verbose", is_flag=True, help="Enable verbose output.")
|
123
|
+
@click.option("--mode", type=click.Choice(AGENT_MODES), default="code", help="Agent mode (code/search/full).")
|
106
124
|
@click.pass_context
|
107
|
-
def cli(ctx: click.Context, version: bool) -> None:
|
125
|
+
def cli(ctx: click.Context, version: bool, model_name: str, verbose: bool, mode: str, log: str) -> None:
|
108
126
|
"""QuantaLogic AI Assistant - A powerful AI tool for various tasks."""
|
109
127
|
if version:
|
110
128
|
console = Console()
|
111
129
|
console.print(f"QuantaLogic version: {get_version()}")
|
112
130
|
sys.exit(0)
|
113
131
|
if ctx.invoked_subcommand is None:
|
114
|
-
ctx.invoke(task)
|
132
|
+
ctx.invoke(task, model_name=model_name, verbose=verbose, mode=mode, log=log)
|
115
133
|
|
116
134
|
|
117
135
|
@cli.command()
|
@@ -123,11 +141,12 @@ def cli(ctx: click.Context, version: bool) -> None:
|
|
123
141
|
)
|
124
142
|
@click.option("--verbose", is_flag=True, help="Enable verbose output.")
|
125
143
|
@click.option("--mode", type=click.Choice(AGENT_MODES), default="code", help="Agent mode (code/search/full).")
|
144
|
+
@click.option("--log", type=click.Choice(["info", "debug", "warning"]), default="info", help="Set logging level (info/debug/warning).")
|
126
145
|
@click.argument("task", required=False)
|
127
|
-
def task(file: Optional[str], model_name: str, verbose: bool, mode: str, task: Optional[str]) -> None:
|
146
|
+
def task(file: Optional[str], model_name: str, verbose: bool, mode: str, log: str, task: Optional[str]) -> None:
|
128
147
|
"""Execute a task with the QuantaLogic AI Assistant."""
|
129
148
|
console = Console()
|
130
|
-
switch_verbose(verbose)
|
149
|
+
switch_verbose(verbose, log)
|
131
150
|
|
132
151
|
try:
|
133
152
|
if file:
|
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.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/javascript_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/python_handler.py
RENAMED
File without changes
|
File without changes
|
{quantalogic-0.2.5 → quantalogic-0.2.7}/quantalogic/tools/language_handlers/scala_handler.py
RENAMED
File without changes
|
{quantalogic-0.2.5 → quantalogic-0.2.7}/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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|