neuralnode 2.0.1__tar.gz → 2.0.2__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.
- neuralnode-2.0.2/.env.example +22 -0
- neuralnode-2.0.2/.github/workflows/tests.yml +62 -0
- neuralnode-2.0.2/Dockerfile +44 -0
- neuralnode-2.0.2/LICENSE +21 -0
- neuralnode-2.0.2/PKG-INFO +383 -0
- neuralnode-2.0.2/README.md +217 -0
- neuralnode-2.0.2/docker-compose.yml +75 -0
- neuralnode-2.0.2/docs/documentation.md +242 -0
- neuralnode-2.0.2/docs/ecosystem_plan.md +482 -0
- neuralnode-2.0.2/docs/replica_voice_ids.csv +21 -0
- neuralnode-2.0.2/docs/replica_voice_ids.md +41 -0
- neuralnode-2.0.2/docs/telegram_guide.md +125 -0
- neuralnode-2.0.2/examples/agent_with_tools.py +82 -0
- neuralnode-2.0.2/examples/basic_chat.py +36 -0
- neuralnode-2.0.2/examples/horus_codes_camples/01_basic_usage.py +21 -0
- neuralnode-2.0.2/examples/horus_codes_camples/02_with_token.py +19 -0
- neuralnode-2.0.2/examples/horus_codes_camples/03_one_liner.py +17 -0
- neuralnode-2.0.2/examples/horus_codes_camples/04_custom_cache.py +15 -0
- neuralnode-2.0.2/examples/horus_codes_camples/05_4bit_quantization.py +20 -0
- neuralnode-2.0.2/examples/horus_codes_camples/06_8bit_quantization.py +17 -0
- neuralnode-2.0.2/examples/horus_codes_camples/07_multi_gpu.py +15 -0
- neuralnode-2.0.2/examples/horus_codes_camples/08_flash_attention.py +16 -0
- neuralnode-2.0.2/examples/horus_codes_camples/09_data_types.py +26 -0
- neuralnode-2.0.2/examples/horus_codes_camples/10_generation_params.py +34 -0
- neuralnode-2.0.2/examples/horus_codes_camples/11_streaming.py +13 -0
- neuralnode-2.0.2/examples/horus_codes_camples/12_chat_templates.py +22 -0
- neuralnode-2.0.2/examples/horus_codes_camples/13_offline_mode.py +14 -0
- neuralnode-2.0.2/examples/horus_codes_camples/14_force_download.py +14 -0
- neuralnode-2.0.2/examples/horus_codes_camples/15_model_info.py +24 -0
- neuralnode-2.0.2/examples/horus_codes_camples/16_cpu_offloading.py +17 -0
- neuralnode-2.0.2/examples/horus_codes_camples/17_cpu_only.py +16 -0
- neuralnode-2.0.2/examples/horus_codes_camples/18_production_setup.py +43 -0
- neuralnode-2.0.2/examples/horus_codes_camples/19_gguf_4bit.py +14 -0
- neuralnode-2.0.2/examples/horus_codes_camples/20_gguf_5bit.py +13 -0
- neuralnode-2.0.2/examples/horus_codes_camples/21_gguf_6bit.py +13 -0
- neuralnode-2.0.2/examples/horus_codes_camples/22_gguf_8bit.py +13 -0
- neuralnode-2.0.2/examples/horus_codes_camples/23_gguf_16bit.py +14 -0
- neuralnode-2.0.2/examples/horus_codes_camples/24_list_models.py +26 -0
- neuralnode-2.0.2/examples/horus_codes_camples/25_interactive_chat.py +53 -0
- neuralnode-2.0.2/examples/horus_codes_camples/README.md +66 -0
- neuralnode-2.0.2/examples/horus_download_guide.py +233 -0
- neuralnode-2.0.2/examples/horus_examples.py +257 -0
- neuralnode-2.0.2/examples/horus_transformers_features.py +521 -0
- neuralnode-2.0.2/examples/local_models.py +107 -0
- neuralnode-2.0.2/examples/neuralnode_v21_complete_demo.py +21 -0
- neuralnode-2.0.2/examples/shade_model_with_tools.py +23 -0
- neuralnode-2.0.2/examples/telegram_bot_demo.py +37 -0
- neuralnode-2.0.2/examples/thinking_mode_example.py +232 -0
- neuralnode-2.0.2/examples/tts_demo.py +26 -0
- neuralnode-2.0.2/examples/turboquant_example.py +38 -0
- neuralnode-2.0.2/examples/v3_features.py +35 -0
- neuralnode-2.0.2/nn.md +224 -0
- neuralnode-2.0.2/publish.bat +63 -0
- neuralnode-2.0.2/publish.sh +66 -0
- neuralnode-2.0.2/pyproject.toml +221 -0
- neuralnode-2.0.2/requirements_shade.txt +40 -0
- neuralnode-2.0.2/scripts/setup.py +127 -0
- neuralnode-2.0.2/src/debug_import.py +37 -0
- neuralnode-2.0.2/src/neuralnode/__init__.py +717 -0
- neuralnode-2.0.2/src/neuralnode/agents/__init__.py +1172 -0
- neuralnode-2.0.2/src/neuralnode/chains/__init__.py +648 -0
- neuralnode-2.0.2/src/neuralnode/config/__init__.py +232 -0
- neuralnode-2.0.2/src/neuralnode/core/__init__.py +460 -0
- neuralnode-2.0.2/src/neuralnode/core/openai_blocker.py +93 -0
- neuralnode-2.0.2/src/neuralnode/diagnostics/__init__.py +742 -0
- neuralnode-2.0.2/src/neuralnode/integrations/discord.py +218 -0
- neuralnode-2.0.2/src/neuralnode/integrations/slack.py +203 -0
- neuralnode-2.0.2/src/neuralnode/integrations/telegram.py +601 -0
- neuralnode-2.0.2/src/neuralnode/integrations/whatsapp.py +264 -0
- neuralnode-2.0.2/src/neuralnode/memory/__init__.py +398 -0
- neuralnode-2.0.2/src/neuralnode/memory/advanced.py +510 -0
- neuralnode-2.0.2/src/neuralnode/prompts/__init__.py +700 -0
- neuralnode-2.0.2/src/neuralnode/providers/__init__.py +238 -0
- neuralnode-2.0.2/src/neuralnode/providers/base.py +363 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/__init__.py +46 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/ai21.py +78 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/anthropic.py +125 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/cohere.py +127 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/deepseek.py +122 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/fireworks.py +81 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/google.py +149 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/groq.py +104 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/mistral.py +114 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/perplexity.py +91 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat/together.py +120 -0
- neuralnode-2.0.2/src/neuralnode/providers/chat_models.py +1597 -0
- neuralnode-2.0.2/src/neuralnode/providers/embeddings.py +1144 -0
- neuralnode-2.0.2/src/neuralnode/providers/horus.py +958 -0
- neuralnode-2.0.2/src/neuralnode/providers/local/__init__.py +305 -0
- neuralnode-2.0.2/src/neuralnode/providers/local_providers.py +1803 -0
- neuralnode-2.0.2/src/neuralnode/providers/text_generation.py +1119 -0
- neuralnode-2.0.2/src/neuralnode/providers/universal_local.py +554 -0
- neuralnode-2.0.2/src/neuralnode/rag/__init__.py +839 -0
- neuralnode-2.0.2/src/neuralnode/rag/loaders.py +704 -0
- neuralnode-2.0.2/src/neuralnode/reasoning/__init__.py +704 -0
- neuralnode-2.0.2/src/neuralnode/replica.py +212 -0
- neuralnode-2.0.2/src/neuralnode/speech/__init__.py +299 -0
- neuralnode-2.0.2/src/neuralnode/thinking.py +379 -0
- neuralnode-2.0.2/src/neuralnode/tools/__init__.py +55 -0
- neuralnode-2.0.2/src/neuralnode/tools/advanced.py +784 -0
- neuralnode-2.0.2/src/neuralnode/tools/multisearch.py +615 -0
- neuralnode-2.0.2/src/neuralnode/tools/system/__init__.py +197 -0
- neuralnode-2.0.2/src/neuralnode/tools/system/operations.py +412 -0
- neuralnode-2.0.2/src/neuralnode/tools/web/__init__.py +290 -0
- neuralnode-2.0.2/src/neuralnode/tts/__init__.py +299 -0
- neuralnode-2.0.2/src/neuralnode/turboquant.py +549 -0
- neuralnode-2.0.2/src/neuralnode/utils/__init__.py +1 -0
- neuralnode-2.0.2/src/neuralnode/utils/logger.py +292 -0
- neuralnode-2.0.2/src/neuralnode/utils/metrics.py +222 -0
- neuralnode-2.0.2/src/neuralnode/vectorstores/__init__.py +899 -0
- neuralnode-2.0.2/src/neuralnode/vision/__init__.py +191 -0
- neuralnode-2.0.2/src/nn/__init__.py +6 -0
- neuralnode-2.0.1/PKG-INFO +0 -106
- neuralnode-2.0.1/README.md +0 -50
- neuralnode-2.0.1/setup.cfg +0 -4
- neuralnode-2.0.1/setup.py +0 -64
- neuralnode-2.0.1/src/neuralnode/__init__.py +0 -74
- neuralnode-2.0.1/src/neuralnode/chains/__init__.py +0 -0
- neuralnode-2.0.1/src/neuralnode/chains/advanced_chains.py +0 -540
- neuralnode-2.0.1/src/neuralnode/core/__init__.py +0 -0
- neuralnode-2.0.1/src/neuralnode/core/base_tool.py +0 -80
- neuralnode-2.0.1/src/neuralnode/core/local_llm.py +0 -143
- neuralnode-2.0.1/src/neuralnode/core/message.py +0 -75
- neuralnode-2.0.1/src/neuralnode/core/python_repl_tool.py +0 -70
- neuralnode-2.0.1/src/neuralnode/core/react_agent.py +0 -177
- neuralnode-2.0.1/src/neuralnode/core/utils.py +0 -83
- neuralnode-2.0.1/src/neuralnode/integrations/__init__.py +0 -0
- neuralnode-2.0.1/src/neuralnode/integrations/google_ai_studio.py +0 -263
- neuralnode-2.0.1/src/neuralnode/integrations/lm_studio.py +0 -291
- neuralnode-2.0.1/src/neuralnode/integrations/whatsapp.py +0 -461
- neuralnode-2.0.1/src/neuralnode/neural_doctor.py +0 -941
- neuralnode-2.0.1/src/neuralnode.egg-info/PKG-INFO +0 -106
- neuralnode-2.0.1/src/neuralnode.egg-info/SOURCES.txt +0 -23
- neuralnode-2.0.1/src/neuralnode.egg-info/dependency_links.txt +0 -1
- neuralnode-2.0.1/src/neuralnode.egg-info/not-zip-safe +0 -1
- neuralnode-2.0.1/src/neuralnode.egg-info/requires.txt +0 -26
- neuralnode-2.0.1/src/neuralnode.egg-info/top_level.txt +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# NeuralNode Environment Configuration
|
|
2
|
+
# Copy this file to .env and fill in your API keys
|
|
3
|
+
|
|
4
|
+
# OpenAI Configuration
|
|
5
|
+
OPENAI_API_KEY=sk-your-openai-api-key-here
|
|
6
|
+
OPENAI_BASE_URL=https://api.openai.com/v1
|
|
7
|
+
|
|
8
|
+
# Anthropic Configuration
|
|
9
|
+
ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here
|
|
10
|
+
|
|
11
|
+
# Google (Gemini) Configuration
|
|
12
|
+
GOOGLE_API_KEY=your-google-api-key-here
|
|
13
|
+
|
|
14
|
+
# Ollama Configuration (for local models)
|
|
15
|
+
# No API key needed, just ensure Ollama is running
|
|
16
|
+
OLLAMA_BASE_URL=http://localhost:11434
|
|
17
|
+
|
|
18
|
+
# NeuralNode Settings
|
|
19
|
+
NEURALNODE_DEFAULT_PROVIDER=auto
|
|
20
|
+
NEURALNODE_MEMORY_ENABLED=true
|
|
21
|
+
NEURALNODE_SAFE_MODE=true
|
|
22
|
+
NEURALNODE_LOG_LEVEL=INFO
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -e ".[dev]"
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: |
|
|
31
|
+
pytest tests/ -v --cov=src/neuralnode --cov-report=xml --cov-report=term
|
|
32
|
+
|
|
33
|
+
- name: Upload coverage to Codecov
|
|
34
|
+
uses: codecov/codecov-action@v3
|
|
35
|
+
with:
|
|
36
|
+
file: ./coverage.xml
|
|
37
|
+
flags: unittests
|
|
38
|
+
name: codecov-umbrella
|
|
39
|
+
|
|
40
|
+
lint:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
- name: Set up Python
|
|
46
|
+
uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.11"
|
|
49
|
+
|
|
50
|
+
- name: Install dependencies
|
|
51
|
+
run: |
|
|
52
|
+
python -m pip install --upgrade pip
|
|
53
|
+
pip install black ruff mypy
|
|
54
|
+
|
|
55
|
+
- name: Check formatting with black
|
|
56
|
+
run: black --check src/neuralnode
|
|
57
|
+
|
|
58
|
+
- name: Lint with ruff
|
|
59
|
+
run: ruff check src/neuralnode
|
|
60
|
+
|
|
61
|
+
- name: Type check with mypy
|
|
62
|
+
run: mypy src/neuralnode
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
# Set environment variables
|
|
4
|
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
5
|
+
PYTHONUNBUFFERED=1 \
|
|
6
|
+
PIP_NO_CACHE_DIR=1 \
|
|
7
|
+
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
8
|
+
|
|
9
|
+
# Install system dependencies
|
|
10
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
11
|
+
build-essential \
|
|
12
|
+
curl \
|
|
13
|
+
git \
|
|
14
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
15
|
+
|
|
16
|
+
# Set work directory
|
|
17
|
+
WORKDIR /app
|
|
18
|
+
|
|
19
|
+
# Install Python dependencies
|
|
20
|
+
COPY pyproject.toml README.md ./
|
|
21
|
+
RUN pip install --upgrade pip && \
|
|
22
|
+
pip install -e ".[all]" --no-cache-dir
|
|
23
|
+
|
|
24
|
+
# Copy application code
|
|
25
|
+
COPY src/ ./src/
|
|
26
|
+
COPY examples/ ./examples/
|
|
27
|
+
|
|
28
|
+
# Install the package
|
|
29
|
+
RUN pip install -e .
|
|
30
|
+
|
|
31
|
+
# Create non-root user
|
|
32
|
+
RUN useradd -m -u 1000 neuralnode && \
|
|
33
|
+
chown -R neuralnode:neuralnode /app
|
|
34
|
+
USER neuralnode
|
|
35
|
+
|
|
36
|
+
# Expose port for API (if needed)
|
|
37
|
+
EXPOSE 8000
|
|
38
|
+
|
|
39
|
+
# Health check
|
|
40
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
41
|
+
CMD python -c "import neuralnode; print('OK')" || exit 1
|
|
42
|
+
|
|
43
|
+
# Default command
|
|
44
|
+
CMD ["python", "-c", "import neuralnode; print('NeuralNode v' + neuralnode.__version__ + ' ready')"]
|
neuralnode-2.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 NeuralNode
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neuralnode
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: Comprehensive AI Framework with 50+ LLM Providers, Advanced Agents, Chains, Memory, RAG, and 100+ Tools
|
|
5
|
+
Project-URL: Homepage, https://assem.cloud/
|
|
6
|
+
Project-URL: Documentation, https://neuralnode.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/assemsabry/neuralnode
|
|
8
|
+
Project-URL: Issues, https://github.com/assemsabry/neuralnode/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/assemsabry/neuralnode/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: Assem Sabry <assemsabryy@outlook.com>
|
|
11
|
+
Maintainer-email: Assem Sabry <assemsabryy@outlook.com>
|
|
12
|
+
License: MIT
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: agent,ai,anthropic,automation,embeddings,framework,google,langchain,llm,ollama,openai,rag,tools,vector-stores
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
|
+
Requires-Dist: numpy>=1.24.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.0
|
|
30
|
+
Requires-Dist: requests>=2.28.0
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: accelerate>=0.24.0; extra == 'all'
|
|
33
|
+
Requires-Dist: anthropic>=0.8.0; extra == 'all'
|
|
34
|
+
Requires-Dist: beautifulsoup4>=4.12.0; extra == 'all'
|
|
35
|
+
Requires-Dist: bitsandbytes>=0.41.0; extra == 'all'
|
|
36
|
+
Requires-Dist: chromadb>=0.4.0; extra == 'all'
|
|
37
|
+
Requires-Dist: cohere>=4.0.0; extra == 'all'
|
|
38
|
+
Requires-Dist: edge-tts>=6.1.0; extra == 'all'
|
|
39
|
+
Requires-Dist: einops>=0.7.0; extra == 'all'
|
|
40
|
+
Requires-Dist: faiss-cpu>=1.7.4; extra == 'all'
|
|
41
|
+
Requires-Dist: google-generativeai>=0.3.0; extra == 'all'
|
|
42
|
+
Requires-Dist: groq>=0.4.0; extra == 'all'
|
|
43
|
+
Requires-Dist: huggingface-hub>=0.23.0; extra == 'all'
|
|
44
|
+
Requires-Dist: llama-cpp-python>=0.2.0; extra == 'all'
|
|
45
|
+
Requires-Dist: mistralai>=0.0.12; extra == 'all'
|
|
46
|
+
Requires-Dist: ollama>=0.1.0; extra == 'all'
|
|
47
|
+
Requires-Dist: openai>=1.0.0; extra == 'all'
|
|
48
|
+
Requires-Dist: protobuf>=3.20.0; extra == 'all'
|
|
49
|
+
Requires-Dist: psutil>=5.9.0; extra == 'all'
|
|
50
|
+
Requires-Dist: pydub>=0.25.1; extra == 'all'
|
|
51
|
+
Requires-Dist: pypdf>=3.17.0; extra == 'all'
|
|
52
|
+
Requires-Dist: python-docx>=0.8.11; extra == 'all'
|
|
53
|
+
Requires-Dist: python-telegram-bot>=20.0; extra == 'all'
|
|
54
|
+
Requires-Dist: scipy>=1.10.0; extra == 'all'
|
|
55
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == 'all'
|
|
56
|
+
Requires-Dist: sentencepiece>=0.1.99; extra == 'all'
|
|
57
|
+
Requires-Dist: speechrecognition>=3.10.0; extra == 'all'
|
|
58
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'all'
|
|
59
|
+
Requires-Dist: torch>=2.0.0; extra == 'all'
|
|
60
|
+
Requires-Dist: transformers>=4.35.0; extra == 'all'
|
|
61
|
+
Provides-Extra: anthropic
|
|
62
|
+
Requires-Dist: anthropic>=0.8.0; extra == 'anthropic'
|
|
63
|
+
Provides-Extra: aws
|
|
64
|
+
Requires-Dist: boto3>=1.34.0; extra == 'aws'
|
|
65
|
+
Provides-Extra: azure
|
|
66
|
+
Requires-Dist: openai>=1.0.0; extra == 'azure'
|
|
67
|
+
Provides-Extra: chroma
|
|
68
|
+
Requires-Dist: chromadb>=0.4.0; extra == 'chroma'
|
|
69
|
+
Provides-Extra: cohere
|
|
70
|
+
Requires-Dist: cohere>=4.0.0; extra == 'cohere'
|
|
71
|
+
Provides-Extra: dev
|
|
72
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
73
|
+
Requires-Dist: mypy>=1.7.0; extra == 'dev'
|
|
74
|
+
Requires-Dist: pytest>=7.4.0; extra == 'dev'
|
|
75
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
76
|
+
Provides-Extra: discord
|
|
77
|
+
Requires-Dist: discord-py>=2.3.0; extra == 'discord'
|
|
78
|
+
Provides-Extra: embeddings
|
|
79
|
+
Requires-Dist: fastembed>=0.1.0; extra == 'embeddings'
|
|
80
|
+
Requires-Dist: instructorembedding>=1.0.1; extra == 'embeddings'
|
|
81
|
+
Requires-Dist: sentence-transformers>=2.2.0; extra == 'embeddings'
|
|
82
|
+
Requires-Dist: tiktoken>=0.5.0; extra == 'embeddings'
|
|
83
|
+
Provides-Extra: faiss
|
|
84
|
+
Requires-Dist: faiss-cpu>=1.7.4; extra == 'faiss'
|
|
85
|
+
Provides-Extra: flash-attn
|
|
86
|
+
Requires-Dist: flash-attn>=2.3.0; extra == 'flash-attn'
|
|
87
|
+
Provides-Extra: google
|
|
88
|
+
Requires-Dist: google-cloud-aiplatform>=1.38.0; extra == 'google'
|
|
89
|
+
Requires-Dist: google-generativeai>=0.3.0; extra == 'google'
|
|
90
|
+
Provides-Extra: groq
|
|
91
|
+
Requires-Dist: groq>=0.4.0; extra == 'groq'
|
|
92
|
+
Provides-Extra: horus
|
|
93
|
+
Requires-Dist: accelerate>=0.24.0; extra == 'horus'
|
|
94
|
+
Requires-Dist: bitsandbytes>=0.41.0; extra == 'horus'
|
|
95
|
+
Requires-Dist: einops>=0.7.0; extra == 'horus'
|
|
96
|
+
Requires-Dist: huggingface-hub>=0.23.0; extra == 'horus'
|
|
97
|
+
Requires-Dist: llama-cpp-python>=0.2.0; extra == 'horus'
|
|
98
|
+
Requires-Dist: protobuf>=3.20.0; extra == 'horus'
|
|
99
|
+
Requires-Dist: scipy>=1.10.0; extra == 'horus'
|
|
100
|
+
Requires-Dist: sentencepiece>=0.1.99; extra == 'horus'
|
|
101
|
+
Requires-Dist: torch>=2.0.0; extra == 'horus'
|
|
102
|
+
Requires-Dist: transformers>=4.35.0; extra == 'horus'
|
|
103
|
+
Provides-Extra: local
|
|
104
|
+
Requires-Dist: accelerate>=0.24.0; extra == 'local'
|
|
105
|
+
Requires-Dist: huggingface-hub>=0.23.0; extra == 'local'
|
|
106
|
+
Requires-Dist: llama-cpp-python>=0.2.0; extra == 'local'
|
|
107
|
+
Requires-Dist: protobuf>=3.20.0; extra == 'local'
|
|
108
|
+
Requires-Dist: sentencepiece>=0.1.99; extra == 'local'
|
|
109
|
+
Requires-Dist: torch>=2.0.0; extra == 'local'
|
|
110
|
+
Requires-Dist: transformers>=4.35.0; extra == 'local'
|
|
111
|
+
Provides-Extra: local-all
|
|
112
|
+
Requires-Dist: accelerate>=0.24.0; extra == 'local-all'
|
|
113
|
+
Requires-Dist: bitsandbytes>=0.41.0; extra == 'local-all'
|
|
114
|
+
Requires-Dist: einops>=0.7.0; extra == 'local-all'
|
|
115
|
+
Requires-Dist: huggingface-hub>=0.23.0; extra == 'local-all'
|
|
116
|
+
Requires-Dist: llama-cpp-python>=0.2.0; extra == 'local-all'
|
|
117
|
+
Requires-Dist: protobuf>=3.20.0; extra == 'local-all'
|
|
118
|
+
Requires-Dist: scipy>=1.10.0; extra == 'local-all'
|
|
119
|
+
Requires-Dist: sentencepiece>=0.1.99; extra == 'local-all'
|
|
120
|
+
Requires-Dist: torch>=2.0.0; extra == 'local-all'
|
|
121
|
+
Requires-Dist: transformers>=4.35.0; extra == 'local-all'
|
|
122
|
+
Provides-Extra: milvus
|
|
123
|
+
Requires-Dist: pymilvus>=2.3.0; extra == 'milvus'
|
|
124
|
+
Provides-Extra: mistral
|
|
125
|
+
Requires-Dist: mistralai>=0.0.12; extra == 'mistral'
|
|
126
|
+
Provides-Extra: ollama
|
|
127
|
+
Requires-Dist: ollama>=0.1.0; extra == 'ollama'
|
|
128
|
+
Provides-Extra: openai
|
|
129
|
+
Requires-Dist: openai>=1.0.0; extra == 'openai'
|
|
130
|
+
Provides-Extra: pinecone
|
|
131
|
+
Requires-Dist: pinecone-client>=2.2.0; extra == 'pinecone'
|
|
132
|
+
Provides-Extra: qdrant
|
|
133
|
+
Requires-Dist: qdrant-client>=1.6.0; extra == 'qdrant'
|
|
134
|
+
Provides-Extra: rag
|
|
135
|
+
Requires-Dist: beautifulsoup4>=4.12.0; extra == 'rag'
|
|
136
|
+
Requires-Dist: markdown>=3.5.0; extra == 'rag'
|
|
137
|
+
Requires-Dist: openpyxl>=3.1.0; extra == 'rag'
|
|
138
|
+
Requires-Dist: pypdf>=3.17.0; extra == 'rag'
|
|
139
|
+
Requires-Dist: python-docx>=0.8.11; extra == 'rag'
|
|
140
|
+
Provides-Extra: redis
|
|
141
|
+
Requires-Dist: redis>=5.0.0; extra == 'redis'
|
|
142
|
+
Provides-Extra: replica
|
|
143
|
+
Requires-Dist: edge-tts>=6.1.0; extra == 'replica'
|
|
144
|
+
Provides-Extra: slack
|
|
145
|
+
Requires-Dist: slack-sdk>=3.21.0; extra == 'slack'
|
|
146
|
+
Provides-Extra: speech
|
|
147
|
+
Requires-Dist: pydub>=0.25.1; extra == 'speech'
|
|
148
|
+
Requires-Dist: speechrecognition>=3.10.0; extra == 'speech'
|
|
149
|
+
Provides-Extra: telegram
|
|
150
|
+
Requires-Dist: edge-tts>=6.1.0; extra == 'telegram'
|
|
151
|
+
Requires-Dist: pydub>=0.25.1; extra == 'telegram'
|
|
152
|
+
Requires-Dist: pypdf>=3.17.0; extra == 'telegram'
|
|
153
|
+
Requires-Dist: python-docx>=0.8.11; extra == 'telegram'
|
|
154
|
+
Requires-Dist: python-telegram-bot>=20.0; extra == 'telegram'
|
|
155
|
+
Requires-Dist: speechrecognition>=3.10.0; extra == 'telegram'
|
|
156
|
+
Provides-Extra: tools
|
|
157
|
+
Requires-Dist: psutil>=5.9.0; extra == 'tools'
|
|
158
|
+
Requires-Dist: pymongo>=4.6.0; extra == 'tools'
|
|
159
|
+
Requires-Dist: serpapi>=0.1.0; extra == 'tools'
|
|
160
|
+
Requires-Dist: sqlalchemy>=2.0.0; extra == 'tools'
|
|
161
|
+
Requires-Dist: wikipedia>=1.4.0; extra == 'tools'
|
|
162
|
+
Provides-Extra: turboquant
|
|
163
|
+
Provides-Extra: weaviate
|
|
164
|
+
Requires-Dist: weaviate-client>=3.0.0; extra == 'weaviate'
|
|
165
|
+
Description-Content-Type: text/markdown
|
|
166
|
+
|
|
167
|
+
# NeuralNode v3.1.0
|
|
168
|
+
|
|
169
|
+
NeuralNode is a Python AI framework focused on:
|
|
170
|
+
- real cloud providers that are implemented
|
|
171
|
+
- local model execution with Transformers, Ollama, llama.cpp, and Horus
|
|
172
|
+
- agents, memory, and RAG
|
|
173
|
+
- Replica TTS and speech recognition
|
|
174
|
+
- Telegram integration
|
|
175
|
+
|
|
176
|
+
## Install
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
pip install neuralnode
|
|
180
|
+
pip install "neuralnode[all]"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Useful extras:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
pip install "neuralnode[horus]"
|
|
187
|
+
pip install "neuralnode[telegram]"
|
|
188
|
+
pip install "neuralnode[replica]"
|
|
189
|
+
pip install "neuralnode[speech]"
|
|
190
|
+
pip install "neuralnode[turboquant]"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Quick Start
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
import neuralnode as nn
|
|
197
|
+
|
|
198
|
+
ai = nn.NeuralNode(
|
|
199
|
+
provider="groq",
|
|
200
|
+
model="llama-3.1-70b-versatile",
|
|
201
|
+
api_key="YOUR_GROQ_API_KEY",
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
print(ai.chat("Hello from NeuralNode"))
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Horus
|
|
208
|
+
|
|
209
|
+
All Horus models use:
|
|
210
|
+
- unified chat template: `horus_unified`
|
|
211
|
+
- unified context window: `8192`
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
import neuralnode as nn
|
|
215
|
+
|
|
216
|
+
model = nn.HorusModel(
|
|
217
|
+
model_id="tokenaii/horus/Horus-1.0-4B",
|
|
218
|
+
turboquant=True,
|
|
219
|
+
turboquant_bits=4,
|
|
220
|
+
).load()
|
|
221
|
+
|
|
222
|
+
response = model.chat([
|
|
223
|
+
{"role": "system", "content": "You are a helpful assistant."},
|
|
224
|
+
{"role": "user", "content": "Explain Horus briefly."},
|
|
225
|
+
])
|
|
226
|
+
|
|
227
|
+
print(response.content)
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Available Horus model IDs
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from neuralnode import HorusModel
|
|
234
|
+
|
|
235
|
+
print(HorusModel.list_available_models())
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Supported IDs currently include:
|
|
239
|
+
- `tokenaii/horus`
|
|
240
|
+
- `tokenaii/horus/Horus-1.0-4B`
|
|
241
|
+
- `tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-Q4_K_M.gguf`
|
|
242
|
+
- `tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-Q5_K_M.gguf`
|
|
243
|
+
- `tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-Q6_K.gguf`
|
|
244
|
+
- `tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-Q8_0.gguf`
|
|
245
|
+
- `tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-F16.gguf`
|
|
246
|
+
- `tokenaii/horus-instruct`
|
|
247
|
+
|
|
248
|
+
## Replica TTS
|
|
249
|
+
|
|
250
|
+
Replica exposes 20 curated `edge_tts` voices through custom voice IDs.
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
import neuralnode as nn
|
|
254
|
+
|
|
255
|
+
print(nn.replica_voice_list())
|
|
256
|
+
|
|
257
|
+
tts = nn.ReplicaTTS(voice_id="replic-salma-language{ar-eg}")
|
|
258
|
+
tts.save_to_file("مرحبا من نيورال نود", "reply.mp3")
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Voice mapping docs:
|
|
262
|
+
- [docs/replica_voice_ids.md](docs/replica_voice_ids.md)
|
|
263
|
+
- [docs/replica_voice_ids.csv](docs/replica_voice_ids.csv)
|
|
264
|
+
|
|
265
|
+
## Horus + Replica
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
import neuralnode as nn
|
|
269
|
+
|
|
270
|
+
model = nn.HorusModel(
|
|
271
|
+
model_id="tokenaii/horus/Horus-1.0-4B",
|
|
272
|
+
enable_tts=True,
|
|
273
|
+
tts_voice_id="replic-salma-language{ar-eg}",
|
|
274
|
+
).load()
|
|
275
|
+
|
|
276
|
+
result = model.chat_and_speak(
|
|
277
|
+
[{"role": "user", "content": "قل لي جملة ترحيب قصيرة"}],
|
|
278
|
+
output_file="horus_reply.mp3",
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
print(result["response"].content)
|
|
282
|
+
print(result["audio_path"])
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Telegram
|
|
286
|
+
|
|
287
|
+
Use a BotFather token to connect an agent to Telegram.
|
|
288
|
+
|
|
289
|
+
```python
|
|
290
|
+
import neuralnode as nn
|
|
291
|
+
|
|
292
|
+
ai = nn.NeuralNode(provider="horus", model="tokenaii/horus/Horus-1.0-4B")
|
|
293
|
+
agent = ai.agent(agent_type="simple", thinking=False)
|
|
294
|
+
|
|
295
|
+
bot = nn.TelegramBot(
|
|
296
|
+
token="YOUR_BOTFATHER_TOKEN",
|
|
297
|
+
agent=agent,
|
|
298
|
+
config=nn.TelegramBotConfig(
|
|
299
|
+
token="YOUR_BOTFATHER_TOKEN",
|
|
300
|
+
enable_voice=True,
|
|
301
|
+
enable_documents=True,
|
|
302
|
+
reply_mode="both", # text | voice | both
|
|
303
|
+
voice_reply_voice_id="replic-aria-language{en-us}",
|
|
304
|
+
),
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
bot.start()
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Telegram now supports:
|
|
311
|
+
- text chat
|
|
312
|
+
- voice transcription
|
|
313
|
+
- optional Replica voice replies
|
|
314
|
+
- document download and analysis
|
|
315
|
+
|
|
316
|
+
## RAG
|
|
317
|
+
|
|
318
|
+
```python
|
|
319
|
+
import neuralnode as nn
|
|
320
|
+
|
|
321
|
+
ai = nn.NeuralNode(provider="ollama", model="llama3.2")
|
|
322
|
+
rag = ai.rag(store="memory")
|
|
323
|
+
rag.add_documents(["notes.txt", "report.pdf"])
|
|
324
|
+
|
|
325
|
+
print(rag.query("Summarize the key findings"))
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
If the current LLM does not support embeddings, RAG automatically tries:
|
|
329
|
+
1. a dedicated embedding provider
|
|
330
|
+
2. sentence-transformers
|
|
331
|
+
3. lexical fallback embeddings
|
|
332
|
+
|
|
333
|
+
## Supported Provider Surface
|
|
334
|
+
|
|
335
|
+
Only implemented providers are exposed through the public provider registry.
|
|
336
|
+
|
|
337
|
+
Cloud chat providers:
|
|
338
|
+
- `anthropic`
|
|
339
|
+
- `google`
|
|
340
|
+
- `cohere`
|
|
341
|
+
- `mistral`
|
|
342
|
+
- `groq`
|
|
343
|
+
- `deepseek`
|
|
344
|
+
- `perplexity`
|
|
345
|
+
- `ai21`
|
|
346
|
+
- `together`
|
|
347
|
+
- `fireworks`
|
|
348
|
+
- `bedrock`
|
|
349
|
+
- `vertexai`
|
|
350
|
+
|
|
351
|
+
Local providers:
|
|
352
|
+
- `ollama`
|
|
353
|
+
- `llamacpp`
|
|
354
|
+
- `transformers`
|
|
355
|
+
- `llamafile`
|
|
356
|
+
- `koboldcpp`
|
|
357
|
+
- `textgenwebui`
|
|
358
|
+
- `exllama`
|
|
359
|
+
- `autogptq`
|
|
360
|
+
- `autoawq`
|
|
361
|
+
- `vllm`
|
|
362
|
+
- `tgi`
|
|
363
|
+
- `deepspeed`
|
|
364
|
+
- `rayserve`
|
|
365
|
+
- `mlflow`
|
|
366
|
+
- `bentoml`
|
|
367
|
+
- `triton`
|
|
368
|
+
- `mlx`
|
|
369
|
+
- `horus`
|
|
370
|
+
|
|
371
|
+
## TurboQuant
|
|
372
|
+
|
|
373
|
+
TurboQuant is integrated into:
|
|
374
|
+
- `HorusModel(..., turboquant=True, turboquant_bits=4)`
|
|
375
|
+
- `create_provider("transformers", turboquant=True, turboquant_bits=4, ...)`
|
|
376
|
+
|
|
377
|
+
If the `turboquant` package is not installed or the backend cannot use it, NeuralNode falls back to normal generation automatically.
|
|
378
|
+
|
|
379
|
+
## Notes
|
|
380
|
+
|
|
381
|
+
- OpenAI is intentionally blocked in NeuralNode.
|
|
382
|
+
- GGUF Horus models require `llama-cpp-python`.
|
|
383
|
+
- Horus downloads from Hugging Face require `huggingface_hub`.
|