deepctl-cmd-models 0.0.2__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.
- deepctl_cmd_models-0.0.2/PKG-INFO +63 -0
- deepctl_cmd_models-0.0.2/README.md +42 -0
- deepctl_cmd_models-0.0.2/pyproject.toml +41 -0
- deepctl_cmd_models-0.0.2/setup.cfg +4 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models/__init__.py +1 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models/command.py +133 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models/models.py +19 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/PKG-INFO +63 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/SOURCES.txt +11 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/dependency_links.txt +1 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/entry_points.txt +2 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/requires.txt +4 -0
- deepctl_cmd_models-0.0.2/src/deepctl_cmd_models.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepctl-cmd-models
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Models command for deepctl
|
|
5
|
+
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
+
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: deepgram,cli,models
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: deepctl-core>=0.1.10
|
|
18
|
+
Requires-Dist: click>=8.0.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
|
|
22
|
+
# deepctl-cmd-models
|
|
23
|
+
|
|
24
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
25
|
+
|
|
26
|
+
Models command for deepctl
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
31
|
+
|
|
32
|
+
### Install deepctl
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Install with pip
|
|
36
|
+
pip install deepctl
|
|
37
|
+
|
|
38
|
+
# Or install with uv
|
|
39
|
+
uv tool install deepctl
|
|
40
|
+
|
|
41
|
+
# Or install with pipx
|
|
42
|
+
pipx install deepctl
|
|
43
|
+
|
|
44
|
+
# Or run without installing
|
|
45
|
+
uvx deepctl --help
|
|
46
|
+
pipx run deepctl --help
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Commands
|
|
50
|
+
|
|
51
|
+
| Command | Entry Point |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `deepctl models` | `deepctl_cmd_models.command:ModelsCommand` |
|
|
54
|
+
|
|
55
|
+
## Dependencies
|
|
56
|
+
|
|
57
|
+
- `click>=8.0.0`
|
|
58
|
+
- `rich>=13.0.0`
|
|
59
|
+
- `pydantic>=2.0.0`
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# deepctl-cmd-models
|
|
2
|
+
|
|
3
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
4
|
+
|
|
5
|
+
Models command for deepctl
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
10
|
+
|
|
11
|
+
### Install deepctl
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install with pip
|
|
15
|
+
pip install deepctl
|
|
16
|
+
|
|
17
|
+
# Or install with uv
|
|
18
|
+
uv tool install deepctl
|
|
19
|
+
|
|
20
|
+
# Or install with pipx
|
|
21
|
+
pipx install deepctl
|
|
22
|
+
|
|
23
|
+
# Or run without installing
|
|
24
|
+
uvx deepctl --help
|
|
25
|
+
pipx run deepctl --help
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
| Command | Entry Point |
|
|
31
|
+
|---------|-------------|
|
|
32
|
+
| `deepctl models` | `deepctl_cmd_models.command:ModelsCommand` |
|
|
33
|
+
|
|
34
|
+
## Dependencies
|
|
35
|
+
|
|
36
|
+
- `click>=8.0.0`
|
|
37
|
+
- `rich>=13.0.0`
|
|
38
|
+
- `pydantic>=2.0.0`
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "deepctl-cmd-models"
|
|
7
|
+
version = "0.0.2" # x-release-please-version
|
|
8
|
+
description = "Models command for deepctl"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
authors = [{ name = "Deepgram", email = "devrel@deepgram.com" }]
|
|
12
|
+
maintainers = [{ name = "Deepgram", email = "devrel@deepgram.com" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 3 - Alpha",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
]
|
|
21
|
+
keywords = ["deepgram", "cli", "models"]
|
|
22
|
+
requires-python = ">=3.10"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"deepctl-core>=0.1.10",
|
|
25
|
+
"click>=8.0.0",
|
|
26
|
+
"rich>=13.0.0",
|
|
27
|
+
"pydantic>=2.0.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.scripts]
|
|
31
|
+
# Internal commands not meant to be called directly
|
|
32
|
+
|
|
33
|
+
[project.entry-points."deepctl.commands"]
|
|
34
|
+
models = "deepctl_cmd_models.command:ModelsCommand"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools]
|
|
37
|
+
package-dir = { "" = "src" }
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|
|
41
|
+
include = ["deepctl_cmd_models*"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Models command for deepctl."""
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""Models command for deepctl."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from deepctl_core import (
|
|
8
|
+
AuthManager,
|
|
9
|
+
BaseCommand,
|
|
10
|
+
BaseResult,
|
|
11
|
+
Config,
|
|
12
|
+
DeepgramClient,
|
|
13
|
+
)
|
|
14
|
+
from rich.console import Console
|
|
15
|
+
from rich.table import Table
|
|
16
|
+
|
|
17
|
+
from .models import ModelInfo, ModelsResult
|
|
18
|
+
|
|
19
|
+
console = Console()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ModelsCommand(BaseCommand):
|
|
23
|
+
"""Command for listing available Deepgram models."""
|
|
24
|
+
|
|
25
|
+
name = "models"
|
|
26
|
+
help = "List available Deepgram models"
|
|
27
|
+
short_help = "List models"
|
|
28
|
+
|
|
29
|
+
requires_auth = True
|
|
30
|
+
requires_project = False
|
|
31
|
+
ci_friendly = True
|
|
32
|
+
|
|
33
|
+
examples = [
|
|
34
|
+
"dg models",
|
|
35
|
+
"dg models --type stt",
|
|
36
|
+
"dg models --type tts",
|
|
37
|
+
"dg models --include-outdated",
|
|
38
|
+
]
|
|
39
|
+
agent_help = (
|
|
40
|
+
"List available Deepgram speech-to-text and text-to-speech models. "
|
|
41
|
+
"Filter by type (stt/tts) and optionally include outdated versions. "
|
|
42
|
+
"Requires authentication."
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def get_arguments(self) -> list[dict[str, Any]]:
|
|
46
|
+
return [
|
|
47
|
+
{
|
|
48
|
+
"names": ["--type", "-t"],
|
|
49
|
+
"help": "Filter by model type (stt, tts)",
|
|
50
|
+
"type": str,
|
|
51
|
+
"is_option": True,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"names": ["--include-outdated"],
|
|
55
|
+
"help": "Include outdated model versions",
|
|
56
|
+
"is_flag": True,
|
|
57
|
+
"is_option": True,
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
def handle(
|
|
62
|
+
self,
|
|
63
|
+
config: Config,
|
|
64
|
+
auth_manager: AuthManager,
|
|
65
|
+
client: DeepgramClient,
|
|
66
|
+
**kwargs: Any,
|
|
67
|
+
) -> BaseResult:
|
|
68
|
+
model_type = kwargs.get("type")
|
|
69
|
+
include_outdated = kwargs.get("include_outdated", False)
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
result = client.list_models(include_outdated=include_outdated)
|
|
73
|
+
|
|
74
|
+
stt_models = result.get("stt", [])
|
|
75
|
+
tts_models = result.get("tts", [])
|
|
76
|
+
|
|
77
|
+
all_models: list[ModelInfo] = []
|
|
78
|
+
|
|
79
|
+
if model_type != "tts":
|
|
80
|
+
for m in stt_models:
|
|
81
|
+
all_models.append(
|
|
82
|
+
ModelInfo(
|
|
83
|
+
model_id=m.get("uuid", m.get("model_id", "")),
|
|
84
|
+
name=m.get("name", ""),
|
|
85
|
+
version=m.get("version", ""),
|
|
86
|
+
language=m.get("language", ""),
|
|
87
|
+
model_type="stt",
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
if model_type != "stt":
|
|
92
|
+
for m in tts_models:
|
|
93
|
+
all_models.append(
|
|
94
|
+
ModelInfo(
|
|
95
|
+
model_id=m.get("uuid", m.get("model_id", "")),
|
|
96
|
+
name=m.get("name", ""),
|
|
97
|
+
version=m.get("version", ""),
|
|
98
|
+
language=m.get("language", ""),
|
|
99
|
+
model_type="tts",
|
|
100
|
+
)
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
if not all_models:
|
|
104
|
+
console.print("[yellow]No models found[/yellow]")
|
|
105
|
+
return ModelsResult(status="info", message="No models found")
|
|
106
|
+
|
|
107
|
+
# Display as table
|
|
108
|
+
table = Table(
|
|
109
|
+
title="Deepgram Models", show_header=True, header_style="bold blue"
|
|
110
|
+
)
|
|
111
|
+
table.add_column("Name", style="green")
|
|
112
|
+
table.add_column("Type", style="cyan")
|
|
113
|
+
table.add_column("Language")
|
|
114
|
+
table.add_column("Version")
|
|
115
|
+
table.add_column("ID", style="dim")
|
|
116
|
+
|
|
117
|
+
for m in all_models:
|
|
118
|
+
table.add_row(
|
|
119
|
+
m.name, m.model_type.upper(), m.language, m.version, m.model_id
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
console.print(table)
|
|
123
|
+
console.print(f"\n[dim]{len(all_models)} model(s) found[/dim]")
|
|
124
|
+
|
|
125
|
+
return ModelsResult(
|
|
126
|
+
status="success",
|
|
127
|
+
models=all_models,
|
|
128
|
+
count=len(all_models),
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
except Exception as e:
|
|
132
|
+
console.print(f"[red]Error listing models:[/red] {e}")
|
|
133
|
+
return BaseResult(status="error", message=str(e))
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Models for models command."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from deepctl_core import BaseResult
|
|
6
|
+
from pydantic import BaseModel, Field
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ModelInfo(BaseModel):
|
|
10
|
+
model_id: str = ""
|
|
11
|
+
name: str = ""
|
|
12
|
+
version: str = ""
|
|
13
|
+
language: str = ""
|
|
14
|
+
model_type: str = "" # "stt" or "tts"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ModelsResult(BaseResult):
|
|
18
|
+
models: list[ModelInfo] = Field(default_factory=list)
|
|
19
|
+
count: int = 0
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepctl-cmd-models
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Models command for deepctl
|
|
5
|
+
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
|
+
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: deepgram,cli,models
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: deepctl-core>=0.1.10
|
|
18
|
+
Requires-Dist: click>=8.0.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
|
|
22
|
+
# deepctl-cmd-models
|
|
23
|
+
|
|
24
|
+
> Part of [deepctl](https://github.com/deepgram/cli) — Official Deepgram CLI
|
|
25
|
+
|
|
26
|
+
Models command for deepctl
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
This package is included with deepctl and does not need to be installed separately.
|
|
31
|
+
|
|
32
|
+
### Install deepctl
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Install with pip
|
|
36
|
+
pip install deepctl
|
|
37
|
+
|
|
38
|
+
# Or install with uv
|
|
39
|
+
uv tool install deepctl
|
|
40
|
+
|
|
41
|
+
# Or install with pipx
|
|
42
|
+
pipx install deepctl
|
|
43
|
+
|
|
44
|
+
# Or run without installing
|
|
45
|
+
uvx deepctl --help
|
|
46
|
+
pipx run deepctl --help
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Commands
|
|
50
|
+
|
|
51
|
+
| Command | Entry Point |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `deepctl models` | `deepctl_cmd_models.command:ModelsCommand` |
|
|
54
|
+
|
|
55
|
+
## Dependencies
|
|
56
|
+
|
|
57
|
+
- `click>=8.0.0`
|
|
58
|
+
- `rich>=13.0.0`
|
|
59
|
+
- `pydantic>=2.0.0`
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT — see [LICENSE](../../LICENSE)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/deepctl_cmd_models/__init__.py
|
|
4
|
+
src/deepctl_cmd_models/command.py
|
|
5
|
+
src/deepctl_cmd_models/models.py
|
|
6
|
+
src/deepctl_cmd_models.egg-info/PKG-INFO
|
|
7
|
+
src/deepctl_cmd_models.egg-info/SOURCES.txt
|
|
8
|
+
src/deepctl_cmd_models.egg-info/dependency_links.txt
|
|
9
|
+
src/deepctl_cmd_models.egg-info/entry_points.txt
|
|
10
|
+
src/deepctl_cmd_models.egg-info/requires.txt
|
|
11
|
+
src/deepctl_cmd_models.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
deepctl_cmd_models
|