diff --git a/dsLightRag/Config/Config.py b/dsLightRag/Config/Config.py index a61f2d00..01d3f670 100644 --- a/dsLightRag/Config/Config.py +++ b/dsLightRag/Config/Config.py @@ -2,16 +2,17 @@ ALY_AK = 'LTAI5tE4tgpGcKWhbZg6C4bh' ALY_SK = 'oizcTOZ8izbGUouboC00RcmGE8vBQ1' -# 大模型 【DeepSeek深度求索官方】 -LLM_API_KEY = "sk-44ae895eeb614aa1a9c6460579e322f1" -LLM_BASE_URL = "https://api.deepseek.com" -LLM_MODEL_NAME = "deepseek-chat" +# 大模型 【DeepSeek深度求索官方】训练时用这个 +# LLM_API_KEY = "sk-44ae895eeb614aa1a9c6460579e322f1" +# LLM_BASE_URL = "https://api.deepseek.com" +# LLM_MODEL_NAME = "deepseek-chat" # 阿里云提供的大模型服务 【阿里云在处理文字材料时,容易引发绿网拦截,导致数据上报异常】 -#LLM_API_KEY = "sk-f6da0c787eff4b0389e4ad03a35a911f" -#LLM_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1" -#LLM_MODEL_NAME = "qwen-plus" # 不要使用通义千问,会导致化学方程式不正确! -#LLM_MODEL_NAME = "deepseek-v3" +LLM_API_KEY = "sk-f6da0c787eff4b0389e4ad03a35a911f" +LLM_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1" +# LLM_MODEL_NAME = "qwen-plus" # 不要使用通义千问,会导致化学方程式不正确! +# LLM_MODEL_NAME = "deepseek-v3" +LLM_MODEL_NAME = " deepseek-r1" # 使用更牛B的r1模型 EMBED_MODEL_NAME = "BAAI/bge-m3" EMBED_API_KEY = "sk-pbqibyjwhrgmnlsmdygplahextfaclgnedetybccknxojlyl" @@ -30,4 +31,4 @@ POSTGRES_HOST = "10.10.14.208" POSTGRES_PORT = 5432 POSTGRES_USER = "postgres" POSTGRES_PASSWORD = "postgres" -POSTGRES_DATABASE = "rag" \ No newline at end of file +POSTGRES_DATABASE = "rag" diff --git a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc index c0ac4cd3..cf22e239 100644 Binary files a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc and b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc differ diff --git a/dsLightRag/static/ShiJi.html b/dsLightRag/static/ShiJi.html index f1f89aa4..fe200d26 100644 --- a/dsLightRag/static/ShiJi.html +++ b/dsLightRag/static/ShiJi.html @@ -372,7 +372,18 @@ function generateRelation() { function processChunk() { return reader.read().then(({done, value}) => { - if (done) return; + if (done) { + // 在HTML内容完全接收后执行其中的脚本 + const scripts = answerArea.getElementsByTagName('script'); + for (let i = 0; i < scripts.length; i++) { + try { + eval(scripts[i].innerHTML); + } catch (e) { + console.error('脚本执行错误:', e); + } + } + return; + } buffer += decoder.decode(value, {stream: true}); const lines = buffer.split('\n'); @@ -388,7 +399,6 @@ function generateRelation() { accumulatedContent += data.reply; answerArea.innerHTML = marked.parse(accumulatedContent, markedOptions); MathJax.typesetPromise(); - // 添加自动滚动到最新的内容 answerArea.scrollTop = answerArea.scrollHeight; } } catch (e) {