janito 3.13.3__py3-none-any.whl → 3.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/cli/main_cli.py +16 -2
- janito/docs/GETTING_STARTED.md +7 -0
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/METADATA +1 -1
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/RECORD +8 -8
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/WHEEL +0 -0
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/entry_points.txt +0 -0
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/licenses/LICENSE +0 -0
- {janito-3.13.3.dist-info → janito-3.14.0.dist-info}/top_level.txt +0 -0
janito/cli/main_cli.py
CHANGED
@@ -173,7 +173,7 @@ definition = [
|
|
173
173
|
},
|
174
174
|
),
|
175
175
|
(["-p", "--provider"], {"metavar": "PROVIDER", "help": "Select the provider"}),
|
176
|
-
(["-m", "--model"], {"metavar": "MODEL", "help": "Select the model"}),
|
176
|
+
(["-m", "--model"], {"metavar": "MODEL", "help": "Select the model (can use model@provider syntax)"}),
|
177
177
|
(
|
178
178
|
["-t", "--temperature"],
|
179
179
|
{"type": float, "default": None, "help": "Set the temperature"},
|
@@ -304,11 +304,13 @@ class JanitoCLI:
|
|
304
304
|
|
305
305
|
self.parser = argparse.ArgumentParser(
|
306
306
|
description="Janito CLI - A tool for running LLM-powered workflows from the command line."
|
307
|
-
"\n\nExample usage: janito -p moonshot -m kimi-k1-8k 'Your prompt here'\n
|
307
|
+
"\n\nExample usage: janito -p moonshot -m kimi-k1-8k 'Your prompt here'\n"
|
308
|
+
"Example usage: janito -m model@provider 'Your prompt here'\n\n"
|
308
309
|
"Use -m or --model to set the model for the session.",
|
309
310
|
)
|
310
311
|
self._define_args()
|
311
312
|
self.args = self.parser.parse_args()
|
313
|
+
self._parse_model_provider_syntax()
|
312
314
|
self._set_all_arg_defaults()
|
313
315
|
# Support custom config file via -c/--config
|
314
316
|
if getattr(self.args, "config", None):
|
@@ -349,6 +351,18 @@ class JanitoCLI:
|
|
349
351
|
|
350
352
|
self.rich_reporter = RichTerminalReporter(raw_mode=self.args.raw)
|
351
353
|
|
354
|
+
def _parse_model_provider_syntax(self):
|
355
|
+
"""Parse -m model@provider syntax to split into model and provider."""
|
356
|
+
model = getattr(self.args, "model", None)
|
357
|
+
if model and "@" in model:
|
358
|
+
model_part, provider_part = model.rsplit("@", 1)
|
359
|
+
if model_part and provider_part:
|
360
|
+
# Only set provider if not already explicitly set via -p flag
|
361
|
+
if getattr(self.args, "provider", None) is None:
|
362
|
+
self.args.provider = provider_part
|
363
|
+
# Always set the model part (without the @provider suffix)
|
364
|
+
self.args.model = model_part
|
365
|
+
|
352
366
|
def _define_args(self):
|
353
367
|
for argnames, argkwargs in definition:
|
354
368
|
# Patch version argument dynamically with real version
|
janito/docs/GETTING_STARTED.md
CHANGED
@@ -57,6 +57,9 @@ janito --set-config ibm project_id YOUR_PROJECT_ID
|
|
57
57
|
|
58
58
|
# Verify it's working
|
59
59
|
janito "Hello, can you introduce yourself?"
|
60
|
+
|
61
|
+
# Or use the shorthand syntax
|
62
|
+
janito -m ibm/granite-3-3-8b-instruct@ibm "Hello, can you introduce yourself?"
|
60
63
|
```
|
61
64
|
|
62
65
|
## Your First Commands
|
@@ -69,6 +72,10 @@ janito "Create a Python script to calculate fibonacci numbers"
|
|
69
72
|
# With specific model
|
70
73
|
janito -m kimi-k1-8k "Explain machine learning in simple terms"
|
71
74
|
|
75
|
+
# Using model@provider syntax (shorthand)
|
76
|
+
janito -m kimi-k1-8k@moonshot "Explain machine learning in simple terms"
|
77
|
+
janito -m gpt-4@openai "Explain quantum computing"
|
78
|
+
|
72
79
|
# Interactive chat mode
|
73
80
|
janito --chat
|
74
81
|
```
|
@@ -30,7 +30,7 @@ janito/cli/__init__.py,sha256=xaPDOrWphBbCR63Xpcx_yfpXSJIlCaaICc4j2qpWqrM,194
|
|
30
30
|
janito/cli/config.py,sha256=HkZ14701HzIqrvaNyDcDhGlVHfpX_uHlLp2rHmhRm_k,872
|
31
31
|
janito/cli/console.py,sha256=dWOa6mbfCQd46wVwwZfeYBxroCxdqvnAZQQ80j89qYA,70
|
32
32
|
janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
|
33
|
-
janito/cli/main_cli.py,sha256=
|
33
|
+
janito/cli/main_cli.py,sha256=JaZUedhNdeNRaYU5j2bH0u1dD8B89olk3ZSx1_REQjI,17204
|
34
34
|
janito/cli/prompt_core.py,sha256=x1RcX1p4wCL4YzXS76T6BZ8nt5cGiXCAB3QOlC6BJQQ,14937
|
35
35
|
janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
|
36
36
|
janito/cli/prompt_setup.py,sha256=s48gvNfZhKjsEhf4EzL1tKIGm4wDidPMDvlM6TAPYes,2116
|
@@ -104,7 +104,7 @@ janito/cli/core/setters.py,sha256=zjSUxy6iUzcrmEunFk7dA90KqbMaq2O7LTGP8wn2HxA,53
|
|
104
104
|
janito/cli/core/unsetters.py,sha256=FEw9gCt0vRvoCt0kRSNfVB2tzi_TqppJIx2nHPP59-k,2012
|
105
105
|
janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-weSSCn0hrwHY,115
|
106
106
|
janito/cli/single_shot_mode/handler.py,sha256=2sIX2hmX_FRCLI4NkPPABOpMegI0YokjelHQ20f_YG8,6129
|
107
|
-
janito/docs/GETTING_STARTED.md,sha256=
|
107
|
+
janito/docs/GETTING_STARTED.md,sha256=iVg8wNpegqEaIYFqanHNQpPwrA-ytflfcplPR3SlSKQ,5051
|
108
108
|
janito/drivers/dashscope.bak.zip,sha256=9Pv4Xyciju8jO1lEMFVgYXexoZkxmDO3Ig6vw3ODfL8,4936
|
109
109
|
janito/drivers/openai_responses.bak.zip,sha256=E43eDCHGa2tCtdjzj_pMnWDdnsOZzj8BJTR5tJp8wcM,13352
|
110
110
|
janito/drivers/azure_openai/driver.py,sha256=V_Dmwv6TzCoH6uzH_zIVUlodYfCo6YkCCjQz-jK2Zhg,4101
|
@@ -266,9 +266,9 @@ janito/tools/tool_utils.py,sha256=alPm9DvtXSw_zPRKvP5GjbebPRf_nfvmWk2TNlL5Cws,12
|
|
266
266
|
janito/tools/tools_adapter.py,sha256=3Phjw34mOqG0KvXzQpZKIWigfSgZWRvdYuSdvV7Dj4M,21965
|
267
267
|
janito/tools/tools_schema.py,sha256=rGrKrmpPNR07VXHAJ_haGBRRO-YGLOF51BlYRep9AAQ,4415
|
268
268
|
janito/tools/url_whitelist.py,sha256=0CPLkHTp5HgnwgjxwgXnJmwPeZQ30q4j3YjW59hiUUE,4295
|
269
|
-
janito-3.
|
270
|
-
janito-3.
|
271
|
-
janito-3.
|
272
|
-
janito-3.
|
273
|
-
janito-3.
|
274
|
-
janito-3.
|
269
|
+
janito-3.14.0.dist-info/licenses/LICENSE,sha256=dXV4fOF2ZErugtN8l_Nrj5tsRTYgtjE3cgiya0UfBio,11356
|
270
|
+
janito-3.14.0.dist-info/METADATA,sha256=o_wzLSBDQKlaju9C6KzaPJtZKUAjZk_YtqMmF3Hl84E,2330
|
271
|
+
janito-3.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
272
|
+
janito-3.14.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
273
|
+
janito-3.14.0.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
|
274
|
+
janito-3.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|