diff --git a/README.md b/README.md
index 25e2e02..a7d3ee2 100644
--- a/README.md
+++ b/README.md
@@ -11,8 +11,9 @@
## 🚀 特性
-- 🚀 2023/04/19 增加web search功能,需要确保网络畅通!
-- 🚀 2023/04/18 webui增加知识库选择功能
+- 🐯 2023/04/19 引入ChuanhuChatGPT皮肤
+- 📱 2023/04/19 增加web search功能,需要确保网络畅通!
+- 📚 2023/04/18 webui增加知识库选择功能
- 🚀 2023/04/18 修复推理预测超时5s报错问题
- 🎉 2023/04/17 支持多种文档上传与内容解析:pdf、docx,ppt等
- 🎉 2023/04/17 支持知识增量更新
diff --git a/app_modules/__pycache__/presets.cpython-310.pyc b/app_modules/__pycache__/presets.cpython-310.pyc
new file mode 100644
index 0000000..8e7a651
Binary files /dev/null and b/app_modules/__pycache__/presets.cpython-310.pyc differ
diff --git a/app_modules/__pycache__/presets.cpython-39.pyc b/app_modules/__pycache__/presets.cpython-39.pyc
new file mode 100644
index 0000000..e7176c1
Binary files /dev/null and b/app_modules/__pycache__/presets.cpython-39.pyc differ
diff --git a/app_modules/overwrites.py b/app_modules/overwrites.py
index 4bfa339..7ef9614 100644
--- a/app_modules/overwrites.py
+++ b/app_modules/overwrites.py
@@ -1,25 +1,12 @@
from __future__ import annotations
-import logging
-from llama_index import Prompt
from typing import List, Tuple
-import mdtex2html
-from app_modules.presets import *
from app_modules.utils import *
-def compact_text_chunks(self, prompt: Prompt, text_chunks: List[str]) -> List[str]:
- logging.debug("Compacting text chunks...🚀🚀🚀")
- combined_str = [c.strip() for c in text_chunks if c.strip()]
- combined_str = [f"[{index+1}] {c}" for index, c in enumerate(combined_str)]
- combined_str = "\n\n".join(combined_str)
- # resplit based on self.max_chunk_overlap
- text_splitter = self.get_text_splitter_given_prompt(prompt, 1, padding=1)
- return text_splitter.split_text(combined_str)
-
def postprocess(
- self, y: List[Tuple[str | None, str | None]]
+ self, y: List[Tuple[str | None, str | None]]
) -> List[Tuple[str | None, str | None]]:
"""
Parameters:
@@ -39,13 +26,17 @@ def postprocess(
temp.append((user, bot))
return temp
-with open("./assets/custom.js", "r", encoding="utf-8") as f, open("./assets/Kelpy-Codos.js", "r", encoding="utf-8") as f2:
+
+with open("./assets/custom.js", "r", encoding="utf-8") as f, open("./assets/Kelpy-Codos.js", "r",
+ encoding="utf-8") as f2:
customJS = f.read()
kelpyCodos = f2.read()
+
def reload_javascript():
print("Reloading javascript...")
js = f''
+
def template_response(*args, **kwargs):
res = GradioTemplateResponseOriginal(*args, **kwargs)
res.body = res.body.replace(b'