From 2a86b3b5b06ac08b31b127625d513249dca31df8 Mon Sep 17 00:00:00 2001 From: carry Date: Tue, 15 Apr 2025 16:45:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(db):=20=E5=88=9D=E5=A7=8B=E5=8C=96=20prompt?= =?UTF-8?q?=20store=20=E6=97=B6=E6=8F=92=E5=85=A5=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E8=AE=B0=E5=BD=95=E7=9A=84=20ID=20=E4=BB=8E=200=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将初始化时插入的第一条记录的 ID 从 0 改为 1 - 修正了文档节选的变量名,从 {content} 改为 {document_slice} --- db/prompt_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/prompt_store.py b/db/prompt_store.py index f943ad5..5861068 100644 --- a/db/prompt_store.py +++ b/db/prompt_store.py @@ -44,12 +44,12 @@ def initialize_prompt_store(db: TinyDB) -> None: # 检查数据库是否为空 if not db.all(): # 如果数据库中没有数据 db.insert(promptTempleta( - id=0, + id=1, name="default", description="默认提示词模板", content="""项目名为:{project_name} 请依据以下该项目官方文档的部分内容,创造合适的对话数据集用于微调一个了解该项目的小模型的语料,要求兼顾文档中间尽可能多的信息点,使用中文 -文档节选:{content}""").model_dump()) +文档节选:{document_slice}""").model_dump()) # 如果数据库中已有数据,则跳过插入