Spaces:
Sleeping
Sleeping
Commit ·
545ecb3
1
Parent(s): 09da05c
feat: update new change
Browse files- .env +94 -0
- .gitignore +1 -1
.env
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Environment variables go here, can be read by `python-dotenv` package:
|
| 2 |
+
#
|
| 3 |
+
# `src/script.py`
|
| 4 |
+
# ----------------------------------------------------------------
|
| 5 |
+
# import dotenv
|
| 6 |
+
#
|
| 7 |
+
# project_dir = os.path.join(os.path.dirname(__file__), os.pardir)
|
| 8 |
+
# dotenv_path = os.path.join(project_dir, '.env')
|
| 9 |
+
# dotenv.load_dotenv(dotenv_path)
|
| 10 |
+
# ----------------------------------------------------------------
|
| 11 |
+
#
|
| 12 |
+
# DO NOT ADD THIS FILE TO VERSION CONTROL!
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
# Runtime LLM backend:
|
| 16 |
+
# - `stub`: no external server required (default)
|
| 17 |
+
# - `openai`: call an OpenAI-compatible endpoint (e.g., vLLM)
|
| 18 |
+
#ADSP_LLM_BACKEND=openai
|
| 19 |
+
# REST API server (scripts/run_api.py, FastAPI)
|
| 20 |
+
# Note: if you also run vLLM on port 8000, set ADSP_API_PORT=8080.
|
| 21 |
+
ADSP_API_HOST=0.0.0.0
|
| 22 |
+
ADSP_API_PORT=7860
|
| 23 |
+
ADSP_API_RELOAD=true
|
| 24 |
+
ADSP_API_TITLE=Lavazza AI Personas API
|
| 25 |
+
ADSP_API_VERSION=0.1.0
|
| 26 |
+
ADSP_API_WORKERS=4
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
# OpenAI-compatible runtime model settings (only used when ADSP_LLM_BACKEND=openai)
|
| 30 |
+
ADSP_LLM_BACKEND=openai
|
| 31 |
+
ADSP_LLM_BASE_URL=https://integrate.api.nvidia.com/v1
|
| 32 |
+
#ADSP_LLM_MODEL=mistralai/mistral-large-3-675b-instruct-2512
|
| 33 |
+
ADSP_LLM_MODEL=mistralai/mistral-small-24b-instruct
|
| 34 |
+
#ADSP_LLM_MODEL=mistralai/mistral-large-3-675b-instruct-2512
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
ADSP_CONTEXT_FILTER_BACKEND=openai
|
| 39 |
+
ADSP_CONTEXT_FILTER_MAX_HISTORY=3
|
| 40 |
+
ADSP_CONTEXT_FILTER_MAX_BLOCKS=10
|
| 41 |
+
ADSP_CONTEXT_FILTER_BASE_URL=https://integrate.api.nvidia.com/v1
|
| 42 |
+
ADSP_CONTEXT_FILTER_MODEL=mistralai/mistral-small-24b-instruct
|
| 43 |
+
#ADSP_CONTEXT_FILTER_MODEL=mistralai/mistral-medium-3-instruct
|
| 44 |
+
# OpenAI backend (optional):
|
| 45 |
+
# - `ADSP_CONTEXT_FILTER_BASE_URL` (defaults to `ADSP_LLM_BASE_URL` / `VLLM_BASE_URL`)
|
| 46 |
+
# - `ADSP_CONTEXT_FILTER_MODEL` (defaults to `ADSP_LLM_MODEL` / `VLLM_MODEL`)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
# Optional generation knobs
|
| 50 |
+
ADSP_LLM_TEMPERATURE=0.2
|
| 51 |
+
ADSP_LLM_MAX_TOKENS=4000
|
| 52 |
+
ADSP_LLM_TIMEOUT=60
|
| 53 |
+
|
| 54 |
+
# Persona data locations (override if you store outputs elsewhere)
|
| 55 |
+
ADSP_PERSONAS_DIR=data/processed/personas/individual
|
| 56 |
+
ADSP_PERSONA_TRAITS_DIR=data/processed/personas/common_traits
|
| 57 |
+
|
| 58 |
+
# Persona extraction pipeline (scripts/run_persona_extraction.py)
|
| 59 |
+
VLLM_BASE_URL=https://integrate.api.nvidia.com/v1
|
| 60 |
+
VLLM_MODEL=mistralai/mistral-medium-3-instruct
|
| 61 |
+
|
| 62 |
+
# Optional reasoning enrichment model (can reuse the same endpoint)
|
| 63 |
+
REASONING_BASE_URL=https://integrate.api.nvidia.com/v1
|
| 64 |
+
REASONING_MODEL=mistralai/mistral-medium-3-instruct
|
| 65 |
+
|
| 66 |
+
ADSP_EMBEDDING_BACKEND=openai
|
| 67 |
+
ADSP_EMBEDDING_MODEL_NAME=nvidia/llama-nemotron-embed-vl-1b-v2
|
| 68 |
+
ADSP_EMBEDDING_API_BASE_URL=https://integrate.api.nvidia.com/v1
|
| 69 |
+
ADSP_EMBEDDING_ENCODING_FORMAT=float
|
| 70 |
+
ADSP_EMBEDDING_QUERY_EXTRA_BODY={"input_type":"query","truncate":"NONE"}
|
| 71 |
+
ADSP_EMBEDDING_DOCUMENT_EXTRA_BODY={"input_type":"passage","truncate":"NONE"}
|
| 72 |
+
|
| 73 |
+
# Docker Compose pipeline controls (docker-compose.yml)
|
| 74 |
+
# Source PDF path for both extraction jobs.
|
| 75 |
+
PERSONA_PDF_PATH=data/raw/pdf
|
| 76 |
+
# Optional override for fact extraction source PDF (defaults to PERSONA_PDF_PATH).
|
| 77 |
+
FACT_PDF_PATH=data/raw/pdf
|
| 78 |
+
|
| 79 |
+
# Optional page ranges: "start,end" (1-based, inclusive). Leave blank to process full PDF.
|
| 80 |
+
PERSONA_PAGE_RANGE=
|
| 81 |
+
FACT_PAGE_RANGE=
|
| 82 |
+
|
| 83 |
+
# Optional extraction toggles/extra args.
|
| 84 |
+
PERSONA_DEBUG=false
|
| 85 |
+
PERSONA_NO_CACHE=false
|
| 86 |
+
PERSONA_DISABLE_REASONING_PROFILES=false
|
| 87 |
+
PERSONA_EXTRA_ARGS=
|
| 88 |
+
FACT_DEBUG=false
|
| 89 |
+
FACT_NO_CACHE=false
|
| 90 |
+
FACT_EXTRA_ARGS=
|
| 91 |
+
|
| 92 |
+
# Frontend container defaults.
|
| 93 |
+
ADSP_FE_PORT=8501
|
| 94 |
+
ADSP_FE_API_URL=http://api:8000
|
.gitignore
CHANGED
|
@@ -147,7 +147,7 @@ celerybeat.pid
|
|
| 147 |
*.sage.py
|
| 148 |
|
| 149 |
# Environments
|
| 150 |
-
.env
|
| 151 |
.venv
|
| 152 |
env/
|
| 153 |
venv/
|
|
|
|
| 147 |
*.sage.py
|
| 148 |
|
| 149 |
# Environments
|
| 150 |
+
#.env
|
| 151 |
.venv
|
| 152 |
env/
|
| 153 |
venv/
|