offline-intelligence 0.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.
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: offline-intelligence
3
+ Version: 0.1.0
4
+ Summary: Python bindings for Offline Intelligence Library
5
+ Home-page: https://github.com/offline-intelligence/offline-intelligence
6
+ Author: Offline Intelligence Team
7
+ Author-email: team@offlineintelligence.com
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Rust
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: pybind11>=2.10.0
21
+ Dynamic: author
22
+ Dynamic: author-email
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
31
+ # Offline Intelligence Python Bindings
32
+
33
+ Python bindings for the Offline Intelligence Library - High-performance LLM inference engine with memory management capabilities.
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install offline-intelligence
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ ```python
44
+ from offline_intelligence import Config, run_server
45
+
46
+ # Configure the engine
47
+ config = Config.from_env()
48
+
49
+ # Start the server
50
+ run_server(config)
51
+ ```
52
+
53
+ ## Features
54
+
55
+ - **Core LLM Integration**: Direct access to LLM engine functionality
56
+ - **Memory Management**: Base memory operations and database access
57
+ - **Configuration**: Flexible configuration system
58
+ - **Metrics**: Performance monitoring and telemetry
59
+ - **Proxy Interface**: Stream generation and API proxy functionality
60
+
61
+ ## Architecture
62
+
63
+ This package provides bindings to the core open-source components (80%) of the Offline Intelligence system. Proprietary extensions are available separately.
64
+
65
+ ## Platform Support
66
+
67
+ - Windows (x64)
68
+ - macOS (Intel/Apple Silicon)
69
+ - Linux (x64, ARM64)
70
+
71
+ ## License
72
+
73
+ Apache 2.0
@@ -0,0 +1,43 @@
1
+ # Offline Intelligence Python Bindings
2
+
3
+ Python bindings for the Offline Intelligence Library - High-performance LLM inference engine with memory management capabilities.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install offline-intelligence
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```python
14
+ from offline_intelligence import Config, run_server
15
+
16
+ # Configure the engine
17
+ config = Config.from_env()
18
+
19
+ # Start the server
20
+ run_server(config)
21
+ ```
22
+
23
+ ## Features
24
+
25
+ - **Core LLM Integration**: Direct access to LLM engine functionality
26
+ - **Memory Management**: Base memory operations and database access
27
+ - **Configuration**: Flexible configuration system
28
+ - **Metrics**: Performance monitoring and telemetry
29
+ - **Proxy Interface**: Stream generation and API proxy functionality
30
+
31
+ ## Architecture
32
+
33
+ This package provides bindings to the core open-source components (80%) of the Offline Intelligence system. Proprietary extensions are available separately.
34
+
35
+ ## Platform Support
36
+
37
+ - Windows (x64)
38
+ - macOS (Intel/Apple Silicon)
39
+ - Linux (x64, ARM64)
40
+
41
+ ## License
42
+
43
+ Apache 2.0
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: offline-intelligence
3
+ Version: 0.1.0
4
+ Summary: Python bindings for Offline Intelligence Library
5
+ Home-page: https://github.com/offline-intelligence/offline-intelligence
6
+ Author: Offline Intelligence Team
7
+ Author-email: team@offlineintelligence.com
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Rust
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: pybind11>=2.10.0
21
+ Dynamic: author
22
+ Dynamic: author-email
23
+ Dynamic: classifier
24
+ Dynamic: description
25
+ Dynamic: description-content-type
26
+ Dynamic: home-page
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
30
+
31
+ # Offline Intelligence Python Bindings
32
+
33
+ Python bindings for the Offline Intelligence Library - High-performance LLM inference engine with memory management capabilities.
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install offline-intelligence
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ ```python
44
+ from offline_intelligence import Config, run_server
45
+
46
+ # Configure the engine
47
+ config = Config.from_env()
48
+
49
+ # Start the server
50
+ run_server(config)
51
+ ```
52
+
53
+ ## Features
54
+
55
+ - **Core LLM Integration**: Direct access to LLM engine functionality
56
+ - **Memory Management**: Base memory operations and database access
57
+ - **Configuration**: Flexible configuration system
58
+ - **Metrics**: Performance monitoring and telemetry
59
+ - **Proxy Interface**: Stream generation and API proxy functionality
60
+
61
+ ## Architecture
62
+
63
+ This package provides bindings to the core open-source components (80%) of the Offline Intelligence system. Proprietary extensions are available separately.
64
+
65
+ ## Platform Support
66
+
67
+ - Windows (x64)
68
+ - macOS (Intel/Apple Silicon)
69
+ - Linux (x64, ARM64)
70
+
71
+ ## License
72
+
73
+ Apache 2.0
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ offline_intelligence.egg-info/PKG-INFO
4
+ offline_intelligence.egg-info/SOURCES.txt
5
+ offline_intelligence.egg-info/dependency_links.txt
6
+ offline_intelligence.egg-info/not-zip-safe
7
+ offline_intelligence.egg-info/requires.txt
8
+ offline_intelligence.egg-info/top_level.txt
9
+ src/main.cpp
@@ -0,0 +1 @@
1
+ offline_intelligence_py
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,45 @@
1
+ from setuptools import setup, find_packages
2
+ from pybind11.setup_helpers import Pybind11Extension, build_ext
3
+ import os
4
+
5
+ # Define the extension module
6
+ ext_modules = [
7
+ Pybind11Extension(
8
+ "offline_intelligence_py",
9
+ ["src/main.cpp"],
10
+ include_dirs=["../../crates/offline-intelligence/src"],
11
+ cxx_std=17,
12
+ define_macros=[("VERSION_INFO", "0.1.0")],
13
+ ),
14
+ ]
15
+
16
+ setup(
17
+ name="offline-intelligence",
18
+ version="0.1.0",
19
+ author="Offline Intelligence Team",
20
+ author_email="team@offlineintelligence.com",
21
+ description="Python bindings for Offline Intelligence Library",
22
+ long_description=open("README.md").read(),
23
+ long_description_content_type="text/markdown",
24
+ url="https://github.com/offline-intelligence/offline-intelligence",
25
+ packages=find_packages(),
26
+ ext_modules=ext_modules,
27
+ cmdclass={"build_ext": build_ext},
28
+ zip_safe=False,
29
+ python_requires=">=3.8",
30
+ install_requires=[
31
+ "pybind11>=2.10.0",
32
+ ],
33
+ classifiers=[
34
+ "Development Status :: 4 - Beta",
35
+ "Intended Audience :: Developers",
36
+ "License :: OSI Approved :: Apache Software License",
37
+ "Operating System :: OS Independent",
38
+ "Programming Language :: Python :: 3",
39
+ "Programming Language :: Python :: 3.8",
40
+ "Programming Language :: Python :: 3.9",
41
+ "Programming Language :: Python :: 3.10",
42
+ "Programming Language :: Python :: 3.11",
43
+ "Programming Language :: Rust",
44
+ ],
45
+ )
@@ -0,0 +1,104 @@
1
+ #include <pybind11/pybind11.h>
2
+ #include <pybind11/stl.h>
3
+ #include <pybind11/functional.h>
4
+ #include <string>
5
+ #include <vector>
6
+ #include <memory>
7
+
8
+ // Forward declarations for the Rust library interface
9
+ namespace offline_intelligence {
10
+ struct Config {
11
+ std::string model_path;
12
+ std::string llama_bin;
13
+ std::string llama_host;
14
+ uint16_t llama_port;
15
+ uint32_t ctx_size;
16
+ uint32_t batch_size;
17
+ uint32_t threads;
18
+ uint32_t gpu_layers;
19
+ uint64_t health_timeout_seconds;
20
+ uint64_t hot_swap_grace_seconds;
21
+ uint32_t max_concurrent_streams;
22
+ uint16_t prometheus_port;
23
+ std::string api_host;
24
+ uint16_t api_port;
25
+ uint32_t requests_per_second;
26
+ uint64_t generate_timeout_seconds;
27
+ uint64_t stream_timeout_seconds;
28
+ uint64_t health_check_timeout_seconds;
29
+ size_t queue_size;
30
+ uint64_t queue_timeout_seconds;
31
+ };
32
+
33
+ // Mock implementation - would call into actual Rust library
34
+ Config Config_from_env() {
35
+ Config cfg;
36
+ cfg.model_path = "default.gguf";
37
+ cfg.llama_bin = "llama-server";
38
+ cfg.llama_host = "127.0.0.1";
39
+ cfg.llama_port = 8081;
40
+ cfg.ctx_size = 8192;
41
+ cfg.batch_size = 256;
42
+ cfg.threads = 6;
43
+ cfg.gpu_layers = 20;
44
+ cfg.health_timeout_seconds = 60;
45
+ cfg.hot_swap_grace_seconds = 25;
46
+ cfg.max_concurrent_streams = 4;
47
+ cfg.prometheus_port = 9000;
48
+ cfg.api_host = "127.0.0.1";
49
+ cfg.api_port = 8000;
50
+ cfg.requests_per_second = 24;
51
+ cfg.generate_timeout_seconds = 300;
52
+ cfg.stream_timeout_seconds = 600;
53
+ cfg.health_check_timeout_seconds = 90;
54
+ cfg.queue_size = 100;
55
+ cfg.queue_timeout_seconds = 30;
56
+ return cfg;
57
+ }
58
+
59
+ bool run_server(const Config& cfg) {
60
+ // Mock implementation - would call actual Rust server
61
+ printf("Starting Offline Intelligence server...\n");
62
+ printf("API Server: %s:%d\n", cfg.api_host.c_str(), cfg.api_port);
63
+ printf("LLM Backend: %s:%d\n", cfg.llama_host.c_str(), cfg.llama_port);
64
+ return true;
65
+ }
66
+ }
67
+
68
+ namespace py = pybind11;
69
+
70
+ PYBIND11_MODULE(offline_intelligence_py, m) {
71
+ m.doc() = "Offline Intelligence Python Bindings";
72
+
73
+ py::class_<offline_intelligence::Config>(m, "Config")
74
+ .def(py::init<>())
75
+ .def_readwrite("model_path", &offline_intelligence::Config::model_path)
76
+ .def_readwrite("llama_bin", &offline_intelligence::Config::llama_bin)
77
+ .def_readwrite("llama_host", &offline_intelligence::Config::llama_host)
78
+ .def_readwrite("llama_port", &offline_intelligence::Config::llama_port)
79
+ .def_readwrite("ctx_size", &offline_intelligence::Config::ctx_size)
80
+ .def_readwrite("batch_size", &offline_intelligence::Config::batch_size)
81
+ .def_readwrite("threads", &offline_intelligence::Config::threads)
82
+ .def_readwrite("gpu_layers", &offline_intelligence::Config::gpu_layers)
83
+ .def_readwrite("health_timeout_seconds", &offline_intelligence::Config::health_timeout_seconds)
84
+ .def_readwrite("hot_swap_grace_seconds", &offline_intelligence::Config::hot_swap_grace_seconds)
85
+ .def_readwrite("max_concurrent_streams", &offline_intelligence::Config::max_concurrent_streams)
86
+ .def_readwrite("prometheus_port", &offline_intelligence::Config::prometheus_port)
87
+ .def_readwrite("api_host", &offline_intelligence::Config::api_host)
88
+ .def_readwrite("api_port", &offline_intelligence::Config::api_port)
89
+ .def_readwrite("requests_per_second", &offline_intelligence::Config::requests_per_second)
90
+ .def_readwrite("generate_timeout_seconds", &offline_intelligence::Config::generate_timeout_seconds)
91
+ .def_readwrite("stream_timeout_seconds", &offline_intelligence::Config::stream_timeout_seconds)
92
+ .def_readwrite("health_check_timeout_seconds", &offline_intelligence::Config::health_check_timeout_seconds)
93
+ .def_readwrite("queue_size", &offline_intelligence::Config::queue_size)
94
+ .def_readwrite("queue_timeout_seconds", &offline_intelligence::Config::queue_timeout_seconds)
95
+ .def_static("from_env", &offline_intelligence::Config_from_env,
96
+ "Create configuration from environment variables");
97
+
98
+ m.def("run_server", &offline_intelligence::run_server,
99
+ "Start the Offline Intelligence server",
100
+ py::arg("config"));
101
+
102
+ m.def("version", []() { return "0.1.0"; },
103
+ "Get library version");
104
+ }