kopitools 2.0.0__tar.gz → 2.1.0__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.
Potentially problematic release.
This version of kopitools might be problematic. Click here for more details.
- {kopitools-2.0.0 → kopitools-2.1.0}/PKG-INFO +1 -1
- {kopitools-2.0.0 → kopitools-2.1.0}/pyproject.toml +1 -1
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/logs/logs.py +15 -0
- kopitools-2.1.0/tests/tests.py +4 -0
- kopitools-2.0.0/tests/tests.py +0 -67
- {kopitools-2.0.0 → kopitools-2.1.0}/README.md +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/__init__.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/args/__init__.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/args/exceptions.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/args/option.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/args/registry.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/logs/__init__.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/paint/__init__.py +0 -0
- {kopitools-2.0.0 → kopitools-2.1.0}/src/kopitools/paint/paint.py +0 -0
|
@@ -84,5 +84,20 @@ class Log:
|
|
|
84
84
|
paint(*self.args)
|
|
85
85
|
).show()
|
|
86
86
|
|
|
87
|
+
def info(self):
|
|
88
|
+
icon = "INFO" if Log.text else "^"
|
|
89
|
+
|
|
90
|
+
flag = paint(
|
|
91
|
+
paint("[").bold(),
|
|
92
|
+
paint(icon).bold().blue(),
|
|
93
|
+
paint("]").bold(),
|
|
94
|
+
sep=""
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
paint(
|
|
98
|
+
paint(flag).bold(),
|
|
99
|
+
paint(*self.args)
|
|
100
|
+
).show()
|
|
101
|
+
|
|
87
102
|
def log(*args: Any) -> Log:
|
|
88
103
|
return Log(args)
|
kopitools-2.0.0/tests/tests.py
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
from kopitools.args import (
|
|
2
|
-
Registry, Args,
|
|
3
|
-
EntryPointNotFoundError, ArgError
|
|
4
|
-
)
|
|
5
|
-
import sys
|
|
6
|
-
|
|
7
|
-
def get_voice_options() -> Args | None:
|
|
8
|
-
try:
|
|
9
|
-
voice = Registry(sys.argv, "voice")
|
|
10
|
-
except EntryPointNotFoundError:
|
|
11
|
-
return None
|
|
12
|
-
|
|
13
|
-
return voice.collect()
|
|
14
|
-
|
|
15
|
-
def get_chat_options() -> Args | None:
|
|
16
|
-
try:
|
|
17
|
-
chat = Registry(sys.argv, "chat")
|
|
18
|
-
except EntryPointNotFoundError:
|
|
19
|
-
return None
|
|
20
|
-
|
|
21
|
-
chat.option(
|
|
22
|
-
"--flush",
|
|
23
|
-
receives=None,
|
|
24
|
-
default=False,
|
|
25
|
-
attribute="flush",
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
return chat.collect()
|
|
29
|
-
|
|
30
|
-
def get_main_options() -> Args:
|
|
31
|
-
main = Registry(sys.argv)
|
|
32
|
-
|
|
33
|
-
main.option(
|
|
34
|
-
"--llm-model",
|
|
35
|
-
receives=str,
|
|
36
|
-
default="gemma4",
|
|
37
|
-
attribute="llm_model"
|
|
38
|
-
)
|
|
39
|
-
main.option(
|
|
40
|
-
"--num-ctx",
|
|
41
|
-
receives=int,
|
|
42
|
-
default=8192,
|
|
43
|
-
attribute="num_ctx",
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
return main.collect()
|
|
47
|
-
|
|
48
|
-
main = get_main_options()
|
|
49
|
-
chat, voice = get_chat_options(), get_voice_options()
|
|
50
|
-
action = None
|
|
51
|
-
|
|
52
|
-
if chat is not None and voice is not None:
|
|
53
|
-
print("You can only choose one action!")
|
|
54
|
-
sys.exit(1)
|
|
55
|
-
|
|
56
|
-
elif chat is None and not voice is None:
|
|
57
|
-
print("You gotta choose an action!")
|
|
58
|
-
sys.exit(1)
|
|
59
|
-
|
|
60
|
-
action = chat if chat is not None else voice
|
|
61
|
-
|
|
62
|
-
if action is None:
|
|
63
|
-
sys.exit(1)
|
|
64
|
-
|
|
65
|
-
print(main._args)
|
|
66
|
-
print("=" * 50)
|
|
67
|
-
print(action._args)
|
|
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
|