licos-dev-cli 0.2.12__tar.gz → 0.2.13__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.
- {licos_dev_cli-0.2.12 → licos_dev_cli-0.2.13}/PKG-INFO +2 -2
- {licos_dev_cli-0.2.12 → licos_dev_cli-0.2.13}/pyproject.toml +2 -2
- {licos_dev_cli-0.2.12 → licos_dev_cli-0.2.13}/src/licos_dev_cli/main.py +130 -130
- {licos_dev_cli-0.2.12 → licos_dev_cli-0.2.13}/.gitignore +0 -0
- {licos_dev_cli-0.2.12 → licos_dev_cli-0.2.13}/src/licos_dev_cli/__init__.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: licos-dev-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: LICOS Dev CLI - generate files and call model capabilities
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: click>=8.1
|
|
7
|
-
Requires-Dist: licos-dev-sdk>=0.2.
|
|
7
|
+
Requires-Dist: licos-dev-sdk>=0.2.14
|
|
@@ -4,11 +4,11 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "licos-dev-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.13"
|
|
8
8
|
description = "LICOS Dev CLI - generate files and call model capabilities"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"licos-dev-sdk>=0.2.
|
|
11
|
+
"licos-dev-sdk>=0.2.14",
|
|
12
12
|
"click>=8.1",
|
|
13
13
|
]
|
|
14
14
|
|
|
@@ -432,32 +432,32 @@ def vision_group():
|
|
|
432
432
|
pass
|
|
433
433
|
|
|
434
434
|
|
|
435
|
-
@vision_group.command("understand")
|
|
436
|
-
@click.option("--image", "image", multiple=True, help="Image URL, Base64 data URI, or plain Base64 image data. Can be repeated.")
|
|
437
|
-
@click.option("--image-url", "image_url", multiple=True, help="Alias for --image. Can be repeated.")
|
|
438
|
-
@click.option("--file-path", "file_path", multiple=True, help="Local image file path. Can be repeated.")
|
|
439
|
-
@click.option("-p", "--prompt", default="Describe this image.")
|
|
440
|
-
@click.option("--model", default=None)
|
|
441
|
-
@click.option("--mime-type", default=None, help="MIME type for plain Base64 image inputs. Defaults to image/png.")
|
|
442
|
-
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
443
|
-
def vision_understand(image, image_url, file_path, prompt, model, mime_type, raw_request):
|
|
444
|
-
"""Understand one or more images with the catalog vision model."""
|
|
445
|
-
from licos_dev_sdk import VisionClient
|
|
446
|
-
|
|
447
|
-
raw_payload = _json_option(raw_request, "--raw-request")
|
|
448
|
-
if raw_payload is not None and not isinstance(raw_payload, dict):
|
|
449
|
-
raise click.BadParameter("--raw-request must be a JSON object")
|
|
450
|
-
if raw_payload is None and not image_url and not image and not file_path:
|
|
451
|
-
raise click.UsageError("Provide --image, --image-url, --file-path, or --raw-request.")
|
|
452
|
-
result = VisionClient().understand(
|
|
453
|
-
images=[*image, *image_url],
|
|
454
|
-
file_paths=list(file_path),
|
|
455
|
-
prompt=prompt,
|
|
456
|
-
model=model,
|
|
457
|
-
mime_type=mime_type,
|
|
458
|
-
raw_request=raw_payload,
|
|
459
|
-
)
|
|
460
|
-
_echo_json(result)
|
|
435
|
+
@vision_group.command("understand")
|
|
436
|
+
@click.option("--image", "image", multiple=True, help="Image URL, Base64 data URI, or plain Base64 image data. Can be repeated.")
|
|
437
|
+
@click.option("--image-url", "image_url", multiple=True, help="Alias for --image. Can be repeated.")
|
|
438
|
+
@click.option("--file-path", "file_path", multiple=True, help="Local image file path. Can be repeated.")
|
|
439
|
+
@click.option("-p", "--prompt", default="Describe this image.")
|
|
440
|
+
@click.option("--model", default=None)
|
|
441
|
+
@click.option("--mime-type", default=None, help="MIME type for plain Base64 image inputs. Defaults to image/png.")
|
|
442
|
+
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
443
|
+
def vision_understand(image, image_url, file_path, prompt, model, mime_type, raw_request):
|
|
444
|
+
"""Understand one or more images with the catalog vision model."""
|
|
445
|
+
from licos_dev_sdk import VisionClient
|
|
446
|
+
|
|
447
|
+
raw_payload = _json_option(raw_request, "--raw-request")
|
|
448
|
+
if raw_payload is not None and not isinstance(raw_payload, dict):
|
|
449
|
+
raise click.BadParameter("--raw-request must be a JSON object")
|
|
450
|
+
if raw_payload is None and not image_url and not image and not file_path:
|
|
451
|
+
raise click.UsageError("Provide --image, --image-url, --file-path, or --raw-request.")
|
|
452
|
+
result = VisionClient().understand(
|
|
453
|
+
images=[*image, *image_url],
|
|
454
|
+
file_paths=list(file_path),
|
|
455
|
+
prompt=prompt,
|
|
456
|
+
model=model,
|
|
457
|
+
mime_type=mime_type,
|
|
458
|
+
raw_request=raw_payload,
|
|
459
|
+
)
|
|
460
|
+
_echo_json(result)
|
|
461
461
|
|
|
462
462
|
|
|
463
463
|
# ── Image Generation ─────────────────────────────────────────────────────────
|
|
@@ -469,35 +469,35 @@ def image_generation_group():
|
|
|
469
469
|
|
|
470
470
|
|
|
471
471
|
@image_generation_group.command("generate")
|
|
472
|
-
@click.option("-p", "--prompt")
|
|
473
|
-
@click.option("--image", "image", multiple=True, help="Source/reference image URL or Base64 data URI")
|
|
474
|
-
@click.option("--image-url", "image_url", multiple=True, help="Alias for --image")
|
|
475
|
-
@click.option("--reference-image", default=None, help="Alias for --image")
|
|
476
|
-
@click.option("--file-path", "file_path", multiple=True, help="Local source/reference image path")
|
|
477
|
-
@click.option("--input-capabilities", default=None, help="Override image model input filter: text or image")
|
|
478
|
-
@click.option("--negative-prompt", default=None)
|
|
479
|
-
@click.option("--count", default=1, type=int)
|
|
480
|
-
@click.option("--size", default=None)
|
|
472
|
+
@click.option("-p", "--prompt")
|
|
473
|
+
@click.option("--image", "image", multiple=True, help="Source/reference image URL or Base64 data URI")
|
|
474
|
+
@click.option("--image-url", "image_url", multiple=True, help="Alias for --image")
|
|
475
|
+
@click.option("--reference-image", default=None, help="Alias for --image")
|
|
476
|
+
@click.option("--file-path", "file_path", multiple=True, help="Local source/reference image path")
|
|
477
|
+
@click.option("--input-capabilities", default=None, help="Override image model input filter: text or image")
|
|
478
|
+
@click.option("--negative-prompt", default=None)
|
|
479
|
+
@click.option("--count", default=1, type=int)
|
|
480
|
+
@click.option("--size", default=None)
|
|
481
481
|
@click.option("--model", default=None)
|
|
482
|
-
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
483
|
-
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
484
|
-
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
485
|
-
def image_generate(
|
|
486
|
-
prompt,
|
|
487
|
-
image,
|
|
488
|
-
image_url,
|
|
489
|
-
reference_image,
|
|
490
|
-
file_path,
|
|
491
|
-
input_capabilities,
|
|
492
|
-
negative_prompt,
|
|
493
|
-
count,
|
|
494
|
-
size,
|
|
495
|
-
model,
|
|
496
|
-
parameters,
|
|
497
|
-
raw_request,
|
|
498
|
-
no_wait,
|
|
499
|
-
):
|
|
500
|
-
"""Generate images from text, image URLs/Base64, or local image files."""
|
|
482
|
+
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
483
|
+
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
484
|
+
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
485
|
+
def image_generate(
|
|
486
|
+
prompt,
|
|
487
|
+
image,
|
|
488
|
+
image_url,
|
|
489
|
+
reference_image,
|
|
490
|
+
file_path,
|
|
491
|
+
input_capabilities,
|
|
492
|
+
negative_prompt,
|
|
493
|
+
count,
|
|
494
|
+
size,
|
|
495
|
+
model,
|
|
496
|
+
parameters,
|
|
497
|
+
raw_request,
|
|
498
|
+
no_wait,
|
|
499
|
+
):
|
|
500
|
+
"""Generate images from text, image URLs/Base64, or local image files."""
|
|
501
501
|
from licos_dev_sdk import ImageGenerationClient
|
|
502
502
|
|
|
503
503
|
parameter_payload = _json_option(parameters, "--parameters") or {}
|
|
@@ -510,16 +510,16 @@ def image_generate(
|
|
|
510
510
|
raise click.UsageError("Provide --prompt or --raw-request.")
|
|
511
511
|
result = ImageGenerationClient().generate(
|
|
512
512
|
prompt or "",
|
|
513
|
-
negative_prompt=negative_prompt,
|
|
514
|
-
count=count,
|
|
515
|
-
size=size,
|
|
516
|
-
images=[*image, *image_url],
|
|
517
|
-
reference_image=reference_image,
|
|
518
|
-
file_paths=list(file_path),
|
|
519
|
-
input_capabilities=input_capabilities,
|
|
520
|
-
model=model,
|
|
521
|
-
parameters=parameter_payload,
|
|
522
|
-
raw_request=raw_payload,
|
|
513
|
+
negative_prompt=negative_prompt,
|
|
514
|
+
count=count,
|
|
515
|
+
size=size,
|
|
516
|
+
images=[*image, *image_url],
|
|
517
|
+
reference_image=reference_image,
|
|
518
|
+
file_paths=list(file_path),
|
|
519
|
+
input_capabilities=input_capabilities,
|
|
520
|
+
model=model,
|
|
521
|
+
parameters=parameter_payload,
|
|
522
|
+
raw_request=raw_payload,
|
|
523
523
|
wait=not no_wait,
|
|
524
524
|
)
|
|
525
525
|
_echo_json(result)
|
|
@@ -533,36 +533,36 @@ def video_generation_group():
|
|
|
533
533
|
pass
|
|
534
534
|
|
|
535
535
|
|
|
536
|
-
@video_generation_group.command("generate")
|
|
537
|
-
@click.option("-p", "--prompt")
|
|
538
|
-
@click.option("--image", default=None, help="Source/reference image URL, Base64 data URI, or plain Base64 image data")
|
|
539
|
-
@click.option("--image-url", default=None, help="Alias for --image")
|
|
540
|
-
@click.option("--reference-image", default=None, help="Alias for --image")
|
|
541
|
-
@click.option("--first-frame-url", default=None, help="Alias for --image")
|
|
542
|
-
@click.option("--file-path", default=None, help="Local source/reference image path")
|
|
543
|
-
@click.option("--model", default=None)
|
|
544
|
-
@click.option("--input-capabilities", default=None, help="Override video model input filter: text or image")
|
|
545
|
-
@click.option("--mime-type", default=None, help="MIME type for plain Base64 image inputs. Defaults to image/png.")
|
|
546
|
-
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
547
|
-
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
548
|
-
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
549
|
-
def video_generate(
|
|
550
|
-
prompt,
|
|
551
|
-
image,
|
|
552
|
-
image_url,
|
|
553
|
-
reference_image,
|
|
554
|
-
first_frame_url,
|
|
555
|
-
file_path,
|
|
556
|
-
model,
|
|
557
|
-
input_capabilities,
|
|
558
|
-
mime_type,
|
|
559
|
-
parameters,
|
|
560
|
-
raw_request,
|
|
561
|
-
no_wait,
|
|
562
|
-
):
|
|
563
|
-
"""Generate a video from a text prompt and optional first-frame image."""
|
|
564
|
-
from licos_dev_sdk import VideoGenerationClient
|
|
565
|
-
|
|
536
|
+
@video_generation_group.command("generate")
|
|
537
|
+
@click.option("-p", "--prompt")
|
|
538
|
+
@click.option("--image", default=None, help="Source/reference image URL, Base64 data URI, or plain Base64 image data")
|
|
539
|
+
@click.option("--image-url", default=None, help="Alias for --image")
|
|
540
|
+
@click.option("--reference-image", default=None, help="Alias for --image")
|
|
541
|
+
@click.option("--first-frame-url", default=None, help="Alias for --image")
|
|
542
|
+
@click.option("--file-path", default=None, help="Local source/reference image path")
|
|
543
|
+
@click.option("--model", default=None)
|
|
544
|
+
@click.option("--input-capabilities", default=None, help="Override video model input filter: text or image")
|
|
545
|
+
@click.option("--mime-type", default=None, help="MIME type for plain Base64 image inputs. Defaults to image/png.")
|
|
546
|
+
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
547
|
+
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
548
|
+
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
549
|
+
def video_generate(
|
|
550
|
+
prompt,
|
|
551
|
+
image,
|
|
552
|
+
image_url,
|
|
553
|
+
reference_image,
|
|
554
|
+
first_frame_url,
|
|
555
|
+
file_path,
|
|
556
|
+
model,
|
|
557
|
+
input_capabilities,
|
|
558
|
+
mime_type,
|
|
559
|
+
parameters,
|
|
560
|
+
raw_request,
|
|
561
|
+
no_wait,
|
|
562
|
+
):
|
|
563
|
+
"""Generate a video from a text prompt and optional first-frame image."""
|
|
564
|
+
from licos_dev_sdk import VideoGenerationClient
|
|
565
|
+
|
|
566
566
|
parameter_payload = _json_option(parameters, "--parameters") or {}
|
|
567
567
|
raw_payload = _json_option(raw_request, "--raw-request")
|
|
568
568
|
if not isinstance(parameter_payload, dict):
|
|
@@ -571,19 +571,19 @@ def video_generate(
|
|
|
571
571
|
raise click.BadParameter("--raw-request must be a JSON object")
|
|
572
572
|
if raw_payload is None and not prompt:
|
|
573
573
|
raise click.UsageError("Provide --prompt or --raw-request.")
|
|
574
|
-
result = VideoGenerationClient().generate(
|
|
575
|
-
prompt or "",
|
|
576
|
-
image=image,
|
|
577
|
-
image_url=image_url,
|
|
578
|
-
reference_image=reference_image,
|
|
579
|
-
first_frame_url=first_frame_url,
|
|
580
|
-
file_path=file_path,
|
|
581
|
-
model=model,
|
|
582
|
-
input_capabilities=input_capabilities,
|
|
583
|
-
mime_type=mime_type,
|
|
584
|
-
parameters=parameter_payload,
|
|
585
|
-
raw_request=raw_payload,
|
|
586
|
-
wait=not no_wait,
|
|
574
|
+
result = VideoGenerationClient().generate(
|
|
575
|
+
prompt or "",
|
|
576
|
+
image=image,
|
|
577
|
+
image_url=image_url,
|
|
578
|
+
reference_image=reference_image,
|
|
579
|
+
first_frame_url=first_frame_url,
|
|
580
|
+
file_path=file_path,
|
|
581
|
+
model=model,
|
|
582
|
+
input_capabilities=input_capabilities,
|
|
583
|
+
mime_type=mime_type,
|
|
584
|
+
parameters=parameter_payload,
|
|
585
|
+
raw_request=raw_payload,
|
|
586
|
+
wait=not no_wait,
|
|
587
587
|
)
|
|
588
588
|
_echo_json(result)
|
|
589
589
|
|
|
@@ -596,35 +596,35 @@ def audio_group():
|
|
|
596
596
|
pass
|
|
597
597
|
|
|
598
598
|
|
|
599
|
-
@audio_group.command("recognize")
|
|
600
|
-
@click.option("--audio", "audio", multiple=True, help="Audio URL, Base64 data URI, or plain Base64 audio data. Can be repeated.")
|
|
601
|
-
@click.option("--audio-url", "audio_url", multiple=True, help="Alias for --audio. Can be repeated.")
|
|
602
|
-
@click.option("--file-path", "file_path", multiple=True, help="Local audio file path. Can be repeated.")
|
|
603
|
-
@click.option("--model", default=None)
|
|
604
|
-
@click.option("--mime-type", default=None, help="MIME type for plain Base64 audio inputs. Defaults to audio/wav.")
|
|
605
|
-
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
606
|
-
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
607
|
-
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
608
|
-
def audio_recognize(audio, audio_url, file_path, model, mime_type, parameters, raw_request, no_wait):
|
|
609
|
-
"""Recognize speech from one or more audio inputs."""
|
|
610
|
-
from licos_dev_sdk import SpeechRecognitionClient
|
|
611
|
-
|
|
599
|
+
@audio_group.command("recognize")
|
|
600
|
+
@click.option("--audio", "audio", multiple=True, help="Audio URL, Base64 data URI, or plain Base64 audio data. Can be repeated.")
|
|
601
|
+
@click.option("--audio-url", "audio_url", multiple=True, help="Alias for --audio. Can be repeated.")
|
|
602
|
+
@click.option("--file-path", "file_path", multiple=True, help="Local audio file path. Can be repeated.")
|
|
603
|
+
@click.option("--model", default=None)
|
|
604
|
+
@click.option("--mime-type", default=None, help="MIME type for plain Base64 audio inputs. Defaults to audio/wav.")
|
|
605
|
+
@click.option("--parameters", default=None, help="Parameters JSON object")
|
|
606
|
+
@click.option("--raw-request", default=None, help="Raw JSON request body")
|
|
607
|
+
@click.option("--no-wait", is_flag=True, help="Return submit response without polling async tasks")
|
|
608
|
+
def audio_recognize(audio, audio_url, file_path, model, mime_type, parameters, raw_request, no_wait):
|
|
609
|
+
"""Recognize speech from one or more audio inputs."""
|
|
610
|
+
from licos_dev_sdk import SpeechRecognitionClient
|
|
611
|
+
|
|
612
612
|
parameter_payload = _json_option(parameters, "--parameters") or {}
|
|
613
613
|
raw_payload = _json_option(raw_request, "--raw-request")
|
|
614
614
|
if not isinstance(parameter_payload, dict):
|
|
615
615
|
raise click.BadParameter("--parameters must be a JSON object")
|
|
616
616
|
if raw_payload is not None and not isinstance(raw_payload, dict):
|
|
617
617
|
raise click.BadParameter("--raw-request must be a JSON object")
|
|
618
|
-
if raw_payload is None and not audio and not audio_url and not file_path:
|
|
619
|
-
raise click.UsageError("Provide --audio, --audio-url, --file-path, or --raw-request.")
|
|
620
|
-
result = SpeechRecognitionClient().recognize(
|
|
621
|
-
audios=[*audio, *audio_url],
|
|
622
|
-
file_paths=list(file_path),
|
|
623
|
-
model=model,
|
|
624
|
-
mime_type=mime_type,
|
|
625
|
-
parameters=parameter_payload,
|
|
626
|
-
raw_request=raw_payload,
|
|
627
|
-
wait=not no_wait,
|
|
618
|
+
if raw_payload is None and not audio and not audio_url and not file_path:
|
|
619
|
+
raise click.UsageError("Provide --audio, --audio-url, --file-path, or --raw-request.")
|
|
620
|
+
result = SpeechRecognitionClient().recognize(
|
|
621
|
+
audios=[*audio, *audio_url],
|
|
622
|
+
file_paths=list(file_path),
|
|
623
|
+
model=model,
|
|
624
|
+
mime_type=mime_type,
|
|
625
|
+
parameters=parameter_payload,
|
|
626
|
+
raw_request=raw_payload,
|
|
627
|
+
wait=not no_wait,
|
|
628
628
|
)
|
|
629
629
|
_echo_json(result)
|
|
630
630
|
|
|
File without changes
|
|
File without changes
|