nexaai 1.0.16rc4__cp310-cp310-macosx_14_0_universal2.whl → 1.0.16rc6__cp310-cp310-macosx_14_0_universal2.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 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
@@ -1,4 +1,4 @@
1
1
  # This file is generated by CMake from _version.py.in
2
2
  # Do not modify this file manually - it will be overwritten
3
3
 
4
- __version__ = "1.0.16-rc4"
4
+ __version__ = "1.0.16-rc6"
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
1
  Metadata-Version: 2.4
2
2
  Name: nexaai
3
- Version: 1.0.16rc4
3
+ Version: 1.0.16rc6
4
4
  Summary: Python bindings for NexaSDK C-lib backend
5
5
  Author-email: "Nexa AI, Inc." <dev@nexa.ai>
6
6
  Project-URL: Homepage, https://github.com/NexaAI/nexasdk-bridge
@@ -1,6 +1,6 @@
1
- nexaai/__init__.py,sha256=L8oB7GFZZMGnUpCg0PecDbI_ycKuQak-ZEJ4Y12_QIw,2184
2
- nexaai/_stub.cpython-310-darwin.so,sha256=BVNFB5s54ZB0RM8eRQNbzIfYvD3MOEdK5PA7JwDHHmo,66768
3
- nexaai/_version.py,sha256=lUoT24kfbR6cZj678eZ51hzMn4kQIfuN31QUH8iaMjw,143
1
+ nexaai/__init__.py,sha256=jXdC4vv6DBK1fVewYTYSUhOOYfvf_Mk81UIeMGGIKUg,2029
2
+ nexaai/_stub.cpython-310-darwin.so,sha256=cF3DBVnjm3ZM8YJISqpAmT9ZFl-5D_0N6jTZoMunE4U,66768
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=JvllhlNPgYGLbgGyX2yNvmGzT0lZ5XbvTvEo8sZG_Ho,2067
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=P7uoWSqFgSoAXaVLdna2fu_bIe7y6wmV-BvOT4XiIw4,217312
19
+ nexaai/binds/common_bind.cpython-310-darwin.so,sha256=hVxY76tn7hN6uHDIgM7LWNvgoudHgNZVoaygM9X1RWE,217232
21
20
  nexaai/binds/embedder_bind.cpython-310-darwin.so,sha256=tPa0c0Dv_GiW66fgmAGWGCHXRGNApznqoQS0eQx9GFM,202064
22
- nexaai/binds/libnexa_bridge.dylib,sha256=O4lVj2HD5aJSOiKRNAzYfyVzPANlrVLEcbz0H1vU7NA,251192
21
+ nexaai/binds/libnexa_bridge.dylib,sha256=OgVZoTmDh_ympOZbuMoHpCFqgo5QHXpzJwwXUuW-v2Q,251144
23
22
  nexaai/binds/llm_bind.cpython-310-darwin.so,sha256=6vRO5eOsL6s-hCKdz6onIjBKR_wcpCIsXHtUJY9vJBI,182704
24
23
  nexaai/binds/vlm_bind.cpython-310-darwin.so,sha256=nd6eG_m2EiPthzkSZ97hlXWUOZQir4cQfFJZ4p6eR2U,182704
25
24
  nexaai/binds/nexa_llama_cpp/libggml-base.dylib,sha256=JM4oOkie1su0ES5hMdtILeQHlRukRzH1vTleTupUXhg,650736
@@ -28,7 +27,7 @@ nexaai/binds/nexa_llama_cpp/libggml-metal.so,sha256=zfaX7rIBYQazH2lf-vza007BMhPT
28
27
  nexaai/binds/nexa_llama_cpp/libggml.dylib,sha256=aOTj_6RrAMkfDO0ZI28_3nfcC-l4Y3dRCiS3C0d0_eI,58592
29
28
  nexaai/binds/nexa_llama_cpp/libllama.dylib,sha256=RkBd5usb8RvEIOamvxCW3UvMauI5bC66G_n6hw83NpY,1786128
30
29
  nexaai/binds/nexa_llama_cpp/libmtmd.dylib,sha256=o6mQqefzQNF0CS4j6odwJKj0gkXm15hIxwlNt88FOn4,605248
31
- nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib,sha256=f-ctmVHSL5x1LKLr0StYM5WscvUW_5olJ7al3ciVmmQ,1863000
30
+ nexaai/binds/nexa_llama_cpp/libnexa_plugin.dylib,sha256=4rTxwHGSVUfGnvA6laPpLztMMFooy-inG2798HXqKPY,1862104
32
31
  nexaai/binds/nexa_mlx/libnexa_plugin.dylib,sha256=pSLYF-LN-s6ZaJomznSY8G6cNeKNwnsE2gZAaLfUdTw,598328
33
32
  nexaai/binds/nexa_mlx/py-lib/ml.py,sha256=LafDM_TeXmuQkld2tdQxUBGgooT0JPMXngLam2TADqU,23179
34
33
  nexaai/binds/nexa_mlx/py-lib/profiling.py,sha256=Dc-mybFwBdCIKFWL7CbSHjkOJGAoYHG7r_e_XPhzwBU,9361
@@ -529,7 +528,7 @@ nexaai/utils/quantization_utils.py,sha256=4gvp6UQfSO9G1FYBwnFtQspTzH9sDbi1PBXw2t
529
528
  nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
530
529
  nexaai/vlm_impl/mlx_vlm_impl.py,sha256=pLtWm_ckz8a0U-AtAOMVseFDO4OVPvHyYO2KlfBaGYk,10833
531
530
  nexaai/vlm_impl/pybind_vlm_impl.py,sha256=FAbhpRJzHgI78r0mUvKybO97R1szvNhH0aTn_I52oT4,8597
532
- nexaai-1.0.16rc4.dist-info/METADATA,sha256=bwpNrOsmL9WN2r5P9Ms5Ozr-Amfvs1heSnCI4vD1WE4,1201
533
- nexaai-1.0.16rc4.dist-info/WHEEL,sha256=T2p57lol9__xkoU6aJTyN1Pm43ZpRU3q6km7mIbrAMs,114
534
- nexaai-1.0.16rc4.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
535
- nexaai-1.0.16rc4.dist-info/RECORD,,
531
+ nexaai-1.0.16rc6.dist-info/METADATA,sha256=68gp5xDTDq1CQO45j3MIG58yhuJrSJW5WlTau2Gig3A,1201
532
+ nexaai-1.0.16rc6.dist-info/WHEEL,sha256=T2p57lol9__xkoU6aJTyN1Pm43ZpRU3q6km7mIbrAMs,114
533
+ nexaai-1.0.16rc6.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
534
+ 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)