feat: isolate Python dependencies for RAG scripts
This commit is contained in:
parent
a19c98a684
commit
01287b2cc0
5 changed files with 85 additions and 10 deletions
|
|
@ -1,13 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
PROJECT_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd -P)"
|
||||
PROJECT_PYTHON="$PROJECT_ROOT/.venv/bin/python"
|
||||
if [[ ! -x "$PROJECT_PYTHON" ]]; then
|
||||
echo "[ERRO] Interpretador do projeto ausente ou não executável: $PROJECT_PYTHON. Crie o ambiente com: cd \"$PROJECT_ROOT\" && python3.11 -m venv .venv && .venv/bin/python -m pip install -r requirements-scripts.txt" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
QDRANT_URL="${QDRANT_URL:-http://192.168.0.153:6333}"
|
||||
OLLAMA_URL="${OLLAMA_URL:-http://192.168.0.106:11434}"
|
||||
COLLECTION="ativa_knowledge"
|
||||
MODEL="nomic-embed-text"
|
||||
LIMIT=3
|
||||
|
||||
python3 - <<'PY'
|
||||
"$PROJECT_PYTHON" - <<'PY'
|
||||
import json
|
||||
import requests
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue