Repository navigation
Expand file tree
/
Copy pathenv.example.watsonx
More file actions
89 lines (77 loc) · 3.7 KB
/
Copy pathenv.example.watsonx
File metadata and controls
89 lines (77 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ====================================================================
# localGPT Watson X Configuration Example
# ====================================================================
# This file shows how to point localGPT's LLM calls at IBM watsonx.ai
# Granite models instead of a local Ollama server.
#
# Copy this file to .env and fill in your credentials:
# cp env.example.watsonx .env
#
# (The filename has no leading dot on purpose: .gitignore ignores .env*,
# so a dotted example file could never be committed.)
#
# See WATSONX_README.md for what the backend switch does and does not
# cover. Short version: generation and all utility LLM calls move to
# Watson X; embeddings, reranking and sentence pruning stay local.
# ====================================================================
# LLM Backend Selection
# Options: "ollama" (default) or "watsonx"
LLM_BACKEND=watsonx
# ====================================================================
# Watson X Credentials
# ====================================================================
# Get these from your IBM Cloud watsonx.ai project:
# 1. Go to https://cloud.ibm.com/
# 2. Navigate to the watsonx.ai service
# 3. Create or select a project
# 4. Get an API key from IBM Cloud IAM
# 5. Copy the project ID from the project settings
#
# Both of the next two are mandatory - rag_system/factory.py raises
# "Watson X configuration incomplete" if either is empty.
# Your IBM Cloud API key
WATSONX_API_KEY=your_api_key_here
# Your watsonx.ai project ID
WATSONX_PROJECT_ID=your_project_id_here
# Watson X service URL (default: us-south region)
# Options:
# - https://us-south.ml.cloud.ibm.com (US South)
# - https://eu-de.ml.cloud.ibm.com (Frankfurt)
# - https://eu-gb.ml.cloud.ibm.com (London)
# - https://jp-tok.ml.cloud.ibm.com (Tokyo)
WATSONX_URL=https://us-south.ml.cloud.ibm.com
# ====================================================================
# Model Configuration
# ====================================================================
# Use model ids that exist in your watsonx.ai instance and region. The
# values below are only the defaults hardcoded in rag_system/main.py.
# IBM's "Supported foundation models" documentation lists what is
# currently available.
# Answers and sub-answer composition.
# default: ibm/granite-13b-chat-v2
WATSONX_GENERATION_MODEL=ibm/granite-13b-chat-v2
# Routing, triage, query decomposition, contextual enrichment, document
# overviews and answer verification. These prompts expect JSON back, and
# the Watson X client cannot force JSON mode - pick a model that follows
# format instructions well.
# default: ibm/granite-8b-japanese
WATSONX_ENRICHMENT_MODEL=ibm/granite-8b-japanese
# ====================================================================
# Local models (used no matter which LLM_BACKEND is selected)
# ====================================================================
# Embeddings run in-process from Hugging Face when the name contains a
# "/", and through Ollama otherwise. Changing this requires re-indexing.
# default: microsoft/harrier-oss-v1-0.6b
EMBEDDING_MODEL=microsoft/harrier-oss-v1-0.6b
# Reranker: the Qwen3 default loads through the in-repo QwenRerankerScorer,
# other models through the `rerankers` library; loaded lazily on the first
# reranked query (reranking is on by default).
# default: Qwen/Qwen3-Reranker-4B
RERANKER_MODEL=Qwen/Qwen3-Reranker-4B
# ====================================================================
# Optional: Ollama Configuration
# ====================================================================
# Still used when LLM_BACKEND=ollama, and always used by the backend
# gateway's direct-LLM fast path (backend/server.py) and by any Ollama
# embedding model.
OLLAMA_HOST=http://localhost:11434