mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-21 11:29:15 +00:00
Bugfix(RAG):handle exceptions in aload_document_with_limit results (#2712)
This commit is contained in:
parent
f79f81ccc3
commit
cbc28ea335
@ -2,7 +2,7 @@ FROM eosphorosai/dbgpt-full:latest
|
|||||||
ARG PYTHON_VERSION=3.11
|
ARG PYTHON_VERSION=3.11
|
||||||
ARG PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
|
ARG PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
|
||||||
ARG USERNAME
|
ARG USERNAME
|
||||||
ARG EXTRAS="base,proxy_openai,rag,storage_chromadb, storage_elasticsearch,cuda121,hf,quant_bnb,dbgpts"
|
ARG EXTRAS="base,proxy_openai,graph_rag,rag,storage_chromadb, storage_elasticsearch,cuda121,hf,quant_bnb,dbgpts"
|
||||||
ARG DEFAULT_VENV=/opt/.uv.venv
|
ARG DEFAULT_VENV=/opt/.uv.venv
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -22,6 +22,11 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python${PYTHON_VERSION}-dev \
|
python${PYTHON_VERSION}-dev \
|
||||||
default-libmysqlclient-dev \
|
default-libmysqlclient-dev \
|
||||||
ssh zsh autojump curl git-flow vim sudo \
|
ssh zsh autojump curl git-flow vim sudo \
|
||||||
|
fonts-wqy-microhei fonts-noto-cjk \
|
||||||
|
locales \
|
||||||
|
&& sed -i '/zh_CN.UTF-8/s/^# //g' /etc/locale.gen \
|
||||||
|
&& locale-gen zh_CN.UTF-8 \
|
||||||
|
&& update-locale LANG=zh_CN.UTF-8 \
|
||||||
&& python${PYTHON_VERSION} -m pip install --upgrade pip \
|
&& python${PYTHON_VERSION} -m pip install --upgrade pip \
|
||||||
&& python${PYTHON_VERSION} -m pip install --upgrade pipx \
|
&& python${PYTHON_VERSION} -m pip install --upgrade pipx \
|
||||||
&& pipx install -i $PIP_INDEX_URL uv --global \
|
&& pipx install -i $PIP_INDEX_URL uv --global \
|
||||||
@ -35,7 +40,9 @@ ENV UV_LINK_MODE=copy \
|
|||||||
UV_PROJECT_ENVIRONMENT=$DEFAULT_VENV \
|
UV_PROJECT_ENVIRONMENT=$DEFAULT_VENV \
|
||||||
UV_PYTHON=$DEFAULT_VENV/bin/python3 \
|
UV_PYTHON=$DEFAULT_VENV/bin/python3 \
|
||||||
UV_INDEX=$PIP_INDEX_URL \
|
UV_INDEX=$PIP_INDEX_URL \
|
||||||
UV_DEFAULT_INDEX=$PIP_INDEX_URL
|
UV_DEFAULT_INDEX=$PIP_INDEX_URL \
|
||||||
|
LANG=zh_CN.UTF-8 \
|
||||||
|
LC_ALL=zh_CN.UTF-8
|
||||||
|
|
||||||
RUN sed -i "s|/app/\.venv|${FINAL_VENV_NAME}|g" /${DEFAULT_VENV}/bin/activate && \
|
RUN sed -i "s|/app/\.venv|${FINAL_VENV_NAME}|g" /${DEFAULT_VENV}/bin/activate && \
|
||||||
pip config set global.index-url $PIP_INDEX_URL && \
|
pip config set global.index-url $PIP_INDEX_URL && \
|
||||||
|
@ -44,7 +44,8 @@ export ZSH="\$HOME/.oh-my-zsh"
|
|||||||
ZSH_THEME="robbyrussell"
|
ZSH_THEME="robbyrussell"
|
||||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump)
|
plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump)
|
||||||
source \$ZSH/oh-my-zsh.sh
|
source \$ZSH/oh-my-zsh.sh
|
||||||
|
export LANG=zh_CN.UTF-8
|
||||||
|
export LC_ALL=zh_CN.UTF-8
|
||||||
# Enable autojump
|
# Enable autojump
|
||||||
[[ -s /usr/share/autojump/autojump.sh ]] && source /usr/share/autojump/autojump.sh
|
[[ -s /usr/share/autojump/autojump.sh ]] && source /usr/share/autojump/autojump.sh
|
||||||
EOF
|
EOF
|
||||||
|
@ -187,7 +187,11 @@ class IndexStoreBase(ABC):
|
|||||||
|
|
||||||
ids = []
|
ids = []
|
||||||
loaded_cnt = 0
|
loaded_cnt = 0
|
||||||
for success_ids in results:
|
for idx, success_ids in enumerate(results):
|
||||||
|
if isinstance(success_ids, Exception):
|
||||||
|
raise RuntimeError(
|
||||||
|
f"Failed to load chunk group {idx + 1}: {str(success_ids)}"
|
||||||
|
) from success_ids
|
||||||
ids.extend(success_ids)
|
ids.extend(success_ids)
|
||||||
loaded_cnt += len(success_ids)
|
loaded_cnt += len(success_ids)
|
||||||
logger.info(f"Loaded {loaded_cnt} chunks, total {len(chunks)} chunks.")
|
logger.info(f"Loaded {loaded_cnt} chunks, total {len(chunks)} chunks.")
|
||||||
|
Loading…
Reference in New Issue
Block a user