From 223850ce4652bed19e5bb3ef1e31a67e237a6e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Thu, 12 Sep 2024 14:35:34 +0800 Subject: [PATCH] feat: chat_id --- metagpt/tools/libs/index_repo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metagpt/tools/libs/index_repo.py b/metagpt/tools/libs/index_repo.py index c349fb53e..f0c7cba9d 100644 --- a/metagpt/tools/libs/index_repo.py +++ b/metagpt/tools/libs/index_repo.py @@ -46,7 +46,7 @@ class TextScore(BaseModel): class IndexRepo(BaseModel): persist_path: str = DEFAULT_INDEX_ROOT # The persist path of the index repo, `/data/.index/uploads/` or `/data/.index/chats/{chat_id}/` root_path: str = ( - DEFAULT_ROOT # `/data/uploads` or r`/data/chats/\d+`, the root path of files indexed by the index repo. + DEFAULT_ROOT # `/data/uploads` or r`/data/chats/[a-z0-9]+`, the root path of files indexed by the index repo. ) fingerprint_filename: str = "fingerprint.json" meta_filename: str = "meta.json" @@ -328,7 +328,7 @@ class IndexRepo(BaseModel): """ mappings = { UPLOADS_INDEX_ROOT: re.compile(r"^/data/uploads($|/.*)"), - CHATS_INDEX_ROOT: re.compile(r"^/data/chats/\d+($|/.*)"), + CHATS_INDEX_ROOT: re.compile(r"^/data/chats/[a-z0-9]+($|/.*)"), } clusters = {}