From cc219ff648af74cbf73091f6c3da100768d501eb Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Fri, 22 Nov 2024 16:19:00 +0800 Subject: [PATCH] Fix agent session API (#3589) ### What problem does this PR solve? #3585 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- README.md | 6 +- README_id.md | 6 +- README_ja.md | 6 +- README_ko.md | 6 +- README_zh.md | 6 +- agent/component/base.py | 4 +- agent/component/generate.py | 2 +- agent/component/template.py | 2 +- agent/templates/interpreter.json | 73 +++---------------------- api/apps/sdk/session.py | 5 +- docs/guides/configure_knowledge_base.md | 2 +- docs/guides/manage_files.md | 2 +- docs/guides/upgrade_ragflow.mdx | 4 +- docs/quickstart.mdx | 6 +- 14 files changed, 36 insertions(+), 94 deletions(-) diff --git a/README.md b/README.md index 794d4e51f..141cc62b6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.13.0 + docker pull infiniflow/ragflow:v0.14.0 Latest Release @@ -176,14 +176,14 @@ releases! 🌟 ``` > - To download a RAGFlow slim Docker image of a specific version, update the `RAGFLOW_IMAGE` variable in * - *docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0-slim`. After + *docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0-slim`. After making this change, rerun the command above to initiate the download. > - To download the dev version of RAGFlow Docker image *including* embedding models and Python libraries, update the `RAGFLOW_IMAGE` variable in **docker/.env** to `RAGFLOW_IMAGE=infiniflow/ragflow:dev`. After making this change, rerun the command above to initiate the download. > - To download a specific version of RAGFlow Docker image *including* embedding models and Python libraries, update the `RAGFLOW_IMAGE` variable in **docker/.env** to your desired version. For example, - `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`. After making this change, rerun the command above to initiate the + `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`. After making this change, rerun the command above to initiate the download. > **NOTE:** A RAGFlow Docker image that includes embedding models and Python libraries is approximately 9GB in size diff --git a/README_id.md b/README_id.md index fe3cb7b5e..944620a45 100644 --- a/README_id.md +++ b/README_id.md @@ -20,7 +20,7 @@ Lencana Daring - docker pull infiniflow/ragflow:v0.13.0 + docker pull infiniflow/ragflow:v0.14.0 Rilis Terbaru @@ -169,14 +169,14 @@ Coba demo kami di [https://demo.ragflow.io](https://demo.ragflow.io). ``` > - Untuk mengunduh versi tertentu dari image Docker RAGFlow slim, perbarui variabel `RAGFlow_IMAGE` di * - *docker/.env** sesuai dengan versi yang diinginkan. Misalnya, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0-slim`. + *docker/.env** sesuai dengan versi yang diinginkan. Misalnya, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0-slim`. Setelah mengubah ini, jalankan ulang perintah di atas untuk memulai unduhan. > - Untuk mengunduh versi dev dari image Docker RAGFlow *termasuk* model embedding dan library Python, perbarui variabel `RAGFlow_IMAGE` di **docker/.env** menjadi `RAGFLOW_IMAGE=infiniflow/ragflow:dev`. Setelah mengubah ini, jalankan ulang perintah di atas untuk memulai unduhan. > - Untuk mengunduh versi tertentu dari image Docker RAGFlow *termasuk* model embedding dan library Python, perbarui variabel `RAGFlow_IMAGE` di **docker/.env** sesuai dengan versi yang diinginkan. Misalnya, - `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`. Setelah mengubah ini, jalankan ulang perintah di atas untuk memulai unduhan. + `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`. Setelah mengubah ini, jalankan ulang perintah di atas untuk memulai unduhan. > **CATATAN:** Image Docker RAGFlow yang mencakup model embedding dan library Python berukuran sekitar 9GB dan mungkin memerlukan waktu lebih lama untuk dimuat. diff --git a/README_ja.md b/README_ja.md index 8738a972c..79be5fbde 100644 --- a/README_ja.md +++ b/README_ja.md @@ -20,7 +20,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.13.0 + docker pull infiniflow/ragflow:v0.14.0 Latest Release @@ -148,9 +148,9 @@ $ docker compose -f docker-compose.yml up -d ``` - > - 特定のバージョンのRAGFlow slim Dockerイメージをダウンロードするには、**docker/.env**内の`RAGFlow_IMAGE`変数を希望のバージョンに更新します。例えば、`RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`とします。この変更を行った後、上記のコマンドを再実行してダウンロードを開始してください。 + > - 特定のバージョンのRAGFlow slim Dockerイメージをダウンロードするには、**docker/.env**内の`RAGFlow_IMAGE`変数を希望のバージョンに更新します。例えば、`RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`とします。この変更を行った後、上記のコマンドを再実行してダウンロードを開始してください。 > - RAGFlowの埋め込みモデルとPythonライブラリを含む開発版Dockerイメージをダウンロードするには、**docker/.env**内の`RAGFlow_IMAGE`変数を`RAGFLOW_IMAGE=infiniflow/ragflow:dev`に更新します。この変更を行った後、上記のコマンドを再実行してダウンロードを開始してください。 - > - 特定のバージョンのRAGFlow Dockerイメージ(埋め込みモデルとPythonライブラリを含む)をダウンロードするには、**docker/.env**内の`RAGFlow_IMAGE`変数を希望のバージョンに更新します。例えば、`RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`とします。この変更を行った後、上記のコマンドを再実行してダウンロードを開始してください。 + > - 特定のバージョンのRAGFlow Dockerイメージ(埋め込みモデルとPythonライブラリを含む)をダウンロードするには、**docker/.env**内の`RAGFlow_IMAGE`変数を希望のバージョンに更新します。例えば、`RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`とします。この変更を行った後、上記のコマンドを再実行してダウンロードを開始してください。 > **NOTE:** 埋め込みモデルとPythonライブラリを含むRAGFlow Dockerイメージのサイズは約9GBであり、読み込みにかなりの時間がかかる場合があります。 diff --git a/README_ko.md b/README_ko.md index e1b616b7d..e70a47f81 100644 --- a/README_ko.md +++ b/README_ko.md @@ -20,7 +20,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.13.0 + docker pull infiniflow/ragflow:v0.14.0 Latest Release @@ -152,9 +152,9 @@ $ docker compose -f docker-compose.yml up -d ``` - > - 특정 버전의 RAGFlow slim Docker 이미지를 다운로드하려면, **docker/.env**에서 `RAGFlow_IMAGE` 변수를 원하는 버전으로 업데이트하세요. 예를 들어, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0-slim`으로 설정합니다. 이 변경을 완료한 후, 위의 명령을 다시 실행하여 다운로드를 시작하세요. + > - 특정 버전의 RAGFlow slim Docker 이미지를 다운로드하려면, **docker/.env**에서 `RAGFlow_IMAGE` 변수를 원하는 버전으로 업데이트하세요. 예를 들어, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0-slim`으로 설정합니다. 이 변경을 완료한 후, 위의 명령을 다시 실행하여 다운로드를 시작하세요. > - RAGFlow의 임베딩 모델과 Python 라이브러리를 포함한 개발 버전 Docker 이미지를 다운로드하려면, **docker/.env**에서 `RAGFlow_IMAGE` 변수를 `RAGFLOW_IMAGE=infiniflow/ragflow:dev`로 업데이트하세요. 이 변경을 완료한 후, 위의 명령을 다시 실행하여 다운로드를 시작하세요. - > - 특정 버전의 RAGFlow Docker 이미지를 임베딩 모델과 Python 라이브러리를 포함하여 다운로드하려면, **docker/.env**에서 `RAGFlow_IMAGE` 변수를 원하는 버전으로 업데이트하세요. 예를 들어, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0` 로 설정합니다. 이 변경을 완료한 후, 위의 명령을 다시 실행하여 다운로드를 시작하세요. + > - 특정 버전의 RAGFlow Docker 이미지를 임베딩 모델과 Python 라이브러리를 포함하여 다운로드하려면, **docker/.env**에서 `RAGFlow_IMAGE` 변수를 원하는 버전으로 업데이트하세요. 예를 들어, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0` 로 설정합니다. 이 변경을 완료한 후, 위의 명령을 다시 실행하여 다운로드를 시작하세요. > **NOTE:** 임베딩 모델과 Python 라이브러리를 포함한 RAGFlow Docker 이미지의 크기는 약 9GB이며, 로드하는 데 상당히 오랜 시간이 걸릴 수 있습니다. diff --git a/README_zh.md b/README_zh.md index 6889261bd..8684f2fcc 100644 --- a/README_zh.md +++ b/README_zh.md @@ -20,7 +20,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.13.0 + docker pull infiniflow/ragflow:v0.14.0 Latest Release @@ -149,9 +149,9 @@ $ docker compose -f docker-compose.yml up -d ``` - > - 如果你想下载并运行特定版本的 RAGFlow slim Docker 镜像,请在 **docker/.env** 文件中找到 `RAGFLOW_IMAGE` 变量,将其改为对应版本。例如 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0-slim`,然后再运行上述命令。 + > - 如果你想下载并运行特定版本的 RAGFlow slim Docker 镜像,请在 **docker/.env** 文件中找到 `RAGFLOW_IMAGE` 变量,将其改为对应版本。例如 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0-slim`,然后再运行上述命令。 > - 如果您想安装内置 embedding 模型和 Python 库的 dev 版本的 Docker 镜像,需要将 **docker/.env** 文件中的 `RAGFLOW_IMAGE` 变量修改为: `RAGFLOW_IMAGE=infiniflow/ragflow:dev`。 - > - 如果您想安装内置 embedding 模型和 Python 库的指定版本的 RAGFlow Docker 镜像,需要将 **docker/.env** 文件中的 `RAGFLOW_IMAGE` 变量修改为: `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`。修改后,再运行上面的命令。 + > - 如果您想安装内置 embedding 模型和 Python 库的指定版本的 RAGFlow Docker 镜像,需要将 **docker/.env** 文件中的 `RAGFLOW_IMAGE` 变量修改为: `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`。修改后,再运行上面的命令。 > **注意:** 安装内置 embedding 模型和 Python 库的指定版本的 RAGFlow Docker 镜像大小约 9 GB,可能需要更长时间下载,请耐心等待。 4. 服务器启动成功后再次确认服务器状态: diff --git a/agent/component/base.py b/agent/component/base.py index 1aa9629e5..63d5f0d84 100644 --- a/agent/component/base.py +++ b/agent/component/base.py @@ -390,8 +390,8 @@ class ComponentBase(ABC): "inputs": {} }}""".format(self.component_name, self._param, - json.dumps(json.loads(str(self._param))["output"], ensure_ascii=False), - json.dumps(json.loads(str(self._param))["inputs"], ensure_ascii=False) + json.dumps(json.loads(str(self._param)).get("output", {}), ensure_ascii=False), + json.dumps(json.loads(str(self._param)).get("inputs", []), ensure_ascii=False) ) def __init__(self, canvas, id, param: ComponentParamBase): diff --git a/agent/component/generate.py b/agent/component/generate.py index c6640c889..14a65add1 100644 --- a/agent/component/generate.py +++ b/agent/component/generate.py @@ -145,7 +145,7 @@ class Generate(ComponentBase): else: retrieval_res = pd.DataFrame([]) for n, v in kwargs.items(): - prompt = re.sub(r"\{%s\}" % re.escape(n), str(v), prompt) + prompt = re.sub(r"\{%s\}" % re.escape(n), str(v).replace("\\", " "), prompt) if not self._param.inputs and prompt.find("{input}") >= 0: retrieval_res = self.get_input() diff --git a/agent/component/template.py b/agent/component/template.py index 06f84114e..896475294 100644 --- a/agent/component/template.py +++ b/agent/component/template.py @@ -79,7 +79,7 @@ class Template(ComponentBase): self._param.inputs.append({"component_id": para["component_id"], "content": kwargs[para["key"]]}) for n, v in kwargs.items(): - content = re.sub(r"\{%s\}" % re.escape(n), str(v), content) + content = re.sub(r"\{%s\}" % re.escape(n), str(v).replace("\\", " "), content) return Template.be_output(content) diff --git a/agent/templates/interpreter.json b/agent/templates/interpreter.json index 773dc0fab..7ea83d2dc 100644 --- a/agent/templates/interpreter.json +++ b/agent/templates/interpreter.json @@ -1,7 +1,7 @@ { "id": 4, "title": "Interpreter", - "description": "A simple interpreter that translates user input into a target language. Try 'Hi there => Spanish' to see the translation!", + "description": "Translation Agent: Agentic translation using reflection workflow.\n\nThis is inspired by Andrew NG's project: https://github.com/andrewyng/translation-agent\n\n", "canvas_type": "chatbot", "dsl": { "answer": [], @@ -13,10 +13,6 @@ "params": { "inputs": [], "message_history_window_size": 22, - "output": { - "content": "# Putin Approves New Russian Nuclear Deterrence Policy, China Responds\n\nDuring a regular press conference on November 20th, a reporter asked about two significant events: Russian President Vladimir Putin's approval of the new basic policy on Russia's nuclear deterrence, and the subsequent missile attack by Ukrainian forces on the Bryansk region of Russia. The reporter asked for China's position on these developments.\n\nOn November 19th, President Putin signed a decree approving the updated policy for Russia's nuclear deterrence. The document states that Russia views nuclear weapons as a means of deterrence and that their use would be an extreme measure taken under compulsion. On the same day, the Bryansk region was targeted by six U.S.-made missiles launched by Ukrainian forces. According to a report from the Russian Defense Ministry, all six missiles were intercepted by Russia's air defense systems, with debris falling within a military area in Bryansk.\n\nIn response to these events, Chinese Foreign Ministry spokesperson Lin Jian stated that we have noted the relevant reports. In the current context, all parties should remain calm and restrained, engaging in dialogue and consultation to jointly promote de-escalation and reduce strategic risks.\n\nLin emphasized that China's position on the Ukraine issue has been consistent and clear. China hopes that all parties will work towards easing tensions and pursuing political resolution of the Ukraine crisis. China remains committed to playing a constructive role in this regard.", - "reference": [] - }, "output_var_name": "output", "post_answers": [], "query": [] @@ -35,31 +31,10 @@ "params": { "cite": false, "frequency_penalty": 0.7, - "inputs": [ - { - "component_id": "begin@lang", - "content": "English" - }, - { - "component_id": "begin@file", - "content": "https://www.sohu.com/a/828560323_162522?edtsign=70AF5B785A09DF20C126EABC2EC4FB4ABA309622&edtcode=2PBU%2BTiMwCHq%2FwmFSXvzFA%3D%3D&scm=10001.663_14-200000.0.10006.&_f=index_cpc_1_0&spm=smpc.channel_258.block4_314_Y6ubu8_1_fd.11.1732094805514oPmAsKj_1090\n\u666e\u4eac\u6279\u51c6\u65b0\u7248\u4fc4\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\uff0c\u5916\u4ea4\u90e8\u56de\u5e94_\u5e03\u826f\u65af_\u7f8e\u5236_\u4e2d\u65b9\n\u3010\u73af\u7403\u65f6\u62a5-\u73af\u7403\u7f51\u62a5\u9053 \u8bb0\u8005 \u767d\u4e91\u6021\u3011\u572811\u670820\u65e5\u5916\u4ea4\u90e8\u4f8b\u884c\u8bb0\u8005\u4f1a\u4e0a\uff0c\u6709\u8bb0\u8005\u63d0\u95ee\u79f0\uff0c\u4fc4\u7f57\u65af\u603b\u7edf\u666e\u4eac19\u65e5\u7b7e\u7f72\u603b\u7edf\u4ee4\uff0c\u6279\u51c6\u65b0\u7248\u4fc4\u7f57\u65af\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\u3002\u6587\u4ef6\u79f0\uff0c\u4fc4\u7f57\u65af\u89c6\u6838\u6b66\u5668\u4e3a\u4e00\u79cd\u5a01\u6151\u624b\u6bb5\uff0c\u4f7f\u7528\u6838\u6b66\u5668\u662f\u6781\u7aef\u60c5\u51b5\u4e0b\u88ab\u8feb\u91c7\u53d6\u7684\u63aa\u65bd\u3002\u540c\u65e5\uff0c\u4fc4\u5e03\u826f\u65af\u514b\u5dde\u906d\u5230\u4e4c\u519b6\u679a\u7f8e\u5236\u5bfc\u5f39\u88ad\u51fb\u3002\u4fc4\u56fd\u9632\u90e8\u7684\u901a\u62a5\u79f0\uff0c\u7ecf\u786e\u8ba4\uff0c\u4e4c\u65b9\u4f7f\u7528\u7684\u662f\u7f8e\u5236\u9646\u519b\u6218\u672f\u5bfc\u5f39\u7cfb\u7edf\uff0c6\u679a\u5bfc\u5f39\u5168\u90e8\u88ab\u4fc4\u519b\u9632\u7a7a\u7cfb\u7edf\u62e6\u622a\uff0c\u5bfc\u5f39\u6b8b\u7247\u843d\u5165\u5e03\u826f\u65af\u514b\u5dde\u4e00\u5904\u519b\u4e8b\u533a\u57df\u5185\u3002\u4e2d\u65b9\u5bf9\u8fd9\u4e24\u4ef6\u4e8b\u60c5\u6709\u4f55\u8bc4\u8bba\uff1f\n\n\u5bf9\u6b64\uff0c\u4e2d\u56fd\u5916\u4ea4\u90e8\u53d1\u8a00\u4eba\u6797\u5251\u8868\u793a\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u4e86\u6709\u5173\u62a5\u9053\u3002\u5f53\u524d\u5f62\u52bf\u4e0b\uff0c\u5404\u65b9\u5e94\u5f53\u4fdd\u6301\u51b7\u9759\u514b\u5236\uff0c\u901a\u8fc7\u5bf9\u8bdd\u534f\u5546\u5171\u540c\u63a8\u52a8\u5c40\u52bf\u7f13\u548c\uff0c\u51cf\u5c11\u6218\u7565\u98ce\u9669\u3002\n\n\u6797\u5251\u5f3a\u8c03\uff0c\u5728\u4e4c\u514b\u5170\u95ee\u9898\u4e0a\uff0c\u4e2d\u65b9\u7684\u7acb\u573a\u662f\u4e00\u8d2f\u7684\u3001\u660e\u786e\u7684\u3002\u4e2d\u65b9\u5e0c\u671b\u5404\u65b9\u63a8\u52a8\u7f13\u548c\u5c40\u52bf\u3001\u81f4\u529b\u4e8e\u653f\u6cbb\u89e3\u51b3\u4e4c\u514b\u5170\u5371\u673a\u7684\u7acb\u573a\u6ca1\u6709\u6539\u53d8\uff0c\u5e76\u5c06\u7ee7\u7eed\u4e3a\u6b64\u53d1\u6325\u5efa\u8bbe\u6027\u4f5c\u7528\u3002 \u8fd4\u56de\u641c\u72d0\uff0c\u67e5\u770b\u66f4\u591a\n\n\u8d23\u4efb\u7f16\u8f91\uff1a \u6bb7\u745e\u6c11 UN949\n----\n" - }, - { - "component_id": "Generate:RichWordsDeny", - "content": " - # Putin Approves New Russian Nuclear Deterrence Policy, China Responds\n\nIn a recent routine press conference on November 20th, a reporter inquired about two significant events: Russian President Vladimir Putin's approval of the new basic policy on Russia's nuclear deterrence, and the subsequent missile attack by Ukrainian forces on the Bryansk region of Russia. The reporter sought China's stance on these developments.\n\nOn November 19th, President Putin signed a decree approving the updated policy for Russia's nuclear deterrence. The document states that Russia views nuclear weapons as a means of deterrence and that their use would be an extreme measure taken under compulsion. On the same day, the Bryansk region was targeted by six U.S.-made missiles launched by Ukrainian forces. According to a report from the Russian Defense Ministry, all six missiles were intercepted by Russia's air defense systems, with debris falling within a military area in Bryansk.\n\nIn response to these events, Chinese Foreign Ministry spokesperson Lin Jian stated that China has taken note of the relevant reports. In the current context, all parties should remain calm and restrained, engaging in dialogue and consultation to jointly promote de-escalation and reduce strategic risks.\n\nLin emphasized that China's position on the Ukraine issue has been consistent and clear. China hopes that all parties will work towards easing tensions and pursuing political resolution of the Ukraine crisis. China remains committed to playing a constructive role in this regard." - }, - { - "component_id": "Generate:SlimyFrogsArgue", - "content": " - 1. **Accuracy**: The translation incorrectly states \"Chinese Foreign Ministry spokesperson Lin Jian\" instead of \"Chinese Foreign Ministry spokesperson Lin Jian.\" The correct name is \"Lin Jian,\" not \"Lin Jian.\"\n\n2. **Fluency**: The phrase \"In a recent routine press conference on November 20th, a reporter inquired about two significant events\" can be more fluently translated as \"During a regular press conference on November 20th, a reporter asked about two significant events.\"\n\n3. **Fluency**: The sentence \"The reporter sought China's stance on these developments\" can be improved to read more naturally: \"The reporter asked for China's position on these developments.\"\n\n4. **Style**: The phrase \"China has taken note of the relevant reports\" could be more stylistically aligned with the source text by using: \"We have noted the relevant reports.\"\n\n5. **Terminology**: The term \"Bryansk region\" should be consistently used throughout the translation instead of switching between \"Bryansk region\" and \"Bryansk.\"" - } - ], + "inputs": [], "llm_id": "deepseek-chat@DeepSeek", "max_tokens": 0, "message_history_window_size": 12, - "output": { - "content": "# Putin Approves New Russian Nuclear Deterrence Policy, China Responds\n\nDuring a regular press conference on November 20th, a reporter asked about two significant events: Russian President Vladimir Putin's approval of the new basic policy on Russia's nuclear deterrence, and the subsequent missile attack by Ukrainian forces on the Bryansk region of Russia. The reporter asked for China's position on these developments.\n\nOn November 19th, President Putin signed a decree approving the updated policy for Russia's nuclear deterrence. The document states that Russia views nuclear weapons as a means of deterrence and that their use would be an extreme measure taken under compulsion. On the same day, the Bryansk region was targeted by six U.S.-made missiles launched by Ukrainian forces. According to a report from the Russian Defense Ministry, all six missiles were intercepted by Russia's air defense systems, with debris falling within a military area in Bryansk.\n\nIn response to these events, Chinese Foreign Ministry spokesperson Lin Jian stated that we have noted the relevant reports. In the current context, all parties should remain calm and restrained, engaging in dialogue and consultation to jointly promote de-escalation and reduce strategic risks.\n\nLin emphasized that China's position on the Ukraine issue has been consistent and clear. China hopes that all parties will work towards easing tensions and pursuing political resolution of the Ukraine crisis. China remains committed to playing a constructive role in this regard.", - "reference": [] - }, "output_var_name": "output", "parameters": [ { @@ -103,24 +78,10 @@ "params": { "cite": false, "frequency_penalty": 0.7, - "inputs": [ - { - "component_id": "begin@lang", - "content": "English" - }, - { - "component_id": "begin@file", - "content": "https://www.sohu.com/a/828560323_162522?edtsign=70AF5B785A09DF20C126EABC2EC4FB4ABA309622&edtcode=2PBU%2BTiMwCHq%2FwmFSXvzFA%3D%3D&scm=10001.663_14-200000.0.10006.&_f=index_cpc_1_0&spm=smpc.channel_258.block4_314_Y6ubu8_1_fd.11.1732094805514oPmAsKj_1090\n\u666e\u4eac\u6279\u51c6\u65b0\u7248\u4fc4\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\uff0c\u5916\u4ea4\u90e8\u56de\u5e94_\u5e03\u826f\u65af_\u7f8e\u5236_\u4e2d\u65b9\n\u3010\u73af\u7403\u65f6\u62a5-\u73af\u7403\u7f51\u62a5\u9053 \u8bb0\u8005 \u767d\u4e91\u6021\u3011\u572811\u670820\u65e5\u5916\u4ea4\u90e8\u4f8b\u884c\u8bb0\u8005\u4f1a\u4e0a\uff0c\u6709\u8bb0\u8005\u63d0\u95ee\u79f0\uff0c\u4fc4\u7f57\u65af\u603b\u7edf\u666e\u4eac19\u65e5\u7b7e\u7f72\u603b\u7edf\u4ee4\uff0c\u6279\u51c6\u65b0\u7248\u4fc4\u7f57\u65af\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\u3002\u6587\u4ef6\u79f0\uff0c\u4fc4\u7f57\u65af\u89c6\u6838\u6b66\u5668\u4e3a\u4e00\u79cd\u5a01\u6151\u624b\u6bb5\uff0c\u4f7f\u7528\u6838\u6b66\u5668\u662f\u6781\u7aef\u60c5\u51b5\u4e0b\u88ab\u8feb\u91c7\u53d6\u7684\u63aa\u65bd\u3002\u540c\u65e5\uff0c\u4fc4\u5e03\u826f\u65af\u514b\u5dde\u906d\u5230\u4e4c\u519b6\u679a\u7f8e\u5236\u5bfc\u5f39\u88ad\u51fb\u3002\u4fc4\u56fd\u9632\u90e8\u7684\u901a\u62a5\u79f0\uff0c\u7ecf\u786e\u8ba4\uff0c\u4e4c\u65b9\u4f7f\u7528\u7684\u662f\u7f8e\u5236\u9646\u519b\u6218\u672f\u5bfc\u5f39\u7cfb\u7edf\uff0c6\u679a\u5bfc\u5f39\u5168\u90e8\u88ab\u4fc4\u519b\u9632\u7a7a\u7cfb\u7edf\u62e6\u622a\uff0c\u5bfc\u5f39\u6b8b\u7247\u843d\u5165\u5e03\u826f\u65af\u514b\u5dde\u4e00\u5904\u519b\u4e8b\u533a\u57df\u5185\u3002\u4e2d\u65b9\u5bf9\u8fd9\u4e24\u4ef6\u4e8b\u60c5\u6709\u4f55\u8bc4\u8bba\uff1f\n\n\u5bf9\u6b64\uff0c\u4e2d\u56fd\u5916\u4ea4\u90e8\u53d1\u8a00\u4eba\u6797\u5251\u8868\u793a\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u4e86\u6709\u5173\u62a5\u9053\u3002\u5f53\u524d\u5f62\u52bf\u4e0b\uff0c\u5404\u65b9\u5e94\u5f53\u4fdd\u6301\u51b7\u9759\u514b\u5236\uff0c\u901a\u8fc7\u5bf9\u8bdd\u534f\u5546\u5171\u540c\u63a8\u52a8\u5c40\u52bf\u7f13\u548c\uff0c\u51cf\u5c11\u6218\u7565\u98ce\u9669\u3002\n\n\u6797\u5251\u5f3a\u8c03\uff0c\u5728\u4e4c\u514b\u5170\u95ee\u9898\u4e0a\uff0c\u4e2d\u65b9\u7684\u7acb\u573a\u662f\u4e00\u8d2f\u7684\u3001\u660e\u786e\u7684\u3002\u4e2d\u65b9\u5e0c\u671b\u5404\u65b9\u63a8\u52a8\u7f13\u548c\u5c40\u52bf\u3001\u81f4\u529b\u4e8e\u653f\u6cbb\u89e3\u51b3\u4e4c\u514b\u5170\u5371\u673a\u7684\u7acb\u573a\u6ca1\u6709\u6539\u53d8\uff0c\u5e76\u5c06\u7ee7\u7eed\u4e3a\u6b64\u53d1\u6325\u5efa\u8bbe\u6027\u4f5c\u7528\u3002 \u8fd4\u56de\u641c\u72d0\uff0c\u67e5\u770b\u66f4\u591a\n\n\u8d23\u4efb\u7f16\u8f91\uff1a \u6bb7\u745e\u6c11 UN949\n----\n" - } - ], + "inputs": [], "llm_id": "deepseek-chat@DeepSeek", "max_tokens": 0, "message_history_window_size": 12, - "output": { - "content": { - "0": "# Putin Approves New Russian Nuclear Deterrence Policy, China Responds\n\nIn a recent routine press conference on November 20th, a reporter inquired about two significant events: Russian President Vladimir Putin's approval of the new basic policy on Russia's nuclear deterrence, and the subsequent missile attack by Ukrainian forces on the Bryansk region of Russia. The reporter sought China's stance on these developments.\n\nOn November 19th, President Putin signed a decree approving the updated policy for Russia's nuclear deterrence. The document states that Russia views nuclear weapons as a means of deterrence and that their use would be an extreme measure taken under compulsion. On the same day, the Bryansk region was targeted by six U.S.-made missiles launched by Ukrainian forces. According to a report from the Russian Defense Ministry, all six missiles were intercepted by Russia's air defense systems, with debris falling within a military area in Bryansk.\n\nIn response to these events, Chinese Foreign Ministry spokesperson Lin Jian stated that China has taken note of the relevant reports. In the current context, all parties should remain calm and restrained, engaging in dialogue and consultation to jointly promote de-escalation and reduce strategic risks.\n\nLin emphasized that China's position on the Ukraine issue has been consistent and clear. China hopes that all parties will work towards easing tensions and pursuing political resolution of the Ukraine crisis. China remains committed to playing a constructive role in this regard." - } - }, "output_var_name": "output", "parameters": [ { @@ -154,28 +115,10 @@ "params": { "cite": false, "frequency_penalty": 0.7, - "inputs": [ - { - "component_id": "begin@lang", - "content": "English" - }, - { - "component_id": "begin@file", - "content": "https://www.sohu.com/a/828560323_162522?edtsign=70AF5B785A09DF20C126EABC2EC4FB4ABA309622&edtcode=2PBU%2BTiMwCHq%2FwmFSXvzFA%3D%3D&scm=10001.663_14-200000.0.10006.&_f=index_cpc_1_0&spm=smpc.channel_258.block4_314_Y6ubu8_1_fd.11.1732094805514oPmAsKj_1090\n\u666e\u4eac\u6279\u51c6\u65b0\u7248\u4fc4\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\uff0c\u5916\u4ea4\u90e8\u56de\u5e94_\u5e03\u826f\u65af_\u7f8e\u5236_\u4e2d\u65b9\n\u3010\u73af\u7403\u65f6\u62a5-\u73af\u7403\u7f51\u62a5\u9053 \u8bb0\u8005 \u767d\u4e91\u6021\u3011\u572811\u670820\u65e5\u5916\u4ea4\u90e8\u4f8b\u884c\u8bb0\u8005\u4f1a\u4e0a\uff0c\u6709\u8bb0\u8005\u63d0\u95ee\u79f0\uff0c\u4fc4\u7f57\u65af\u603b\u7edf\u666e\u4eac19\u65e5\u7b7e\u7f72\u603b\u7edf\u4ee4\uff0c\u6279\u51c6\u65b0\u7248\u4fc4\u7f57\u65af\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\u3002\u6587\u4ef6\u79f0\uff0c\u4fc4\u7f57\u65af\u89c6\u6838\u6b66\u5668\u4e3a\u4e00\u79cd\u5a01\u6151\u624b\u6bb5\uff0c\u4f7f\u7528\u6838\u6b66\u5668\u662f\u6781\u7aef\u60c5\u51b5\u4e0b\u88ab\u8feb\u91c7\u53d6\u7684\u63aa\u65bd\u3002\u540c\u65e5\uff0c\u4fc4\u5e03\u826f\u65af\u514b\u5dde\u906d\u5230\u4e4c\u519b6\u679a\u7f8e\u5236\u5bfc\u5f39\u88ad\u51fb\u3002\u4fc4\u56fd\u9632\u90e8\u7684\u901a\u62a5\u79f0\uff0c\u7ecf\u786e\u8ba4\uff0c\u4e4c\u65b9\u4f7f\u7528\u7684\u662f\u7f8e\u5236\u9646\u519b\u6218\u672f\u5bfc\u5f39\u7cfb\u7edf\uff0c6\u679a\u5bfc\u5f39\u5168\u90e8\u88ab\u4fc4\u519b\u9632\u7a7a\u7cfb\u7edf\u62e6\u622a\uff0c\u5bfc\u5f39\u6b8b\u7247\u843d\u5165\u5e03\u826f\u65af\u514b\u5dde\u4e00\u5904\u519b\u4e8b\u533a\u57df\u5185\u3002\u4e2d\u65b9\u5bf9\u8fd9\u4e24\u4ef6\u4e8b\u60c5\u6709\u4f55\u8bc4\u8bba\uff1f\n\n\u5bf9\u6b64\uff0c\u4e2d\u56fd\u5916\u4ea4\u90e8\u53d1\u8a00\u4eba\u6797\u5251\u8868\u793a\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u4e86\u6709\u5173\u62a5\u9053\u3002\u5f53\u524d\u5f62\u52bf\u4e0b\uff0c\u5404\u65b9\u5e94\u5f53\u4fdd\u6301\u51b7\u9759\u514b\u5236\uff0c\u901a\u8fc7\u5bf9\u8bdd\u534f\u5546\u5171\u540c\u63a8\u52a8\u5c40\u52bf\u7f13\u548c\uff0c\u51cf\u5c11\u6218\u7565\u98ce\u9669\u3002\n\n\u6797\u5251\u5f3a\u8c03\uff0c\u5728\u4e4c\u514b\u5170\u95ee\u9898\u4e0a\uff0c\u4e2d\u65b9\u7684\u7acb\u573a\u662f\u4e00\u8d2f\u7684\u3001\u660e\u786e\u7684\u3002\u4e2d\u65b9\u5e0c\u671b\u5404\u65b9\u63a8\u52a8\u7f13\u548c\u5c40\u52bf\u3001\u81f4\u529b\u4e8e\u653f\u6cbb\u89e3\u51b3\u4e4c\u514b\u5170\u5371\u673a\u7684\u7acb\u573a\u6ca1\u6709\u6539\u53d8\uff0c\u5e76\u5c06\u7ee7\u7eed\u4e3a\u6b64\u53d1\u6325\u5efa\u8bbe\u6027\u4f5c\u7528\u3002 \u8fd4\u56de\u641c\u72d0\uff0c\u67e5\u770b\u66f4\u591a\n\n\u8d23\u4efb\u7f16\u8f91\uff1a \u6bb7\u745e\u6c11 UN949\n----\n" - }, - { - "component_id": "Generate:RichWordsDeny", - "content": " - # Putin Approves New Russian Nuclear Deterrence Policy, China Responds\n\nIn a recent routine press conference on November 20th, a reporter inquired about two significant events: Russian President Vladimir Putin's approval of the new basic policy on Russia's nuclear deterrence, and the subsequent missile attack by Ukrainian forces on the Bryansk region of Russia. The reporter sought China's stance on these developments.\n\nOn November 19th, President Putin signed a decree approving the updated policy for Russia's nuclear deterrence. The document states that Russia views nuclear weapons as a means of deterrence and that their use would be an extreme measure taken under compulsion. On the same day, the Bryansk region was targeted by six U.S.-made missiles launched by Ukrainian forces. According to a report from the Russian Defense Ministry, all six missiles were intercepted by Russia's air defense systems, with debris falling within a military area in Bryansk.\n\nIn response to these events, Chinese Foreign Ministry spokesperson Lin Jian stated that China has taken note of the relevant reports. In the current context, all parties should remain calm and restrained, engaging in dialogue and consultation to jointly promote de-escalation and reduce strategic risks.\n\nLin emphasized that China's position on the Ukraine issue has been consistent and clear. China hopes that all parties will work towards easing tensions and pursuing political resolution of the Ukraine crisis. China remains committed to playing a constructive role in this regard." - } - ], + "inputs": [], "llm_id": "deepseek-chat@DeepSeek", "max_tokens": 0, "message_history_window_size": 12, - "output": { - "content": { - "0": "1. **Accuracy**: The translation incorrectly states \"Chinese Foreign Ministry spokesperson Lin Jian\" instead of \"Chinese Foreign Ministry spokesperson Lin Jian.\" The correct name is \"Lin Jian,\" not \"Lin Jian.\"\n\n2. **Fluency**: The phrase \"In a recent routine press conference on November 20th, a reporter inquired about two significant events\" can be more fluently translated as \"During a regular press conference on November 20th, a reporter asked about two significant events.\"\n\n3. **Fluency**: The sentence \"The reporter sought China's stance on these developments\" can be improved to read more naturally: \"The reporter asked for China's position on these developments.\"\n\n4. **Style**: The phrase \"China has taken note of the relevant reports\" could be more stylistically aligned with the source text by using: \"We have noted the relevant reports.\"\n\n5. **Terminology**: The term \"Bryansk region\" should be consistently used throughout the translation instead of switching between \"Bryansk region\" and \"Bryansk.\"" - } - }, "output_var_name": "output", "parameters": [ { @@ -223,14 +166,14 @@ "name": "Target Language", "optional": false, "type": "line", - "value": "English" + "value": "" }, { "key": "file", "name": "Files", "optional": false, "type": "file", - "value": "https://www.sohu.com/a/828560323_162522?edtsign=70AF5B785A09DF20C126EABC2EC4FB4ABA309622&edtcode=2PBU%2BTiMwCHq%2FwmFSXvzFA%3D%3D&scm=10001.663_14-200000.0.10006.&_f=index_cpc_1_0&spm=smpc.channel_258.block4_314_Y6ubu8_1_fd.11.1732094805514oPmAsKj_1090\n\u666e\u4eac\u6279\u51c6\u65b0\u7248\u4fc4\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\uff0c\u5916\u4ea4\u90e8\u56de\u5e94_\u5e03\u826f\u65af_\u7f8e\u5236_\u4e2d\u65b9\n\u3010\u73af\u7403\u65f6\u62a5-\u73af\u7403\u7f51\u62a5\u9053 \u8bb0\u8005 \u767d\u4e91\u6021\u3011\u572811\u670820\u65e5\u5916\u4ea4\u90e8\u4f8b\u884c\u8bb0\u8005\u4f1a\u4e0a\uff0c\u6709\u8bb0\u8005\u63d0\u95ee\u79f0\uff0c\u4fc4\u7f57\u65af\u603b\u7edf\u666e\u4eac19\u65e5\u7b7e\u7f72\u603b\u7edf\u4ee4\uff0c\u6279\u51c6\u65b0\u7248\u4fc4\u7f57\u65af\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\u3002\u6587\u4ef6\u79f0\uff0c\u4fc4\u7f57\u65af\u89c6\u6838\u6b66\u5668\u4e3a\u4e00\u79cd\u5a01\u6151\u624b\u6bb5\uff0c\u4f7f\u7528\u6838\u6b66\u5668\u662f\u6781\u7aef\u60c5\u51b5\u4e0b\u88ab\u8feb\u91c7\u53d6\u7684\u63aa\u65bd\u3002\u540c\u65e5\uff0c\u4fc4\u5e03\u826f\u65af\u514b\u5dde\u906d\u5230\u4e4c\u519b6\u679a\u7f8e\u5236\u5bfc\u5f39\u88ad\u51fb\u3002\u4fc4\u56fd\u9632\u90e8\u7684\u901a\u62a5\u79f0\uff0c\u7ecf\u786e\u8ba4\uff0c\u4e4c\u65b9\u4f7f\u7528\u7684\u662f\u7f8e\u5236\u9646\u519b\u6218\u672f\u5bfc\u5f39\u7cfb\u7edf\uff0c6\u679a\u5bfc\u5f39\u5168\u90e8\u88ab\u4fc4\u519b\u9632\u7a7a\u7cfb\u7edf\u62e6\u622a\uff0c\u5bfc\u5f39\u6b8b\u7247\u843d\u5165\u5e03\u826f\u65af\u514b\u5dde\u4e00\u5904\u519b\u4e8b\u533a\u57df\u5185\u3002\u4e2d\u65b9\u5bf9\u8fd9\u4e24\u4ef6\u4e8b\u60c5\u6709\u4f55\u8bc4\u8bba\uff1f\n\n\u5bf9\u6b64\uff0c\u4e2d\u56fd\u5916\u4ea4\u90e8\u53d1\u8a00\u4eba\u6797\u5251\u8868\u793a\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u4e86\u6709\u5173\u62a5\u9053\u3002\u5f53\u524d\u5f62\u52bf\u4e0b\uff0c\u5404\u65b9\u5e94\u5f53\u4fdd\u6301\u51b7\u9759\u514b\u5236\uff0c\u901a\u8fc7\u5bf9\u8bdd\u534f\u5546\u5171\u540c\u63a8\u52a8\u5c40\u52bf\u7f13\u548c\uff0c\u51cf\u5c11\u6218\u7565\u98ce\u9669\u3002\n\n\u6797\u5251\u5f3a\u8c03\uff0c\u5728\u4e4c\u514b\u5170\u95ee\u9898\u4e0a\uff0c\u4e2d\u65b9\u7684\u7acb\u573a\u662f\u4e00\u8d2f\u7684\u3001\u660e\u786e\u7684\u3002\u4e2d\u65b9\u5e0c\u671b\u5404\u65b9\u63a8\u52a8\u7f13\u548c\u5c40\u52bf\u3001\u81f4\u529b\u4e8e\u653f\u6cbb\u89e3\u51b3\u4e4c\u514b\u5170\u5371\u673a\u7684\u7acb\u573a\u6ca1\u6709\u6539\u53d8\uff0c\u5e76\u5c06\u7ee7\u7eed\u4e3a\u6b64\u53d1\u6325\u5efa\u8bbe\u6027\u4f5c\u7528\u3002 \u8fd4\u56de\u641c\u72d0\uff0c\u67e5\u770b\u66f4\u591a\n\n\u8d23\u4efb\u7f16\u8f91\uff1a \u6bb7\u745e\u6c11 UN949\n----\n" + "value": "" } ] } @@ -305,14 +248,14 @@ "name": "Target Language", "optional": false, "type": "line", - "value": "English" + "value": "" }, { "key": "file", "name": "Files", "optional": false, "type": "file", - "value": "https://www.sohu.com/a/828560323_162522?edtsign=70AF5B785A09DF20C126EABC2EC4FB4ABA309622&edtcode=2PBU%2BTiMwCHq%2FwmFSXvzFA%3D%3D&scm=10001.663_14-200000.0.10006.&_f=index_cpc_1_0&spm=smpc.channel_258.block4_314_Y6ubu8_1_fd.11.1732094805514oPmAsKj_1090\n\u666e\u4eac\u6279\u51c6\u65b0\u7248\u4fc4\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\uff0c\u5916\u4ea4\u90e8\u56de\u5e94_\u5e03\u826f\u65af_\u7f8e\u5236_\u4e2d\u65b9\n\u3010\u73af\u7403\u65f6\u62a5-\u73af\u7403\u7f51\u62a5\u9053 \u8bb0\u8005 \u767d\u4e91\u6021\u3011\u572811\u670820\u65e5\u5916\u4ea4\u90e8\u4f8b\u884c\u8bb0\u8005\u4f1a\u4e0a\uff0c\u6709\u8bb0\u8005\u63d0\u95ee\u79f0\uff0c\u4fc4\u7f57\u65af\u603b\u7edf\u666e\u4eac19\u65e5\u7b7e\u7f72\u603b\u7edf\u4ee4\uff0c\u6279\u51c6\u65b0\u7248\u4fc4\u7f57\u65af\u6838\u5a01\u6151\u56fd\u5bb6\u57fa\u672c\u653f\u7b56\u3002\u6587\u4ef6\u79f0\uff0c\u4fc4\u7f57\u65af\u89c6\u6838\u6b66\u5668\u4e3a\u4e00\u79cd\u5a01\u6151\u624b\u6bb5\uff0c\u4f7f\u7528\u6838\u6b66\u5668\u662f\u6781\u7aef\u60c5\u51b5\u4e0b\u88ab\u8feb\u91c7\u53d6\u7684\u63aa\u65bd\u3002\u540c\u65e5\uff0c\u4fc4\u5e03\u826f\u65af\u514b\u5dde\u906d\u5230\u4e4c\u519b6\u679a\u7f8e\u5236\u5bfc\u5f39\u88ad\u51fb\u3002\u4fc4\u56fd\u9632\u90e8\u7684\u901a\u62a5\u79f0\uff0c\u7ecf\u786e\u8ba4\uff0c\u4e4c\u65b9\u4f7f\u7528\u7684\u662f\u7f8e\u5236\u9646\u519b\u6218\u672f\u5bfc\u5f39\u7cfb\u7edf\uff0c6\u679a\u5bfc\u5f39\u5168\u90e8\u88ab\u4fc4\u519b\u9632\u7a7a\u7cfb\u7edf\u62e6\u622a\uff0c\u5bfc\u5f39\u6b8b\u7247\u843d\u5165\u5e03\u826f\u65af\u514b\u5dde\u4e00\u5904\u519b\u4e8b\u533a\u57df\u5185\u3002\u4e2d\u65b9\u5bf9\u8fd9\u4e24\u4ef6\u4e8b\u60c5\u6709\u4f55\u8bc4\u8bba\uff1f\n\n\u5bf9\u6b64\uff0c\u4e2d\u56fd\u5916\u4ea4\u90e8\u53d1\u8a00\u4eba\u6797\u5251\u8868\u793a\uff0c\u6211\u4eec\u6ce8\u610f\u5230\u4e86\u6709\u5173\u62a5\u9053\u3002\u5f53\u524d\u5f62\u52bf\u4e0b\uff0c\u5404\u65b9\u5e94\u5f53\u4fdd\u6301\u51b7\u9759\u514b\u5236\uff0c\u901a\u8fc7\u5bf9\u8bdd\u534f\u5546\u5171\u540c\u63a8\u52a8\u5c40\u52bf\u7f13\u548c\uff0c\u51cf\u5c11\u6218\u7565\u98ce\u9669\u3002\n\n\u6797\u5251\u5f3a\u8c03\uff0c\u5728\u4e4c\u514b\u5170\u95ee\u9898\u4e0a\uff0c\u4e2d\u65b9\u7684\u7acb\u573a\u662f\u4e00\u8d2f\u7684\u3001\u660e\u786e\u7684\u3002\u4e2d\u65b9\u5e0c\u671b\u5404\u65b9\u63a8\u52a8\u7f13\u548c\u5c40\u52bf\u3001\u81f4\u529b\u4e8e\u653f\u6cbb\u89e3\u51b3\u4e4c\u514b\u5170\u5371\u673a\u7684\u7acb\u573a\u6ca1\u6709\u6539\u53d8\uff0c\u5e76\u5c06\u7ee7\u7eed\u4e3a\u6b64\u53d1\u6325\u5efa\u8bbe\u6027\u4f5c\u7528\u3002 \u8fd4\u56de\u641c\u72d0\uff0c\u67e5\u770b\u66f4\u591a\n\n\u8d23\u4efb\u7f16\u8f91\uff1a \u6bb7\u745e\u6c11 UN949\n----\n" + "value": "" } ] }, diff --git a/api/apps/sdk/session.py b/api/apps/sdk/session.py index 7d376bdfd..522c3028f 100644 --- a/api/apps/sdk/session.py +++ b/api/apps/sdk/session.py @@ -77,7 +77,7 @@ def create_agent_session(tenant_id, agent_id): conv = { "id": get_uuid(), "dialog_id": cvs.id, - "user_id": req.get("usr_id",""), + "user_id": req.get("usr_id","") if isinstance(req, dict) else "", "message": [{"role": "assistant", "content": canvas.get_prologue()}], "source": "agent" } @@ -345,7 +345,7 @@ def agent_completion(tenant_id, agent_id): API4ConversationService.append_message(conv.id, conv.to_dict()) except Exception as e: cvs.dsl = json.loads(str(canvas)) - UserCanvasService.update_by_id(req["id"], cvs.to_dict()) + API4ConversationService.append_message(conv.id, conv.to_dict()) yield "data:" + json.dumps({"code": 500, "message": str(e), "data": {"answer": "**ERROR**: " + str(e), "reference": []}}, ensure_ascii=False) + "\n\n" @@ -365,7 +365,6 @@ def agent_completion(tenant_id, agent_id): if final_ans.get("reference"): canvas.reference.append(final_ans["reference"]) cvs.dsl = json.loads(str(canvas)) - UserCanvasService.update_by_id(req["id"], cvs.to_dict()) result = {"answer": final_ans["content"], "reference": final_ans.get("reference", [])} fillin_conv(result) diff --git a/docs/guides/configure_knowledge_base.md b/docs/guides/configure_knowledge_base.md index d1f627e99..aef6ad516 100644 --- a/docs/guides/configure_knowledge_base.md +++ b/docs/guides/configure_knowledge_base.md @@ -128,7 +128,7 @@ RAGFlow uses multiple recall of both full-text search and vector search in its c ## Search for knowledge base -As of RAGFlow v0.13.0, the search feature is still in a rudimentary form, supporting only knowledge base search by name. +As of RAGFlow v0.14.0, the search feature is still in a rudimentary form, supporting only knowledge base search by name. ![search knowledge base](https://github.com/infiniflow/ragflow/assets/93570324/836ae94c-2438-42be-879e-c7ad2a59693e) diff --git a/docs/guides/manage_files.md b/docs/guides/manage_files.md index 7a073932e..23c296f2e 100644 --- a/docs/guides/manage_files.md +++ b/docs/guides/manage_files.md @@ -81,4 +81,4 @@ RAGFlow's file management allows you to download an uploaded file: ![download_file](https://github.com/infiniflow/ragflow/assets/93570324/cf3b297f-7d9b-4522-bf5f-4f45743e4ed5) -> As of RAGFlow v0.13.0, bulk download is not supported, nor can you download an entire folder. +> As of RAGFlow v0.14.0, bulk download is not supported, nor can you download an entire folder. diff --git a/docs/guides/upgrade_ragflow.mdx b/docs/guides/upgrade_ragflow.mdx index 9bc562400..381ec6934 100644 --- a/docs/guides/upgrade_ragflow.mdx +++ b/docs/guides/upgrade_ragflow.mdx @@ -36,10 +36,10 @@ import TabItem from '@theme/TabItem'; git clone https://github.com/infiniflow/ragflow.git ``` -2. Switch to the latest, officially published release, e.g., `v0.13.0`: +2. Switch to the latest, officially published release, e.g., `v0.14.0`: ```bash - git checkout v0.13.0 + git checkout v0.14.0 ``` 3. Update **ragflow/docker/.env** as follows: diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index c81aadf83..a71861aef 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -34,7 +34,7 @@ This section provides instructions on setting up the RAGFlow server on Linux. If `vm.max_map_count`. This value sets the maximum number of memory map areas a process may have. Its default value is 65530. While most applications require fewer than a thousand maps, reducing this value can result in abmornal behaviors, and the system will throw out-of-memory errors when a process reaches the limitation. - RAGFlow v0.13.0 uses Elasticsearch for multiple recall. Setting the value of `vm.max_map_count` correctly is crucial to the proper functioning of the Elasticsearch component. + RAGFlow v0.14.0 uses Elasticsearch for multiple recall. Setting the value of `vm.max_map_count` correctly is crucial to the proper functioning of the Elasticsearch component. - To download a RAGFlow slim Docker image of a specific version, update the `RAGFlow_IMAGE` variable in **docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0-slim`. After making this change, rerun the command above to initiate the download. + > - To download a RAGFlow slim Docker image of a specific version, update the `RAGFlow_IMAGE` variable in **docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0-slim`. After making this change, rerun the command above to initiate the download. > - To download the dev version of RAGFlow Docker image *including* embedding models and Python libraries, update the `RAGFlow_IMAGE` variable in **docker/.env** to `RAGFLOW_IMAGE=infiniflow/ragflow:dev`. After making this change, rerun the command above to initiate the download. - > - To download a specific version of RAGFlow Docker image *including* embedding models and Python libraries, update the `RAGFlow_IMAGE` variable in **docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.13.0`. After making this change, rerun the command above to initiate the download. + > - To download a specific version of RAGFlow Docker image *including* embedding models and Python libraries, update the `RAGFlow_IMAGE` variable in **docker/.env** to your desired version. For example, `RAGFLOW_IMAGE=infiniflow/ragflow:v0.14.0`. After making this change, rerun the command above to initiate the download. :::tip NOTE A RAGFlow Docker image that includes embedding models and Python libraries is approximately 9GB in size and may take significantly longer time to load.