nexaai 1.0.16rc4__cp310-cp310-macosx_13_0_x86_64.whl → 1.0.16rc6__cp310-cp310-macosx_13_0_x86_64.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.
Potentially problematic release.
This version of nexaai might be problematic. Click here for more details.
- nexaai/__init__.py +0 -7
- nexaai/_stub.cpython-310-darwin.so +0 -0
- nexaai/_version.py +1 -1
- nexaai/binds/common_bind.cpython-310-darwin.so +0 -0
- nexaai/binds/libnexa_bridge.dylib +0 -0
- nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib +0 -0
- nexaai/runtime.py +0 -4
- {nexaai-1.0.16rc4.dist-info → nexaai-1.0.16rc6.dist-info}/METADATA +1 -1
- {nexaai-1.0.16rc4.dist-info → nexaai-1.0.16rc6.dist-info}/RECORD +11 -12
- nexaai/log.py +0 -92
- {nexaai-1.0.16rc4.dist-info → nexaai-1.0.16rc6.dist-info}/WHEEL +0 -0
- {nexaai-1.0.16rc4.dist-info → nexaai-1.0.16rc6.dist-info}/top_level.txt +0 -0
nexaai/__init__.py
CHANGED
|
@@ -21,9 +21,6 @@ except ImportError:
|
|
|
21
21
|
# Import common configuration classes first (no external dependencies)
|
|
22
22
|
from .common import ModelConfig, GenerationConfig, ChatMessage, SamplerConfig, PluginID
|
|
23
23
|
|
|
24
|
-
# Import logging functionality
|
|
25
|
-
from .log import set_logger, get_error_message
|
|
26
|
-
|
|
27
24
|
# Create alias for PluginID to be accessible as plugin_id
|
|
28
25
|
plugin_id = PluginID
|
|
29
26
|
|
|
@@ -48,10 +45,6 @@ __all__ = [
|
|
|
48
45
|
"EmbeddingConfig",
|
|
49
46
|
"PluginID",
|
|
50
47
|
"plugin_id",
|
|
51
|
-
|
|
52
|
-
# Logging functionality
|
|
53
|
-
"set_logger",
|
|
54
|
-
"get_error_message",
|
|
55
48
|
|
|
56
49
|
"LLM",
|
|
57
50
|
"Embedder",
|
|
Binary file
|
nexaai/_version.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
nexaai/runtime.py
CHANGED
|
@@ -28,10 +28,6 @@ def _shutdown_runtime() -> None:
|
|
|
28
28
|
# Public helper so advanced users can reclaim memory on demand
|
|
29
29
|
shutdown = _shutdown_runtime
|
|
30
30
|
|
|
31
|
-
def is_initialized() -> bool:
|
|
32
|
-
"""Check if the runtime has been initialized."""
|
|
33
|
-
return _runtime_alive
|
|
34
|
-
|
|
35
31
|
# ----------------------------------------------------------------------
|
|
36
32
|
# Single public class
|
|
37
33
|
# ----------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
nexaai/__init__.py,sha256=
|
|
2
|
-
nexaai/_stub.cpython-310-darwin.so,sha256=
|
|
3
|
-
nexaai/_version.py,sha256=
|
|
1
|
+
nexaai/__init__.py,sha256=jXdC4vv6DBK1fVewYTYSUhOOYfvf_Mk81UIeMGGIKUg,2029
|
|
2
|
+
nexaai/_stub.cpython-310-darwin.so,sha256=_Ansk9eNZjbIfz2xVDjM56Q1R5_bdn_TYLLM90qz8iA,49832
|
|
3
|
+
nexaai/_version.py,sha256=q_ltDPU31V31mBm1-Ibzmw4FJrMLWkF7b0McCxt6b_w,143
|
|
4
4
|
nexaai/asr.py,sha256=NljMXDErwPNMOPaRkJZMEDka9Nk8xyur7L8i924TStY,2054
|
|
5
5
|
nexaai/base.py,sha256=N8PRgDFA-XPku2vWnQIofQ7ipz3pPlO6f8YZGnuhquE,982
|
|
6
6
|
nexaai/common.py,sha256=yBnIbqYaQYnfrl7IczOBh6MDibYZVxwaRJEglYcKgGs,3422
|
|
@@ -8,18 +8,17 @@ nexaai/cv.py,sha256=RHCDo8gvBH8BkGZx7qVyp-OKxqi7E1GG9XzyaXehCNA,3273
|
|
|
8
8
|
nexaai/embedder.py,sha256=Cw0tSHkPgd-RI62afCqQAcTHMnQhaI2CvfTMO-1JKOg,2452
|
|
9
9
|
nexaai/image_gen.py,sha256=0C_5Tjj4BYmxLbmMmvwajp-yy2mmEEOKwBFnDQNPzx4,4356
|
|
10
10
|
nexaai/llm.py,sha256=S1o_k2VQoF5w2wO25f142OO1R75TP89Ii69VZv8pIGo,3567
|
|
11
|
-
nexaai/log.py,sha256=Kwo2CIfWN6iP4M4F5EUIV8KIO5hAsvz6HZAaOwJ27Og,2628
|
|
12
11
|
nexaai/rerank.py,sha256=vWaBucoQ1wz-2iYnZqyFIcEjm-4Xcs1KDbFN5X8zzDQ,1872
|
|
13
|
-
nexaai/runtime.py,sha256=
|
|
12
|
+
nexaai/runtime.py,sha256=mxxHYsb5iBUAm2K_u-XJWr_U-spJ9S4eApc8kf9myjw,1957
|
|
14
13
|
nexaai/tts.py,sha256=ZnBpWUxIfHhh7KfEjddtH7hHOTa91zg7ogGLakMIALo,2167
|
|
15
14
|
nexaai/vlm.py,sha256=OCxwML-Z5uVGp3fjzJVtbCxfTLpgxkhQ8Wo6MVysoiw,4733
|
|
16
15
|
nexaai/asr_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
16
|
nexaai/asr_impl/mlx_asr_impl.py,sha256=eosd8-TIWAOwV0HltmoFrLwzXHcU4jyxtncvuZE9pgA,3257
|
|
18
17
|
nexaai/asr_impl/pybind_asr_impl.py,sha256=pE9Hb_hMi5yAc4MF83bLVOb8zDtreCkB3_u7XED9YpA,1516
|
|
19
18
|
nexaai/binds/__init__.py,sha256=eYuay_8DDXeOUWz2_R9HFSabohxs6hvZn391t2L0Po0,104
|
|
20
|
-
nexaai/binds/common_bind.cpython-310-darwin.so,sha256=
|
|
19
|
+
nexaai/binds/common_bind.cpython-310-darwin.so,sha256=KX_nfaQQPzxGv0GS0efcO-ByWai7y7RskMZvSAAaJWI,233960
|
|
21
20
|
nexaai/binds/embedder_bind.cpython-310-darwin.so,sha256=b2NoXFAJvPLi_P1X7lXLKmAUU0v2HJI3Zwa10gfqHdw,202032
|
|
22
|
-
nexaai/binds/libnexa_bridge.dylib,sha256=
|
|
21
|
+
nexaai/binds/libnexa_bridge.dylib,sha256=jQ0olfZmLwde8V2j579-nNzNNmjAihw7J1NuM1t8Hgc,250376
|
|
23
22
|
nexaai/binds/llm_bind.cpython-310-darwin.so,sha256=aKcT2kW1PL1xPFX7vsT6Gs79ZydcVfg8bKtnEthRpI4,183008
|
|
24
23
|
nexaai/binds/vlm_bind.cpython-310-darwin.so,sha256=LGd-tykePnQFfGca25HnPIBfXsfrMzbwyx6d5Ld3xps,183000
|
|
25
24
|
nexaai/binds/nexa_llama_cpp/libggml-base.dylib,sha256=GyOkHOM-5uHp7NUZ4Sr9BWak6BYpcc9aqI9A-zPnQp4,629528
|
|
@@ -28,7 +27,7 @@ nexaai/binds/nexa_llama_cpp/libggml-metal.so,sha256=Xhhl_tLg1xmCIQVrKjqPFaLHAlx_
|
|
|
28
27
|
nexaai/binds/nexa_llama_cpp/libggml.dylib,sha256=12Q1Z98oM81hxzT_GMQsW5rlhC8DOMsX6luWVCFQHcI,58336
|
|
29
28
|
nexaai/binds/nexa_llama_cpp/libllama.dylib,sha256=ORoTILXdGGX6MLMh-IWLIp4P5UEPOjE4lvWOKM18pCk,1982280
|
|
30
29
|
nexaai/binds/nexa_llama_cpp/libmtmd.dylib,sha256=1plWvthTQf8IXbXthMG0MZXzWhbzV6ghdVzVFIb1FnU,701504
|
|
31
|
-
nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib,sha256=
|
|
30
|
+
nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib,sha256=1fhFzoJzs4lKjVLn7qPu_n2awlAFlw3iFEog8Lpaz2c,2025496
|
|
32
31
|
nexaai/cv_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
32
|
nexaai/cv_impl/mlx_cv_impl.py,sha256=gKECQOv8iaWwG3bl7xeqVy2NN_9K7tYerIFzfn4eLo4,3228
|
|
34
33
|
nexaai/cv_impl/pybind_cv_impl.py,sha256=uSmwBste4cT7c8DQmXzRLmzwDf773PAbXNYWW1UzVls,1064
|
|
@@ -376,7 +375,7 @@ nexaai/utils/quantization_utils.py,sha256=4gvp6UQfSO9G1FYBwnFtQspTzH9sDbi1PBXw2t
|
|
|
376
375
|
nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
377
376
|
nexaai/vlm_impl/mlx_vlm_impl.py,sha256=pLtWm_ckz8a0U-AtAOMVseFDO4OVPvHyYO2KlfBaGYk,10833
|
|
378
377
|
nexaai/vlm_impl/pybind_vlm_impl.py,sha256=FAbhpRJzHgI78r0mUvKybO97R1szvNhH0aTn_I52oT4,8597
|
|
379
|
-
nexaai-1.0.
|
|
380
|
-
nexaai-1.0.
|
|
381
|
-
nexaai-1.0.
|
|
382
|
-
nexaai-1.0.
|
|
378
|
+
nexaai-1.0.16rc6.dist-info/METADATA,sha256=68gp5xDTDq1CQO45j3MIG58yhuJrSJW5WlTau2Gig3A,1201
|
|
379
|
+
nexaai-1.0.16rc6.dist-info/WHEEL,sha256=0KYp5feZ1CMUhsfFXKpSQTbSmQbXy4mv6yPPVBXg2EM,110
|
|
380
|
+
nexaai-1.0.16rc6.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
|
|
381
|
+
nexaai-1.0.16rc6.dist-info/RECORD,,
|
nexaai/log.py
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Logging configuration for NexaAI bridge.
|
|
3
|
-
|
|
4
|
-
This module provides a minimal API to configure bridge-wide logging
|
|
5
|
-
to route into Python's logging system.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
import logging
|
|
9
|
-
import threading
|
|
10
|
-
from enum import IntEnum
|
|
11
|
-
from typing import Optional
|
|
12
|
-
|
|
13
|
-
from nexaai.binds import common_bind
|
|
14
|
-
from nexaai.runtime import is_initialized
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class LogLevel(IntEnum):
|
|
18
|
-
"""Log levels matching ml_LogLevel from ml.h"""
|
|
19
|
-
TRACE = 0
|
|
20
|
-
DEBUG = 1
|
|
21
|
-
INFO = 2
|
|
22
|
-
WARN = 3
|
|
23
|
-
ERROR = 4
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# Module-level state
|
|
27
|
-
_config_lock = threading.Lock()
|
|
28
|
-
_current_logger: Optional[logging.Logger] = None
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def set_logger(logger: Optional[logging.Logger] = None, *, strict: bool = True) -> None:
|
|
32
|
-
"""
|
|
33
|
-
Set the process-wide bridge logger.
|
|
34
|
-
|
|
35
|
-
Args:
|
|
36
|
-
logger: Python logger to receive bridge logs. If None, uses "nexaai.ml" logger.
|
|
37
|
-
strict: If True, raises if called after runtime initialization.
|
|
38
|
-
If False, attempts to set anyway (best-effort).
|
|
39
|
-
|
|
40
|
-
Raises:
|
|
41
|
-
RuntimeError: If strict=True and runtime is already initialized.
|
|
42
|
-
"""
|
|
43
|
-
global _current_logger
|
|
44
|
-
|
|
45
|
-
with _config_lock:
|
|
46
|
-
# Check initialization state if strict mode
|
|
47
|
-
if strict and is_initialized():
|
|
48
|
-
raise RuntimeError(
|
|
49
|
-
"Cannot configure logging after runtime initialization. "
|
|
50
|
-
"Call set_logger() before creating any models, or use strict=False for best-effort."
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
# Use default logger if none provided
|
|
54
|
-
if logger is None:
|
|
55
|
-
logger = logging.getLogger("nexaai.ml")
|
|
56
|
-
|
|
57
|
-
_current_logger = logger
|
|
58
|
-
|
|
59
|
-
# Set the C callback
|
|
60
|
-
common_bind.ml_set_log(_log_callback)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _log_callback(level: int, message: str) -> None:
|
|
64
|
-
"""Internal callback that forwards bridge logs to Python logger."""
|
|
65
|
-
if _current_logger is None:
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
# Map bridge log levels to Python logging levels
|
|
69
|
-
if level == LogLevel.TRACE or level == LogLevel.DEBUG:
|
|
70
|
-
_current_logger.debug(message)
|
|
71
|
-
elif level == LogLevel.INFO:
|
|
72
|
-
_current_logger.info(message)
|
|
73
|
-
elif level == LogLevel.WARN:
|
|
74
|
-
_current_logger.warning(message)
|
|
75
|
-
elif level == LogLevel.ERROR:
|
|
76
|
-
_current_logger.error(message)
|
|
77
|
-
else:
|
|
78
|
-
# Fallback for unknown levels
|
|
79
|
-
_current_logger.info(f"[Level {level}] {message}")
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def get_error_message(error_code: int) -> str:
|
|
83
|
-
"""
|
|
84
|
-
Get error message string for error code.
|
|
85
|
-
|
|
86
|
-
Args:
|
|
87
|
-
error_code: ML error code (typically negative)
|
|
88
|
-
|
|
89
|
-
Returns:
|
|
90
|
-
Human-readable error message
|
|
91
|
-
"""
|
|
92
|
-
return common_bind.ml_get_error_message(error_code)
|
|
File without changes
|
|
File without changes
|