Skip to content

Commit 285c5e5

Browse files
committed
chore: Add app config example
1 parent 82392dc commit 285c5e5

14 files changed

+77
-19
lines changed

Diff for: configs/dbgpt-app-config.example.toml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[system]
2+
# Load language from environment variable(It is set by the hook)
3+
language = "${env:DBGPT_LANG:-zh}"
4+
log_level = "INFO"
5+
api_keys = []
6+
encrypt_key = "your_secret_key"
7+
8+
# Server Configurations
9+
[service.web]
10+
host = "0.0.0.0"
11+
port = 5670
12+
13+
[service.web.database]
14+
type = "sqlite"
15+
path = "pilot/meta_data/dbgpt.db"
16+
17+
[app]
18+
temperature = 0.6
19+
20+
[[app.configs]]
21+
name = "chat_excel"
22+
temperature = 0.1
23+
duckdb_extensions_dir = []
24+
force_install = true
25+
26+
[[app.configs]]
27+
name = "chat_normal"
28+
memory = {type="token", max_token_limit=20000}
29+
30+
[[app.configs]]
31+
name = "chat_with_db_qa"
32+
schema_retrieve_top_k = 50
33+
memory = {type="token", max_token_limit=20000}
34+
35+
# Model Configurations
36+
[models]
37+
[[models.llms]]
38+
name = "${env:LLM_MODEL_NAME:-gpt-4o}"
39+
provider = "${env:LLM_MODEL_PROVIDER:-proxy/openai}"
40+
api_base = "${env:OPENAI_API_BASE:-https://api.openai.com/v1}"
41+
api_key = "${env:OPENAI_API_KEY}"
42+
43+
[[models.embeddings]]
44+
name = "${env:EMBEDDING_MODEL_NAME:-text-embedding-3-small}"
45+
provider = "${env:EMBEDDING_MODEL_PROVIDER:-proxy/openai}"
46+
api_url = "${env:EMBEDDING_MODEL_API_URL:-https://api.openai.com/v1/embeddings}"
47+
api_key = "${env:OPENAI_API_KEY}"

Diff for: configs/dbgpt-graphrag.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ rerank_top_k=3
2626

2727
[rag.storage]
2828
[rag.storage.vector]
29-
type = "Chroma"
29+
type = "chroma"
3030
persist_path = "pilot/data"
3131

3232
[rag.storage.graph]
33-
type = "TuGraph"
33+
type = "tugraph"
3434
host="127.0.0.1"
3535
port=7687
3636
username="admin"

Diff for: configs/dbgpt-local-glm.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-local-llama-cpp-server.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-local-llama-cpp.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-local-qwen.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-local-vllm.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-proxy-deepseek.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ host = "127.0.0.1"
1717

1818
[rag.storage]
1919
[rag.storage.vector]
20-
type = "Chroma"
20+
type = "chroma"
2121
persist_path = "pilot/data"
2222

2323
# Model Configurations

Diff for: configs/dbgpt-proxy-ollama.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-proxy-openai.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: configs/dbgpt-proxy-siliconflow-mysql.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ host = "127.0.0.1"
2222

2323
[rag.storage]
2424
[rag.storage.vector]
25-
type = "Chroma"
25+
type = "chroma"
2626
persist_path = "pilot/data"
2727

2828
# Model Configurations

Diff for: configs/dbgpt-proxy-siliconflow.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ host = "127.0.0.1"
1717

1818
[rag.storage]
1919
[rag.storage.vector]
20-
type = "Chroma"
20+
type = "chroma"
2121
persist_path = "pilot/data"
2222

2323
# Model Configurations

Diff for: configs/dbgpt-proxy-tongyi.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "pilot/meta_data/dbgpt.db"
1515

1616
[rag.storage]
1717
[rag.storage.vector]
18-
type = "Chroma"
18+
type = "chroma"
1919
persist_path = "pilot/data"
2020

2121
# Model Configurations

Diff for: docker/base/Dockerfile

+17-6
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ ARG BASE_IMAGE
77
ARG PYTHON_VERSION=3.11
88
# Use Tsinghua PyPI mirror, It's faster in most countries
99
ARG PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
10+
ARG UV_TRUSTED_HOST="127.0.0.1"
1011
ARG UV_HTTP_TIMEOUT=180
1112
ARG EXTRAS="base,proxy_openai,rag,storage_chromadb,cuda121,hf,quant_bnb,dbgpts"
1213
ARG VERSION=latest
1314
ARG USE_TSINGHUA_UBUNTU
1415
ARG CMAKE_ARGS
16+
ARG INSTALL_RUST="true"
1517
ENV PYTHONUNBUFFERED=1 \
1618
DEBIAN_FRONTEND=noninteractive \
1719
LANG=C.UTF-8 \
1820
LC_ALL=C.UTF-8 \
1921
PIP_INDEX_URL=${PIP_INDEX_URL} \
22+
PIP_TRUSTED_HOST=${UV_TRUSTED_HOST} \
23+
UV_TRUSTED_HOST=${UV_TRUSTED_HOST} \
24+
UV_INSECURE_HOST=${UV_TRUSTED_HOST} \
2025
UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT} \
21-
CMAKE_ARGS=${CMAKE_ARGS}
26+
CMAKE_ARGS=${CMAKE_ARGS} \
27+
INSTALL_RUST=${INSTALL_RUST}
2228

2329
# Configure apt sources based on the USE_TSINGHUA_UBUNTU parameter
2430
RUN if [ "$USE_TSINGHUA_UBUNTU" = "true" ]; then \
@@ -43,14 +49,17 @@ RUN if [ "$USE_TSINGHUA_UBUNTU" = "true" ]; then \
4349
build-essential \
4450
pkg-config \
4551
&& rm -rf /var/lib/apt/lists/* \
46-
&& python${PYTHON_VERSION} -m pip install --upgrade pip \
47-
&& python${PYTHON_VERSION} -m pip install --upgrade pipx \
52+
&& python${PYTHON_VERSION} -m pip install --upgrade pip --trusted-host ${UV_TRUSTED_HOST} \
53+
&& python${PYTHON_VERSION} -m pip install --upgrade pipx --trusted-host ${UV_TRUSTED_HOST} \
4854
&& python${PYTHON_VERSION} -m pipx ensurepath \
4955
&& pipx ensurepath --global \
50-
&& pipx install uv --global
56+
&& pipx install uv --global --pip-args="--trusted-host ${UV_TRUSTED_HOST}"
5157

5258
# Install Rust toolchain for building lyric-py
53-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
59+
RUN if [ "$INSTALL_RUST" = "true" ]; then \
60+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
61+
fi
62+
5463
ENV PATH="/root/.cargo/bin:${PATH}"
5564

5665
WORKDIR /app
@@ -65,7 +74,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6574
extras=$(echo $EXTRAS | tr ',' '\n' | while read extra; do echo "--extra $extra"; done | tr '\n' ' ') && \
6675
uv sync --frozen --all-packages \
6776
--no-dev $extras \
68-
--index-url=$PIP_INDEX_URL && \
77+
--index-url=$PIP_INDEX_URL \
78+
--trusted-host=$UV_TRUSTED_HOST \
79+
&& \
6980
# Verify installation
7081
python -c "import dbgpt; print(dbgpt.__version__)"
7182
ARG LANGUAGE="en"

0 commit comments

Comments
 (0)