janito 2.12.0__py3-none-any.whl → 2.14.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.
- janito/agent/setup_agent.py +1 -1
- janito/cli/cli_commands/list_drivers.py +137 -0
- janito/cli/core/getters.py +6 -1
- janito/cli/main_cli.py +8 -10
- janito/drivers/zai/driver.py +23 -12
- janito/providers/zai/model_info.py +5 -22
- janito/providers/zai/provider.py +4 -1
- janito/providers/zai/schema_generator.py +7 -5
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/METADATA +1 -1
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/RECORD +14 -14
- janito/drivers/driver_registry.py +0 -27
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/WHEEL +0 -0
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/entry_points.txt +0 -0
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/licenses/LICENSE +0 -0
- {janito-2.12.0.dist-info → janito-2.14.0.dist-info}/top_level.txt +0 -0
janito/agent/setup_agent.py
CHANGED
@@ -12,7 +12,7 @@ from queue import Queue
|
|
12
12
|
from rich import print as rich_print
|
13
13
|
from janito.tools import get_local_tools_adapter
|
14
14
|
from janito.llm.agent import LLMAgent
|
15
|
-
|
15
|
+
|
16
16
|
from janito.platform_discovery import PlatformDiscovery
|
17
17
|
from janito.tools.tool_base import ToolPermissions
|
18
18
|
from janito.tools.permissions import get_global_allowed_permissions
|
@@ -0,0 +1,137 @@
|
|
1
|
+
"""
|
2
|
+
CLI Command: List available LLM drivers and their dependencies
|
3
|
+
"""
|
4
|
+
|
5
|
+
import importlib
|
6
|
+
import sys
|
7
|
+
from pathlib import Path
|
8
|
+
from rich.console import Console
|
9
|
+
from rich.table import Table
|
10
|
+
from rich.panel import Panel
|
11
|
+
from rich.text import Text
|
12
|
+
|
13
|
+
console = Console()
|
14
|
+
|
15
|
+
|
16
|
+
def get_driver_info():
|
17
|
+
"""Get information about all available drivers."""
|
18
|
+
drivers = []
|
19
|
+
|
20
|
+
# Define known driver modules
|
21
|
+
driver_modules = [
|
22
|
+
("janito.drivers.openai.driver", "OpenAIModelDriver"),
|
23
|
+
("janito.drivers.azure_openai.driver", "AzureOpenAIModelDriver"),
|
24
|
+
("janito.drivers.zai.driver", "ZAIModelDriver"),
|
25
|
+
]
|
26
|
+
|
27
|
+
for module_path, class_name in driver_modules:
|
28
|
+
try:
|
29
|
+
# Import the module
|
30
|
+
module = importlib.import_module(module_path)
|
31
|
+
driver_class = getattr(module, class_name)
|
32
|
+
|
33
|
+
# Get availability info
|
34
|
+
available = getattr(driver_class, 'available', True)
|
35
|
+
unavailable_reason = getattr(driver_class, 'unavailable_reason', None)
|
36
|
+
|
37
|
+
# Get dependencies from module imports
|
38
|
+
dependencies = []
|
39
|
+
module_file = Path(module.__file__)
|
40
|
+
|
41
|
+
# Read module file to detect imports
|
42
|
+
with open(module_file, 'r', encoding='utf-8') as f:
|
43
|
+
content = f.read()
|
44
|
+
|
45
|
+
# Simple dependency detection
|
46
|
+
if 'import openai' in content or 'from openai' in content:
|
47
|
+
dependencies.append('openai')
|
48
|
+
if 'import zai' in content or 'from zai' in content:
|
49
|
+
dependencies.append('zai')
|
50
|
+
if 'import anthropic' in content or 'from anthropic' in content:
|
51
|
+
dependencies.append('anthropic')
|
52
|
+
if 'import google' in content or 'from google' in content:
|
53
|
+
dependencies.append('google-generativeai')
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# Remove duplicates while preserving order
|
58
|
+
seen = set()
|
59
|
+
dependencies = [dep for dep in dependencies if not (dep in seen or seen.add(dep))]
|
60
|
+
|
61
|
+
# Check if dependencies are available
|
62
|
+
dep_status = []
|
63
|
+
for dep in dependencies:
|
64
|
+
try:
|
65
|
+
importlib.import_module(dep)
|
66
|
+
dep_status.append(f"✅ {dep}")
|
67
|
+
except ImportError:
|
68
|
+
dep_status.append(f"❌ {dep}")
|
69
|
+
|
70
|
+
if not dependencies:
|
71
|
+
dep_status = ["No external dependencies"]
|
72
|
+
|
73
|
+
drivers.append({
|
74
|
+
'name': class_name,
|
75
|
+
'available': available,
|
76
|
+
'reason': unavailable_reason,
|
77
|
+
'dependencies': dep_status
|
78
|
+
})
|
79
|
+
|
80
|
+
except (ImportError, AttributeError) as e:
|
81
|
+
drivers.append({
|
82
|
+
'name': class_name,
|
83
|
+
'module': module_path,
|
84
|
+
'available': False,
|
85
|
+
'reason': str(e),
|
86
|
+
'dependencies': ["❌ Module not found"]
|
87
|
+
})
|
88
|
+
|
89
|
+
return drivers
|
90
|
+
|
91
|
+
|
92
|
+
def handle_list_drivers(args=None):
|
93
|
+
"""List all available LLM drivers with their status and dependencies."""
|
94
|
+
drivers = get_driver_info()
|
95
|
+
|
96
|
+
if not drivers:
|
97
|
+
console.print("[red]No drivers found[/red]")
|
98
|
+
return
|
99
|
+
|
100
|
+
# Create table
|
101
|
+
table = Table(title="Available LLM Drivers")
|
102
|
+
table.add_column("Driver", style="cyan", no_wrap=True)
|
103
|
+
table.add_column("Status", style="bold")
|
104
|
+
table.add_column("Dependencies", style="yellow")
|
105
|
+
|
106
|
+
for driver in drivers:
|
107
|
+
name = driver['name']
|
108
|
+
|
109
|
+
if driver['available']:
|
110
|
+
status = "[green]✅ Available[/green]"
|
111
|
+
if driver['reason']:
|
112
|
+
status = f"[yellow]⚠️ Available ({driver['reason']})[/yellow]"
|
113
|
+
else:
|
114
|
+
status = f"[red]❌ Unavailable[/red]"
|
115
|
+
if driver['reason']:
|
116
|
+
status = f"[red]❌ {driver['reason']}[/red]"
|
117
|
+
|
118
|
+
deps = "\n".join(driver['dependencies'])
|
119
|
+
|
120
|
+
table.add_row(name, status, deps)
|
121
|
+
|
122
|
+
console.print(table)
|
123
|
+
|
124
|
+
# Installation help
|
125
|
+
# Get unique missing dependencies
|
126
|
+
missing_deps = set()
|
127
|
+
for driver in drivers:
|
128
|
+
for dep_status in driver['dependencies']:
|
129
|
+
if dep_status.startswith('❌'):
|
130
|
+
missing_deps.add(dep_status[2:].strip())
|
131
|
+
|
132
|
+
if missing_deps:
|
133
|
+
console.print(f"\n[dim]💡 Install missing deps: pip install {' '.join(sorted(missing_deps))}[/dim]")
|
134
|
+
|
135
|
+
|
136
|
+
if __name__ == "__main__":
|
137
|
+
handle_list_drivers()
|
janito/cli/core/getters.py
CHANGED
@@ -7,6 +7,7 @@ from janito.cli.cli_commands.list_models import handle_list_models
|
|
7
7
|
from janito.cli.cli_commands.list_tools import handle_list_tools
|
8
8
|
from janito.cli.cli_commands.show_config import handle_show_config
|
9
9
|
from janito.cli.cli_commands.list_config import handle_list_config
|
10
|
+
from janito.cli.cli_commands.list_drivers import handle_list_drivers
|
10
11
|
from functools import partial
|
11
12
|
from janito.provider_registry import ProviderRegistry
|
12
13
|
|
@@ -17,6 +18,7 @@ GETTER_KEYS = [
|
|
17
18
|
"list_models",
|
18
19
|
"list_tools",
|
19
20
|
"list_config",
|
21
|
+
"list_drivers",
|
20
22
|
]
|
21
23
|
|
22
24
|
|
@@ -42,7 +44,10 @@ def handle_getter(args, config_mgr=None):
|
|
42
44
|
"list_profiles": partial(handle_list_profiles, args),
|
43
45
|
"show_config": partial(handle_show_config, args),
|
44
46
|
"list_config": partial(handle_list_config, args),
|
47
|
+
"list_drivers": partial(handle_list_drivers, args),
|
45
48
|
}
|
46
49
|
for arg in GETTER_KEYS:
|
47
50
|
if getattr(args, arg, False) and arg in GETTER_DISPATCH:
|
48
|
-
|
51
|
+
GETTER_DISPATCH[arg]()
|
52
|
+
import sys
|
53
|
+
sys.exit(0)
|
janito/cli/main_cli.py
CHANGED
@@ -117,6 +117,10 @@ definition = [
|
|
117
117
|
["--list-providers"],
|
118
118
|
{"action": "store_true", "help": "List supported LLM providers"},
|
119
119
|
),
|
120
|
+
(
|
121
|
+
["--list-drivers"],
|
122
|
+
{"action": "store_true", "help": "List available LLM drivers and their dependencies"},
|
123
|
+
),
|
120
124
|
(
|
121
125
|
["-l", "--list-models"],
|
122
126
|
{"action": "store_true", "help": "List all supported models"},
|
@@ -206,6 +210,7 @@ GETTER_KEYS = [
|
|
206
210
|
"list_models",
|
207
211
|
"list_tools",
|
208
212
|
"list_config",
|
213
|
+
"list_drivers",
|
209
214
|
]
|
210
215
|
|
211
216
|
|
@@ -321,14 +326,8 @@ class JanitoCLI:
|
|
321
326
|
if run_mode == RunMode.SET:
|
322
327
|
if self._run_set_mode():
|
323
328
|
return
|
324
|
-
# Special handling: provider is not required for list_providers, list_tools, show_config
|
325
|
-
if run_mode == RunMode.GET
|
326
|
-
self.args.list_providers
|
327
|
-
or self.args.list_tools
|
328
|
-
or self.args.list_profiles
|
329
|
-
or self.args.show_config
|
330
|
-
or self.args.list_config
|
331
|
-
):
|
329
|
+
# Special handling: provider is not required for list_providers, list_tools, show_config, list_drivers
|
330
|
+
if run_mode == RunMode.GET:
|
332
331
|
self._maybe_print_verbose_provider_model()
|
333
332
|
handle_getter(self.args)
|
334
333
|
return
|
@@ -364,8 +363,7 @@ class JanitoCLI:
|
|
364
363
|
agent_role,
|
365
364
|
verbose_tools=self.args.verbose_tools,
|
366
365
|
)
|
367
|
-
|
368
|
-
handle_getter(self.args)
|
366
|
+
|
369
367
|
|
370
368
|
def _run_set_mode(self):
|
371
369
|
if handle_api_key_set(self.args):
|
janito/drivers/zai/driver.py
CHANGED
@@ -12,10 +12,18 @@ from janito.llm.driver_input import DriverInput
|
|
12
12
|
from janito.driver_events import RequestFinished, RequestStatus, RateLimitRetry
|
13
13
|
from janito.llm.message_parts import TextMessagePart, FunctionCallMessagePart
|
14
14
|
|
15
|
-
|
15
|
+
try:
|
16
|
+
import openai
|
17
|
+
available = True
|
18
|
+
unavailable_reason = None
|
19
|
+
except ImportError:
|
20
|
+
available = False
|
21
|
+
unavailable_reason = "openai module not installed"
|
16
22
|
|
17
23
|
|
18
24
|
class ZAIModelDriver(LLMDriver):
|
25
|
+
available = available
|
26
|
+
unavailable_reason = unavailable_reason
|
19
27
|
def _get_message_from_result(self, result):
|
20
28
|
"""Extract the message object from the provider result (Z.AI-specific)."""
|
21
29
|
if hasattr(result, "choices") and result.choices:
|
@@ -52,15 +60,15 @@ class ZAIModelDriver(LLMDriver):
|
|
52
60
|
# Z.AI-specific parameters
|
53
61
|
if config.model:
|
54
62
|
api_kwargs["model"] = config.model
|
55
|
-
#
|
56
|
-
if (
|
63
|
+
# Use max_tokens for Z.ai SDK compatibility
|
64
|
+
if hasattr(config, "max_tokens") and config.max_tokens is not None:
|
65
|
+
api_kwargs["max_tokens"] = int(config.max_tokens)
|
66
|
+
elif (
|
57
67
|
hasattr(config, "max_completion_tokens")
|
58
68
|
and config.max_completion_tokens is not None
|
59
69
|
):
|
60
|
-
|
61
|
-
|
62
|
-
# For models that do not support 'max_tokens', map to 'max_completion_tokens'
|
63
|
-
api_kwargs["max_completion_tokens"] = int(config.max_tokens)
|
70
|
+
# Fallback to max_completion_tokens if max_tokens not set
|
71
|
+
api_kwargs["max_tokens"] = int(config.max_completion_tokens)
|
64
72
|
for p in (
|
65
73
|
"temperature",
|
66
74
|
"top_p",
|
@@ -260,10 +268,6 @@ class ZAIModelDriver(LLMDriver):
|
|
260
268
|
api_key_display = str(config.api_key)
|
261
269
|
if api_key_display and len(api_key_display) > 8:
|
262
270
|
api_key_display = api_key_display[:4] + "..." + api_key_display[-4:]
|
263
|
-
client_kwargs = {
|
264
|
-
"api_key": config.api_key,
|
265
|
-
"base_url": "https://api.z.ai/api/paas/v4",
|
266
|
-
}
|
267
271
|
|
268
272
|
# HTTP debug wrapper
|
269
273
|
if os.environ.get("ZAI_DEBUG_HTTP", "0") == "1":
|
@@ -280,7 +284,14 @@ class ZAIModelDriver(LLMDriver):
|
|
280
284
|
flush=True,
|
281
285
|
)
|
282
286
|
|
283
|
-
|
287
|
+
# Use OpenAI SDK for Z.AI API compatibility
|
288
|
+
try:
|
289
|
+
import openai
|
290
|
+
except ImportError:
|
291
|
+
raise ImportError("openai module is not available. Please install it with: pip install openai")
|
292
|
+
client = openai.OpenAI(
|
293
|
+
api_key=config.api_key, base_url="https://api.z.ai/api/paas/v4/"
|
294
|
+
)
|
284
295
|
return client
|
285
296
|
except Exception as e:
|
286
297
|
print(
|
@@ -18,15 +18,15 @@ MODEL_SPECS = {
|
|
18
18
|
"output_cost_per_1k": 0.0015,
|
19
19
|
},
|
20
20
|
),
|
21
|
-
"glm-4": LLMModelInfo(
|
22
|
-
name="glm-4",
|
21
|
+
"glm-4.5-air": LLMModelInfo(
|
22
|
+
name="glm-4.5-air",
|
23
23
|
context=128000,
|
24
24
|
max_input=128000,
|
25
|
-
max_cot=
|
25
|
+
max_cot=4096,
|
26
26
|
max_response=4096,
|
27
|
-
thinking_supported=
|
27
|
+
thinking_supported=True,
|
28
28
|
other={
|
29
|
-
"description": "Z.AI's GLM-4 model
|
29
|
+
"description": "Z.AI's GLM-4.5-Air model - compact and efficient version",
|
30
30
|
"supports_tools": True,
|
31
31
|
"supports_images": True,
|
32
32
|
"supports_audio": False,
|
@@ -35,21 +35,4 @@ MODEL_SPECS = {
|
|
35
35
|
"output_cost_per_1k": 0.0009,
|
36
36
|
},
|
37
37
|
),
|
38
|
-
"glm-4v": LLMModelInfo(
|
39
|
-
name="glm-4v",
|
40
|
-
context=128000,
|
41
|
-
max_input=128000,
|
42
|
-
max_cot="N/A",
|
43
|
-
max_response=4096,
|
44
|
-
thinking_supported=False,
|
45
|
-
other={
|
46
|
-
"description": "Z.AI's GLM-4V vision model for image understanding",
|
47
|
-
"supports_tools": True,
|
48
|
-
"supports_images": True,
|
49
|
-
"supports_audio": False,
|
50
|
-
"supports_video": False,
|
51
|
-
"input_cost_per_1k": 0.0004,
|
52
|
-
"output_cost_per_1k": 0.0012,
|
53
|
-
},
|
54
|
-
),
|
55
38
|
}
|
janito/providers/zai/provider.py
CHANGED
@@ -17,7 +17,7 @@ class ZAIProvider(LLMProvider):
|
|
17
17
|
NAME = "zai"
|
18
18
|
MAINTAINER = "João Pinto <janito@ikignosis.org>"
|
19
19
|
MODEL_SPECS = MODEL_SPECS
|
20
|
-
DEFAULT_MODEL = "glm-4.5" # Options: glm-4.5, glm-4
|
20
|
+
DEFAULT_MODEL = "glm-4.5-air" # Options: glm-4.5, glm-4.5-air
|
21
21
|
|
22
22
|
def __init__(
|
23
23
|
self, auth_manager: LLMAuthManager = None, config: LLMDriverConfig = None
|
@@ -33,6 +33,8 @@ class ZAIProvider(LLMProvider):
|
|
33
33
|
# crash with an AttributeError when it tries to access `self._tools_adapter`.
|
34
34
|
self._tools_adapter = get_local_tools_adapter()
|
35
35
|
self._driver = None
|
36
|
+
# Initialize _driver_config to avoid AttributeError
|
37
|
+
self._driver_config = LLMDriverConfig(model=None)
|
36
38
|
|
37
39
|
def _setup_available(self, auth_manager, config):
|
38
40
|
self.auth_manager = auth_manager or LLMAuthManager()
|
@@ -43,6 +45,7 @@ class ZAIProvider(LLMProvider):
|
|
43
45
|
)
|
44
46
|
print(f" janito --set-api-key YOUR_API_KEY -p {self.name}")
|
45
47
|
print(f"Or set the ZAI_API_KEY environment variable.")
|
48
|
+
self._tools_adapter = get_local_tools_adapter()
|
46
49
|
return
|
47
50
|
|
48
51
|
self._tools_adapter = get_local_tools_adapter()
|
@@ -4,7 +4,7 @@ Generate OpenAI-compatible tool schemas for Z.AI API.
|
|
4
4
|
|
5
5
|
import inspect
|
6
6
|
from typing import get_type_hints, Dict, Any, Optional, List, Union
|
7
|
-
from janito.tools import
|
7
|
+
from janito.tools.tool_base import ToolBase
|
8
8
|
|
9
9
|
|
10
10
|
def generate_tool_schemas(tool_classes):
|
@@ -35,14 +35,16 @@ def generate_tool_schema(tool_class):
|
|
35
35
|
Returns:
|
36
36
|
OpenAI-compatible tool schema dict
|
37
37
|
"""
|
38
|
-
if not issubclass(tool_class,
|
38
|
+
if not issubclass(tool_class, ToolBase):
|
39
39
|
return None
|
40
40
|
|
41
41
|
tool_instance = tool_class()
|
42
42
|
|
43
|
-
# Get the execute method
|
43
|
+
# Get the execute or run method
|
44
44
|
execute_method = getattr(tool_class, "execute", None)
|
45
|
-
if
|
45
|
+
if execute_method is None:
|
46
|
+
execute_method = getattr(tool_class, "run", None)
|
47
|
+
if execute_method is None:
|
46
48
|
return None
|
47
49
|
|
48
50
|
# Get method signature and type hints
|
@@ -78,7 +80,7 @@ def generate_tool_schema(tool_class):
|
|
78
80
|
schema = {
|
79
81
|
"type": "function",
|
80
82
|
"function": {
|
81
|
-
"name": tool_class.__name__,
|
83
|
+
"name": getattr(tool_instance, "tool_name", tool_class.__name__),
|
82
84
|
"description": getattr(
|
83
85
|
tool_instance, "description", f"Execute {tool_class.__name__}"
|
84
86
|
),
|
@@ -20,7 +20,7 @@ janito/provider_registry.py,sha256=l0jJZ74KIebOSYXPiy7uqH8d48pckR_WTyAO4iQF98o,6
|
|
20
20
|
janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
|
21
21
|
janito/shell.bak.zip,sha256=hznHbmgfkAkjuQDJ3w73XPQh05yrtUZQxLmtGbanbYU,22
|
22
22
|
janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
|
23
|
-
janito/agent/setup_agent.py,sha256=
|
23
|
+
janito/agent/setup_agent.py,sha256=ibi1oHyAFkf0FHgN6QCHXF8tz8IfM79ugAMlVKttWYw,11605
|
24
24
|
janito/agent/templates/profiles/system_prompt_template_Developer_with_Python_Tools.txt.j2,sha256=28TITVITH4RTdOwPpNZFSygm6OSpFb_Jr4mHprrLBhc,2584
|
25
25
|
janito/agent/templates/profiles/system_prompt_template_developer.txt.j2,sha256=zj0ZA17iYt-6c0usgjUw_cLKnb5qDuixpxS9et5ECyw,2272
|
26
26
|
janito/agent/templates/profiles/system_prompt_template_model_conversation_without_tools_or_context.txt.j2,sha256=dTV9aF8ji2r9dzi-l4b9r95kHrbKmjvnRxk5cVpopN4,28
|
@@ -28,7 +28,7 @@ janito/cli/__init__.py,sha256=xaPDOrWphBbCR63Xpcx_yfpXSJIlCaaICc4j2qpWqrM,194
|
|
28
28
|
janito/cli/config.py,sha256=HkZ14701HzIqrvaNyDcDhGlVHfpX_uHlLp2rHmhRm_k,872
|
29
29
|
janito/cli/console.py,sha256=gJolqzWL7jEPLxeuH-CwBDRFpXt976KdZOEAB2tdBDs,64
|
30
30
|
janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
|
31
|
-
janito/cli/main_cli.py,sha256=
|
31
|
+
janito/cli/main_cli.py,sha256=figOoRlmegu6fyl-bmDbnYY5EQIcOEdJ6h2K6Qe1E7Q,14273
|
32
32
|
janito/cli/prompt_core.py,sha256=F68J4Xl6jZMYFN4oBBYZFj15Jp-HTYoLub4bw2XpNRU,11648
|
33
33
|
janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
|
34
34
|
janito/cli/prompt_setup.py,sha256=1s5yccFaWMgDkUjkvnTYGEWJAFPJ6hIiqwbrLfzWxMI,2038
|
@@ -73,6 +73,7 @@ janito/cli/chat_mode/shell/session/__init__.py,sha256=uTYE_QpZFEn7v9QE5o1LdulpCW
|
|
73
73
|
janito/cli/chat_mode/shell/session/history.py,sha256=tYav6GgjAZkvWhlI_rfG6OArNqW6Wn2DTv39Hb20QYc,1262
|
74
74
|
janito/cli/chat_mode/shell/session/manager.py,sha256=MwD9reHsRaly0CyRB-S1JJ0wPKz2g8Xdj2VvlU35Hgc,1001
|
75
75
|
janito/cli/cli_commands/list_config.py,sha256=oiQEGaGPjwjG-PrOcakpNMbbqISTsBEs7rkGH3ceQsI,1179
|
76
|
+
janito/cli/cli_commands/list_drivers.py,sha256=u7o0xk4V5iScC4iPM_a5rFIiRqHtCNZse4ilszAZ1B0,4715
|
76
77
|
janito/cli/cli_commands/list_models.py,sha256=_rqHz89GsNLcH0GGkFqPue7ah4ZbN9YHm0lEP30Aa-A,1111
|
77
78
|
janito/cli/cli_commands/list_profiles.py,sha256=9-HV2EbtP2AdubbMoakjbu7Oq4Ss9UDyO7Eb6CC52wI,2681
|
78
79
|
janito/cli/cli_commands/list_providers.py,sha256=v8OQ8ULnuzNuvgkeKqGXGj69eOiavAlPGhzfR0zavhg,185
|
@@ -84,7 +85,7 @@ janito/cli/cli_commands/show_config.py,sha256=eYMcuvU-d7mvvuctbQacZFERqcKHEnxaRR
|
|
84
85
|
janito/cli/cli_commands/show_system_prompt.py,sha256=9ZJGW7lIGJ9LX2JZiWVEm4AbaD0qEQO7LF89jPgk52I,5232
|
85
86
|
janito/cli/core/__init__.py,sha256=YH95fhgY9yBX8RgqX9dSrEkl4exjV0T4rbmJ6xUpG-Y,196
|
86
87
|
janito/cli/core/event_logger.py,sha256=1X6lR0Ax7AgF8HlPWFoY5Ystuu7Bh4ooTo78vXzeGB0,2008
|
87
|
-
janito/cli/core/getters.py,sha256=
|
88
|
+
janito/cli/core/getters.py,sha256=glUtg8K_q0vMAaLG91J9JRq5f26nJLGbDVghSNx9s28,2050
|
88
89
|
janito/cli/core/model_guesser.py,sha256=jzkkiQ-J2buT2Omh6jYZHa8-zCJxqKQBL08Z58pe1_o,1741
|
89
90
|
janito/cli/core/runner.py,sha256=3vP92XEUzzHeOWbMHg82iISsXVUAM7y8YKWGNSIMyA8,8337
|
90
91
|
janito/cli/core/setters.py,sha256=PD3aT1y1q8XWQVtRNfrU0dtlW4JGdn6BMJyP7FCQWhc,4623
|
@@ -93,13 +94,12 @@ janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-we
|
|
93
94
|
janito/cli/single_shot_mode/handler.py,sha256=U70X7c9MHbmj1vQlTI-Ao2JvRprpLbPh9wL5gAMbEhs,3790
|
94
95
|
janito/docs/GETTING_STARTED.md,sha256=EbXV7B3XxjSy1E0XQJFOVITVbTmZBVB7pjth2Mb4_rg,2835
|
95
96
|
janito/drivers/dashscope.bak.zip,sha256=9Pv4Xyciju8jO1lEMFVgYXexoZkxmDO3Ig6vw3ODfL8,4936
|
96
|
-
janito/drivers/driver_registry.py,sha256=sbij7R71JJqJVeMfmaU-FKsEuZVO8oEn6Qp8020hdZw,773
|
97
97
|
janito/drivers/openai_responses.bak.zip,sha256=E43eDCHGa2tCtdjzj_pMnWDdnsOZzj8BJTR5tJp8wcM,13352
|
98
98
|
janito/drivers/azure_openai/driver.py,sha256=rec2D4DDuMjdnbGNIsrnB0oiwuxL_zBykJeUGa-PffI,4074
|
99
99
|
janito/drivers/openai/README.md,sha256=bgPdaYX0pyotCoJ9t3cJbYM-teQ_YM1DAFEKLCMP32Q,666
|
100
100
|
janito/drivers/openai/driver.py,sha256=O0AAp-aF3TKQLp_FSsRWm_QDG_mKliLlpDjf09fWzl4,19061
|
101
101
|
janito/drivers/zai/__init__.py,sha256=rleES3ZJEslJ8M02TdTPyxHKXxA4-e2fDJa6yjuzY8s,22
|
102
|
-
janito/drivers/zai/driver.py,sha256=
|
102
|
+
janito/drivers/zai/driver.py,sha256=YqdOBMltsjWq8nFttW61wSVpppS-YQh_F-nhVdIvZ_o,19245
|
103
103
|
janito/event_bus/__init__.py,sha256=VG6GOhKMBh0O_92D-zW8a3YitJPKDajGgPiFezTXlNE,77
|
104
104
|
janito/event_bus/bus.py,sha256=LokZbAdwcWhWOyKSp7H3Ism57x4EZhxlRPjl3NE4UKU,2847
|
105
105
|
janito/event_bus/event.py,sha256=MtgcBPD7cvCuubiLIyo-BWcsNSO-941HLk6bScHTJtQ,427
|
@@ -143,9 +143,9 @@ janito/providers/openai/model_info.py,sha256=cz08O26Ychm-aP3T8guJRqpR96Im9Cwtgl2
|
|
143
143
|
janito/providers/openai/provider.py,sha256=U9Bp9g2KQ58J6-B5vDgsXM05xASsgaWQOofewC7hiXs,5145
|
144
144
|
janito/providers/openai/schema_generator.py,sha256=hTqeLcPTR8jeKn5DUUpo7b-EZ-V-g1WwXiX7MbHnFzE,2234
|
145
145
|
janito/providers/zai/__init__.py,sha256=qtIr9_QBFaXG8xB6cRDGhS7se6ir11CWseI9azLMRBo,24
|
146
|
-
janito/providers/zai/model_info.py,sha256=
|
147
|
-
janito/providers/zai/provider.py,sha256=
|
148
|
-
janito/providers/zai/schema_generator.py,sha256=
|
146
|
+
janito/providers/zai/model_info.py,sha256=ldwD8enpxXv1G-YsDw4YJn31YsVueQ4vj5HgoYvnPxo,1183
|
147
|
+
janito/providers/zai/provider.py,sha256=9RLVchSUzUlcsugd6fKEB1jZbWvJsAjKsb5XaxM5Tdo,5417
|
148
|
+
janito/providers/zai/schema_generator.py,sha256=0kuxbrWfNKGO9fzxFStqOpTT09ldyI6vYxeDxFN4ku8,4091
|
149
149
|
janito/tools/DOCSTRING_STANDARD.txt,sha256=VLPwNgjxRVD_xZSSVvUZ4H-4bBwM-VKh_RyfzYQsYSs,1735
|
150
150
|
janito/tools/README.md,sha256=5HkLpF5k4PENJER7SlDPRXj0yo9mpHvAHW4uuzhq4ak,115
|
151
151
|
janito/tools/__init__.py,sha256=W1B39PztC2UF7PS2WyLH6el32MFOETMlN1-LurOROCg,1171
|
@@ -207,9 +207,9 @@ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=TeIkPt0
|
|
207
207
|
janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=BfCO_K18qy92m-2ZVvHsbEU5e11OPo1pO9Vz4G4616E,130
|
208
208
|
janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=AijlsP_PgNuC8ZbGsC5vOTt3Jur76otQzkd_7qR0QFY,284
|
209
209
|
janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=TgyI0HRL6ug_gBcWEm5TGJJuA4E34ZXcIzMpAbv3oJs,155
|
210
|
-
janito-2.
|
211
|
-
janito-2.
|
212
|
-
janito-2.
|
213
|
-
janito-2.
|
214
|
-
janito-2.
|
215
|
-
janito-2.
|
210
|
+
janito-2.14.0.dist-info/licenses/LICENSE,sha256=GSAKapQH5ZIGWlpQTA7v5YrfECyaxaohUb1vJX-qepw,1090
|
211
|
+
janito-2.14.0.dist-info/METADATA,sha256=l3vlitZrrayIG-WdOza2JqsTeOBEgtH_Md1FZXz_GSw,16365
|
212
|
+
janito-2.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
213
|
+
janito-2.14.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
214
|
+
janito-2.14.0.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
|
215
|
+
janito-2.14.0.dist-info/RECORD,,
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# janito/drivers/driver_registry.py
|
2
|
-
"""
|
3
|
-
DriverRegistry: Maps driver string names to class objects for use by providers.
|
4
|
-
"""
|
5
|
-
|
6
|
-
from typing import Dict, Type
|
7
|
-
|
8
|
-
# --- Import driver classes ---
|
9
|
-
from janito.drivers.azure_openai.driver import AzureOpenAIModelDriver
|
10
|
-
from janito.drivers.openai.driver import OpenAIModelDriver
|
11
|
-
|
12
|
-
_DRIVER_REGISTRY: Dict[str, Type] = {
|
13
|
-
"AzureOpenAIModelDriver": AzureOpenAIModelDriver,
|
14
|
-
"OpenAIModelDriver": OpenAIModelDriver,
|
15
|
-
}
|
16
|
-
|
17
|
-
|
18
|
-
def get_driver_class(name: str):
|
19
|
-
"""Get the driver class by string name."""
|
20
|
-
try:
|
21
|
-
return _DRIVER_REGISTRY[name]
|
22
|
-
except KeyError:
|
23
|
-
raise ValueError(f"No driver found for name: {name}")
|
24
|
-
|
25
|
-
|
26
|
-
def register_driver(name: str, cls: type):
|
27
|
-
_DRIVER_REGISTRY[name] = cls
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|