Changes between Version 7 and Version 8 of expansion/gw16168
- Timestamp:
- 05/01/2026 10:56:04 PM (7 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
expansion/gw16168
v7 v8 262 262 jq '(.available_models[] | select(.name == "Qwen2.5-7B-Instruct") | .enabled) = true' /usr/share/eiq/aaf-connector/server_config.json > /tmp/config.json && \ 263 263 mv /tmp/config.json /usr/share/eiq/aaf-connector/server_config.json 264 jq '(.available_models[] | select(.name == "Qwen2.5-7B-Instruct") | .enabled) = true' /usr/share/eiq265 /aaf-connector/server_config.json > /tmp/config.json && mv /tmp/config.json /usr/share/eiq/aaf-connector/server_config.j266 son267 264 }}} 268 265 - you can just as easily edit the file manually if you want … … 427 424 }}} 428 425 429 === command-line python chatbot426 === command-line python eIQ chatbot 430 427 This is a command-line chatbot written in python using the eIQ AAF Connector 431 428 … … 527 524 }}} 528 525 529 === Web based python chatbot526 === Web based python eIQ chatbot 530 527 This is a web based chatbot in python using eIQ AAF Connector 531 528 … … 719 716 Execution: 720 717 {{{#!bash 718 $ mkdir /root/webapp 719 $ cd /root/webapp 721 720 $ uv venv # create virtual python env in current dir 722 721 $ uv pip install streamlit requests psutil argparse # install python deps … … 724 723 }}} 725 724 725 Service: 726 - if want this to run as a service: 727 {{{#!bash 728 cat << EOF > /etc/systemd/system/eiq-webapp.service: 729 [Unit] 730 Description=Streamlit Webapp for eIQ AAF 731 # Start after network is up 732 After=network.target 733 # We don't use 'After=eiq-aaf-connector.service' to avoid potential boot cycles 734 StartLimitIntervalSec=0 735 736 [Service] 737 Type=simple 738 User=root 739 # Ensure we are in the directory where webapp.py lives 740 WorkingDirectory=/root/webapp 741 742 # 1. Wait until the Connector is actually listening on Port 8000 743 ExecStartPre=/bin/bash -c 'until ss -Hltn | grep -E -q ":8000([[:space:]]|$)"; do echo "Waiting for eIQ Connector on Port 8000..." >&2; sleep 5; done' 744 745 # 2. Launch the app using uv 746 # Note: Using absolute path for uv is safer in systemd 747 ExecStart=/usr/local/bin/uv run streamlit run webapp.py \ 748 --server.address 0.0.0.0 \ 749 --server.port 8501 \ 750 -- \ 751 --user-map users.json \ 752 --host 127.0.0.1 \ 753 --port 8000 754 755 # Restart logic 756 Restart=on-failure 757 RestartSec=10s 758 StartLimitBurst=0 759 760 # Standard Logging 761 StandardOutput=journal 762 StandardError=journal 763 764 [Install] 765 WantedBy=multi-user.target 766 EOF 767 systemctl daemon-reload 768 systemctl enable eiq-webapp.service 769 systemctl start eiq-webapp.service 770 }}} 726 771 727 772 == Troubleshooting
