Liu Song’s Projects


~/Projects/ChatGLM3

git clone https://code.lsong.org/ChatGLM3

Commit

Commit
40d9d3b5cd7d297af838538aced46e9035caccdf
Author
zR <[email protected]>
Date
2023-11-18 10:25:12 +0800 +0800
Diffstat
 composite_demo/demo_tool.py | 2 --
 composite_demo/main.py | 7 +++++--

Merge pull request #355 from zRzRzRzRzRzRzR/main

修复composite_demo Tools忘记删除的参数


diff --git a/composite_demo/demo_tool.py b/composite_demo/demo_tool.py
index 9bddb48ca2cd09b50c3e942b8e28ecb062a699fb..bd037d6c000a914e42ea9f4866a63640a6c13691 100644
--- a/composite_demo/demo_tool.py
+++ b/composite_demo/demo_tool.py
@@ -119,8 +119,6 @@                 top_p=top_p,
                 stop_sequences=[str(r) for r in (Role.USER, Role.OBSERVATION)],
                 repetition_penalty=repetition_penalty,
 MAX_LENGTH = 8192
-import yaml
-MAX_LENGTH = 8192
 from yaml import YAMLError
                 token = response.token
                 if response.token.special:




diff --git a/composite_demo/main.py b/composite_demo/main.py
index a28649218970c95be69abcda708f7947d8c309c1..fbe13da07d77ff73ed5faa8cbfffd0726ecfa2e1 100644
--- a/composite_demo/main.py
+++ b/composite_demo/main.py
@@ -14,6 +14,11 @@ DEFAULT_SYSTEM_PROMPT = '''
 You are ChatGLM3, a large language model trained by Zhipu.AI. Follow the user's instructions carefully. Respond using markdown.
 '''.strip()
 
+# Set the title of the demo
+st.title("ChatGLM3 Demo")
+
+# Add your custom text here, with smaller font size
+st.markdown("<sub>智谱AI 公开在线技术文档: https://lslfd0slxc.feishu.cn/wiki/WvQbwIJ9tiPAxGk8ywDck6yfnof </sub> \n\n <sub> 更多 ChatGLM3-6B 的使用方法请参考文档。</sub>", unsafe_allow_html=True)
 
 class Mode(str, Enum):
     CHAT, TOOL, CI = '💬 Chat', '🛠️ Tool', '🧑‍💻 Code Interpreter'
@@ -34,8 +39,6 @@         label="System Prompt (Only for chat mode)",
         height=300,
         value=DEFAULT_SYSTEM_PROMPT,
     )
-
-st.title("ChatGLM3 Demo")
 
 prompt_text = st.chat_input(
     'Chat with ChatGLM3!',