nexaai 1.0.16rc4__cp310-cp310-win_amd64.whl → 1.0.16rc6__cp310-cp310-win_amd64.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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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
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=mbzzeXrEHHI_E3BQ0_OukD9wNajKJJVk0ykxT0rz8uM,2267
2
- nexaai/_stub.cp310-win_amd64.pyd,sha256=yh4SLLuArN_dG769uu4u9KHYI8lnoDlxXTcuZ3rKKBs,10752
3
- nexaai/_version.py,sha256=iMV8fIHz9YXRh6eNlclo_PtTDLaob8igp36ISDSh8eU,147
1
+ nexaai/__init__.py,sha256=Lt8NU57eTMtWrDYzpFeYR9XtGAPXqizynP83TPU0UW0,2105
2
+ nexaai/_stub.cp310-win_amd64.pyd,sha256=2wjDGaXgE4T766huIOhXpgwxolTehLYVUrUKesDe9uk,10752
3
+ nexaai/_version.py,sha256=fBYcCI5QQ8Q8KPRrcdgYp-c-8pX9TsT_SmzIYdW-Hhc,147
4
4
  nexaai/asr.py,sha256=_fsGaxpiU137bUtO5ujtFSYCI1RLsyeEm3Gf4GhHVRk,2118
5
5
  nexaai/base.py,sha256=qQBCiQVNzgpkQjZX9aiFDEdbAAe56TROKC3WnWra2Zg,1021
6
6
  nexaai/common.py,sha256=6keIpdX5XS5us4z79EMoa6RSkVze9SbbXax13IJ9yvs,3525
@@ -8,30 +8,29 @@ nexaai/cv.py,sha256=a6-csgYNDzPziJ0EojE9-BeM_xCny4UvWWbpnJ7GL-A,3365
8
8
  nexaai/embedder.py,sha256=3a81s7JapvYxCRbWPFKp_9EWBKW7WYqF03gk87YuGKU,2524
9
9
  nexaai/image_gen.py,sha256=4iASOKxJosMznLarTvOxJQDNaas251O81bfUWJTUBfE,4496
10
10
  nexaai/llm.py,sha256=Qwm1q_NStLfD-JYZQIvxniWnAmwNl1V6LUON3Me7w_I,3663
11
- nexaai/log.py,sha256=F_Qe169kLbnFV25WJmS_ZtmBfOdcGic8BYFIsYVoD_o,2720
12
11
  nexaai/rerank.py,sha256=_zGWmX6eDigY2kViMKCtNssp4JMEeVycZZfJH9eAZOY,1927
13
- nexaai/runtime.py,sha256=_BoAtTUv5ZR7wtOlJL5TldR3AZTP0OnMWjB9p71k-8E,2135
12
+ nexaai/runtime.py,sha256=LxAUejH9uaci8IGz9_h0l-MMeYcwTlBjVKN_0u4Q4Qo,2021
14
13
  nexaai/tts.py,sha256=afs6sx0w0Tvs_aJlyZRPm62qQpTrs-fW_jDHrMkc4AA,2241
15
14
  nexaai/vlm.py,sha256=wUMbRURluxvULbS7vgyHsWdEPgLGrrC_S79bhdEN7Vg,4860
16
15
  nexaai/asr_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
16
  nexaai/asr_impl/mlx_asr_impl.py,sha256=XwMX3LYMeulp8cDS0TCCYcjvttFHAyDWQ_oMvABwQmI,3349
18
17
  nexaai/asr_impl/pybind_asr_impl.py,sha256=20o5SOPzhF9x41ra8L_qIM7YxCkYeLb5csSrNde-dds,1560
19
18
  nexaai/binds/__init__.py,sha256=ENl-uoIF9-3XGIXitVgZ2QmJ6p7Yet4h1-X7nUDZ0Hk,108
20
- nexaai/binds/common_bind.cp310-win_amd64.pyd,sha256=zyzh0YBCiMhlcbRxjB6C97JmBORAiK6FxVMXK_Aq8JA,201728
21
- nexaai/binds/embedder_bind.cp310-win_amd64.pyd,sha256=llHDrw3rwXsJiy-qqRt9ZFT77KYfnq3e17nss_GVOac,182784
22
- nexaai/binds/libcrypto-3-x64.dll,sha256=PYwJJtM4xpo2IQfxm-of6VR6rtVcHCyodwcvBHmfzig,7315968
23
- nexaai/binds/libssl-3-x64.dll,sha256=mp_RoRjYcCeAuqMy3QDYvxQ-cjAMUNCuwA320oXVVpg,1313792
24
- nexaai/binds/llm_bind.cp310-win_amd64.pyd,sha256=S2pGxAal2zNdx5YyZLfU4kZpLUKO2q5F4U7L2o8vBso,162816
25
- nexaai/binds/nexa_bridge.dll,sha256=uRL3xY00LD4Q5fs0znhPNJpCRl9CWk5Chw7OALc_Q0E,171008
26
- nexaai/binds/vlm_bind.cp310-win_amd64.pyd,sha256=kXlijjv1jBhVzoh3cQZjc1nXHTByk0otEzE-1yC5Rtk,168960
27
- nexaai/binds/nexa_llama_cpp/ggml-base.dll,sha256=5_uN10XSFiDL0NtIl4UFU7PUnYBfvXgYt1LBlO23kvc,532480
28
- nexaai/binds/nexa_llama_cpp/ggml-cpu.dll,sha256=mSx_TKV2DjqJT6gM-toL2TfLaZe6UzkgI_uhPBuhi9I,672768
29
- nexaai/binds/nexa_llama_cpp/ggml-cuda.dll,sha256=wUVlZ2nPHJbCedbiOkzS26Wpw1XK9UguZc74HsiIHSQ,313528832
30
- nexaai/binds/nexa_llama_cpp/ggml-vulkan.dll,sha256=2bvSI5mMXroTt4srEhChKLB0Vm-ynpeNyIf55iK2J94,36627456
31
- nexaai/binds/nexa_llama_cpp/ggml.dll,sha256=XsdajL1ynPAnnSZdnc3AWeaIQd7VvoI_LhrdVadppWE,66560
32
- nexaai/binds/nexa_llama_cpp/llama.dll,sha256=c03gTppVtOJcQRfyG5V7cwsmd2i5Wni4q_oHRluNJJM,1611776
33
- nexaai/binds/nexa_llama_cpp/mtmd.dll,sha256=GVNaE44LF8Pv41HEAx6cV9L9y7-PJBgbFEr4NdMrJKc,561152
34
- nexaai/binds/nexa_llama_cpp/nexa_plugin.dll,sha256=sUbA9NAO5dyN03hchELrMpovrjSQn81t1ESIOsmhqlE,1413120
19
+ nexaai/binds/common_bind.cp310-win_amd64.pyd,sha256=BgLU-viehovXOjZejKijUglZoSkpxjQObzVjN7EywAI,201216
20
+ nexaai/binds/embedder_bind.cp310-win_amd64.pyd,sha256=9dCgEwfWzIqIWOpO7PZnZ2qbO3QZACLmJuh9TtPAbK0,182784
21
+ nexaai/binds/libcrypto-3-x64.dll,sha256=TAWcTdJrWviUingNyWaraOfz0ILUy7ybpI4VaiVHURg,7315968
22
+ nexaai/binds/libssl-3-x64.dll,sha256=ZxawOWlONNM0Neg47w4JbU8kZJldj046H1zV3LiETa0,1313792
23
+ nexaai/binds/llm_bind.cp310-win_amd64.pyd,sha256=uMMz46NI0DUPV6KzWp1Zb6n3m-2Z5wCGA8niOqL_BKI,162816
24
+ nexaai/binds/nexa_bridge.dll,sha256=76jUNHDmDz7zBLvtSYk49V8faNUE7XfF0t-P9KsRnyo,168448
25
+ nexaai/binds/vlm_bind.cp310-win_amd64.pyd,sha256=-zKAWl9DXb6ND80Av4K3UG8UEbU7K2m8LG9WkJbCBqs,168960
26
+ nexaai/binds/nexa_llama_cpp/ggml-base.dll,sha256=HLR3V1UcS__ISl8dShDrIdTp1PHKYpXLOtnKDL-2zgM,532480
27
+ nexaai/binds/nexa_llama_cpp/ggml-cpu.dll,sha256=nkFgqT2DD4DzXLllY2Yk_iuYdBmHX_8UulfAevukU9E,672768
28
+ nexaai/binds/nexa_llama_cpp/ggml-cuda.dll,sha256=CqOSutvvLfHUnScoMhrUC4TmvqYxm6zSU8YYG5KcAz0,313528832
29
+ nexaai/binds/nexa_llama_cpp/ggml-vulkan.dll,sha256=f4Q_UccjVC93YYoEjMUfMVTsGWpzdD6M8rs0oxaBhAw,36627456
30
+ nexaai/binds/nexa_llama_cpp/ggml.dll,sha256=Fa9yuu74hliWAVyXsPBKTDwgHGBMUZoBGKDqVM3ckyg,66560
31
+ nexaai/binds/nexa_llama_cpp/llama.dll,sha256=0oGHoJVZbHJurYO9bgmUxhIyLWSMW-RngQwgK6bQIz0,1611776
32
+ nexaai/binds/nexa_llama_cpp/mtmd.dll,sha256=hoXNiLI_Uu7wDe_DGA0QWoNx4F0EdYQB4rriZEZrdN8,561152
33
+ nexaai/binds/nexa_llama_cpp/nexa_plugin.dll,sha256=RFBBFGntwChhZ5m2l7HyfOkPNErnSHvKrkn2clF97hM,1405440
35
34
  nexaai/cv_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
35
  nexaai/cv_impl/mlx_cv_impl.py,sha256=QLd_8w90gtxH8kmssaDYatCTRvQNIJuUGKZNnYrmx6E,3317
37
36
  nexaai/cv_impl/pybind_cv_impl.py,sha256=aSOCAxmHrwJbEkSN6VX3Cykqlj_9RIpVrZXILul04GA,1096
@@ -60,7 +59,7 @@ nexaai/utils/quantization_utils.py,sha256=jjQaz7K4qH6TdP8Tnv5Ktb2viz8BaVBSOrb_jm
60
59
  nexaai/vlm_impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
60
  nexaai/vlm_impl/mlx_vlm_impl.py,sha256=MgqJO7OzuPd79gOZZKhSXXMNSP2eBuhhrdCX8XHn6aQ,11090
62
61
  nexaai/vlm_impl/pybind_vlm_impl.py,sha256=NuQ_Ep1TnjmGAkjJuUS0Lb6z7iPu3wroLVOx7kiAwlE,8827
63
- nexaai-1.0.16rc4.dist-info/METADATA,sha256=yuPcCbMo0AmRWbakbyqDdyIJ9hAVZmTU-iUdES7xLbA,1233
64
- nexaai-1.0.16rc4.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
65
- nexaai-1.0.16rc4.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
66
- nexaai-1.0.16rc4.dist-info/RECORD,,
62
+ nexaai-1.0.16rc6.dist-info/METADATA,sha256=K71AfkWE4VFd6U61gkVkcR_PQHysMJiojipN2-G9qrE,1233
63
+ nexaai-1.0.16rc6.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
64
+ nexaai-1.0.16rc6.dist-info/top_level.txt,sha256=LRE2YERlrZk2vfuygnSzsEeqSknnZbz3Z1MHyNmBU4w,7
65
+ 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)