Back to Nexa Sdk

Navigate to the example directory

cookbook/PC/RAG-LLM/Python-Binding-Example/README.md

0.2.731.3 KB
Original Source

About

This demo showcases a RAG implementation using NexaAI Python binding.

Setup

Prerequisites

PlatformRequired Python
Windows (ARM64, Snapdragon X Elite)3.11 – 3.13 (arm64)
macOS / Windows (x64)3.10 (x64)

For python install, you can check our interactive Jupyter notebooks. Choose the appropriate notebook for your platform:

Install Dependencies

bash
# Navigate to the example directory
cd Python-Binding-Example

# Create a Python virtual environment
python -m venv .venv

# Activate the virtual environment
.\.venv\Scripts\activate # windows

source .venv/bin/activate # macOS

# Install all required dependencies
pip install -r requirements.txt

Running the Example

bash
# Run the CLI version which provides an interactive terminal interface
# This version allows direct interaction with the agent through command line
python rag_nexa.py --data ../docs

# Run the Gradio UI version
# This starts a local web server with a chat interface at http://localhost:7860
python gradio_ui.py